import { world } from "@minecraft/server";

world.beforeEvents.worldInitialize.subscribe(e => {
   e.itemComponentRegistry.registerCustomComponent("gs_ce:resin_sword", resin_sword);
})

const resin_sword = {
	onHitEntity({ hitEntity }) {
		hitEntity.addEffect('slowness', 200, {
			amplifier: 2,
			showParticles: false
		});
	}
};