Started by
IsabelleTheStoop
on
Topic category: Help with Minecraft modding (Java Edition)
So the item I'm trying to make is pretty complex, so I'm just going to say what I'm making:
I'm trying to make the Time Stopper weapon from Megaman 2.
My idea was to add slowness and mining fatigue to every entity and then add speed and haste to the user of the item.
However, I don't really understand to do this. I know that I have to make a procedure to affect every entity and the player, but I can't figure it out.
Honestly, my main problem is that I don't know how to affect every entity and the player. I'm trying to use the "Add Potion with level # for # ticks ambient..." block.
Mainly, I don't know how to address the block to affect every entity.
Why not use commands?
/effect give @e[type=!player] slowness
This gives an effect to all entities except players
So pretty much, you just have to make a procedure when the power/item is used to do this:
For each entity in square cube size [200] As entity iterator
Give entity iterator potion effect slowness [amplifier and duration anything you want]
Give entity iterator potion effect mining fatigue [amplifier and duration anything you want]
Clear all potion effects from Event/Target entity type: slowness
Clear all potion effects from Event/Target entity type: mining fatigue
Give Event/Target entity potion effect speed [amplifier and duration anything you want]
Give Event/Target entity potion effect haste [amplifier and duration anything you want]
And remember, don't mess up where to put Event/Target Entity or Entity Iterator because that'll change everything.
Good luck!