#how would I go about making a item that gives a effect when held in the main hand?
8 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
just gonna bump this, help would be much appreciated
ok this is very late, but i just figured it out after searching and finding this post had no answer, so here's what i used to figure out the pieces
PlayerEvents.tick(event => {
event.player.potionEffects.add('minecraft:speed', 2, 0, false, false);
let held_item = event.player.getHeldItem("main_hand")
event.server.tell(held_item)
})
just need to filter by held item and actually organize the code now
ok, this works for my purposes, but it doesn't seem to be able to do things like poison the user cause it's constantly refreshing
wait, im just being dumb lol
i was treating the duration like seconds, not ticks
You might be able to do this with a attribute modifier? I'm not well versed though. I know there's an example somewhere how to do it tho