special death message & punishment

Started by Nate0tmi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
special death message & punishment

I am trying to make boss fight.   I made a custom boss, witch (the blood witch) that will spawn one custom piglin (demon) each time she takes damage.

When the player walks on the same block as a demon they will get a potion effect.  (Wither effect)

I would like to add a custom death message for the demon mob & or the potion effect.

Then I want to code a punishment for Loosing the boss fight & give the player the items to craft the spawn egg to try the boss again.

Any tips on how to finish making is?   I have the mobs & a way to craft the eggs in survival, I have a good drop reward, & achievement if u win.

but I need tips on a custom death message

& or if I need to make a custom potion effect

& how I can control the punishment that happens after the player re-spawns from dyeing to the boss

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Easiest way to do custom…
Fri, 02/14/2025 - 03:34

Easiest way to do custom death messages would be to use a custom damage type for the mobs and/or potion effect.

For the punishment on respawn, detect if the player dies to the boss fight then save it to a player persistent variable. In the 'on player spawn' global event, check if the player has that variable set to true; if they do then enact the punishment and remember to reset the variable.