trying to make the mace the way it works in 1.21

Started by QuoteWasThere on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
trying to make the mace the way it works in 1.21

i've got into mcreator very recently and the first thing i wanted to get into 1.20.1 is the mace. is there a way to make its intended mechanics or make at least something similar?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Presumably they're just…
Sun, 04/07/2024 - 18:24

Presumably they're just using the fall distance of the player. I'm pretty sure there's a function to get fall distance, but if there isn't, you could pretty easily make one yourself. Make a player-persistent number variable that sets itself to the player's current y value whenever they're on teh ground, and becomes locked when they're in the air. Then, when they attack, you can get the difference between their current y position and their saved y position, and use this to determine the additional damage.