How to make a animation of defense?

Started by zorualeloupsolitaire on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a animation of defense?

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.

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To make player animations…
Thu, 11/28/2024 - 20:05

To make player animations you need to use the player animator plugin

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you very much for the…
Fri, 11/29/2024 - 10:23

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?

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe you could give the…
Fri, 11/29/2024 - 12:48

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))