Started by
zorualeloupsolitaire
on
Topic category: Help with Minecraft modding (Java Edition)
Hi, I would like to know if it is possible to make a defense animation in Mcreator.
In my mod, there's a lot of hand-to-hand combat and I'd like the player to be able to counter the opponent's blows by crossing his arms in front of him, which would play a custom punch sound with 50% damage reduction.
In return, the player who suffers the enemy's blow would move back one or two blocks.
To make player animations you need to use the player animator plugin
Thank you very much for the idea of using player animator. However, is it possible in Mcreator to do a procedure to reduce damage by 50% when playing the animation?
Maybe you could give the player that is defending the resistance potion effect with an amplifier of 1 and no particles, for the duration of the animation. This would reduce damage by 40%, or you could do an amplifier of 2 to reduce damage by 60%. I know that this probably isn't exactly what you want, but it should still work similarly to what you want.
Also, there was, in previous MCreator versions, possibly in the current one, a bug where potion effects with a short duration display in the player's inventory for an infinite time. The solution to it is to put the procedure block that gives the potion effect in an 'if' block with the condition (not(is provided world client-side))