Block that spawns an entity on it when another dies.

Started by Kixitt on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Block that spawns an entity on it when another dies.

I'm making a sort of infection mod and gotta know if there's a way to make it so a block can act like magma then when an entity dies on said block, an infected creature spawns there. As of right now I've got "When entity walks on block, deal 4 damage to event/target entity from Damage source of type GENERIC."

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You need to run it through…
Mon, 10/09/2023 - 19:22

You need to run it through the entity, not the block. Make a global trigger that triggers 'when entity dies,' and checks if the block directly below the entity is your custom block. If it is, spawn your entity.

If you instead want it to behave more like a sculk catalyst and target entities in a radius, you can have the entity run a modified version of the 'check for block in 6*6*6 box' procedure template,' looking for your custom block.