0

I'm making horror map. And i got some problems.

I need that when a player takes damage from a specific mob, a block is placed. This block will start another system. For example: if player have damage from zombie, iron block placing in some place. If player have damage from skeleton, redstone block placing in some place. I hope you help me. And sorry for my bad english.

1
  • I would recommend updating to 1.14, as the commands have changed and help will be hard to find. Commented Oct 14, 2019 at 2:37

1 Answer 1

1

This can be done with advancements. You can have an advancement trigger of type entity_hurt_player (archive) and in its damage.source_entity.type condition check for the entity type, like skeleton. The example given in the wiki even does this:

{ "criteria": { "example": { "trigger": "minecraft:entity_hurt_player", "conditions": { "damage": { "source_entity": { "type": "skeleton", "direct_entity": { "type": "arrow" } }, "taken": { "min": 4.0 } } } } } }

Then you just need to use a function as reward that places a block, it will automatically be executed as the player and at the position of the player.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .