How to make revive item

Started by ItsBumblee on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make revive item

An item that revives the player even if it does not revive the player but before the player dies like has 1 or 0.5 It heals him to 20 hearts and then the totem animation to the item and plays the totem sound with the particle (I can do the particle) with a cooldown of 10 minutes. And I want it to check if the item is in the main hand and if the player has reached 1 or 0.5 hearts and then it will trigger but it is not working The code

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You should make a new…
Wed, 03/12/2025 - 14:38

You should make a new procedure using the global trigger "Entity Dies", then check if the one who died was a player (you don't really have to do this if you want it to work in all mobs), then check the item in the main hand, if it's the item you want then cancel the event (player won't die) and make sure health stays at 1 (you can change it to 20 or anything else), like this:

you can do the rest of the code (totem animation, particles, etc) after the "cancel event" block and it should work perfectly.