Started by
smokrock
on
Topic category: Help with Minecraft modding (Java Edition)
I'm new at all this forum stuff, so I am here to ask how I can get my enchant to apply to all swords. I have basic code that says
IF (Get level of enchantment PoisonedBlade of provided itemstack = 1)
Do add potion poison with level 1 for 60 ticks to Event/Target entity.
ELSE
(Get level of enchantment PoisonedBlade of provided itemstack = 2)
Do add potion poison with level 1 for 120 ticks to Event/Target entity.
I also have my enchantment be supported to "Mainhand" and Items that can be enchanted with this enchantment are swords only.
I don't get it... Are you on "world trigger: on entity attacked" or whatever it's called? That will check for every single attack in the game. Then you check whether the weapon used by source entity had your poison enchant and then add poison effect to the target entity.