Totem of respawn

Started by MrWinston27 on

Topic category: Help with modding (Java Edition)

Last seen on 20:28, 25. Dec 2022
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Totem of respawn

I am trying to create an item that while in your inventory, allows you to keep your items/exp upon death. This is the first time I have ever used MCreator and I don't want to let my friends down since I told them I could get this done.

Last seen on 20:43, 15. Apr 2024
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actully think it is not…
Sun, 12/25/2022 - 12:55

Actully think it is not possible without coding, you can change gamerule when item is in inventory but that would change it for everyone.

Last seen on 22:22, 16. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I’m not sure about keeping…
Wed, 12/28/2022 - 00:01

I’m not sure about keeping your items, but keeping XP is simple!

 

When a player dies with the totem in a hand, set a global variable to the amount of xp they have before they died.

 

Then, set another global variable that confirms they used a totem.

 

On tick, see if the second global variable (if they used a totem) is true. If it is, set the players xp bar to that first global vwriable(xp before death)

Last seen on 09:23, 7. Dec 2023
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what you could try doing is…
Thu, 01/05/2023 - 05:25

what you could try doing is setting the gamerule to keep inventory before death the right immediately after death change it back that way the only people effected are you and any one else that manages to die on the same tick as you witch can only be accomplished with the kill command altho i dont know how to do it