Started by
Blixstorm
on
Topic category: Help with Minecraft modding (Java Edition)
Im making a enchant called withering where if you put it on a sword and hit someone they get the wither effect, does anyone know how to do this?
Topic category: Help with Minecraft modding (Java Edition)
Im making a enchant called withering where if you put it on a sword and hit someone they get the wither effect, does anyone know how to do this?
So first, create an enchantment. next, make a procedure that has the global trigger "When entity is hurt". Next, put an if block saying If: Get enchantment level of {Item in main hand of:[Source Entity(an actual block in the minecraft elements section]} type [Enchantment(In your case, withering)] > 0
next, inside of it, put a block that gives the potion effect to the entity [Event/target entity].
If you want to do a different level of wither/different amount of time, do Get enchantment level of {item in main hand of [source entity] type [Withering] *(multiplication symbol) [The number you want per level of the enchantment]
Hope this helps!