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.
Best Answer
This can be done with advancements. You can have an advancement trigger of type
entity_hurt_player
(archive) and in itsdamage.source_entity.type
condition check for the entity type, like skeleton. The example given in the wiki even does this: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.