How do I make a block spawn when a player dies?

How do I make a block spawn when a player dies? - Two Men Playing Volleyball Near Red Canopy

Well, I'm making a trap, and it contains trip wire. And after a player dies, the trip wire disappears. (It actually burns away because of the lava that comes with the trap.) I want to trip wire to be replaced after a player dies. How could I do that?



Best Answer

There is only one way of doing this, except of constantly reloading the trap, which is by using Command blocks:

Place Command blocks next to the trap Redstone so that it activated after the trap is cleared (use Repeaters). In the CMD blocks place this commands:

/setblock X Y Z minecraft:tripwire_hook

for the hook, and the following for the wire:

/setblock X Y Z minecraft_string

Instead of X, Y, Z put the hook's and tripwire's coordinates - for each hook and tripwire a different set of coords.
I haven't tested this, so the tripwire hook could stick to a different wall - you can try giving the hook a different damage for different rotation (minecraft:tripwire_hook 1, minecraft:tripwire_hook 2, ...)




Pictures about "How do I make a block spawn when a player dies?"

How do I make a block spawn when a player dies? - Men Running Playing Football during Daytime
How do I make a block spawn when a player dies? - Man Sitting on a Grass while Holding Golf Club
How do I make a block spawn when a player dies? - Free stock photo of adult, ball, balls



How do you set death spawn in Minecraft?

Sleep in a bed. When you sleep in a bed at night, you will reset your spawn point. You can sleep in multiple beds but the last bed that you slept in before you die is where you will respawn. Use the /spawnpoint command.

How do you make blocks Respawn in Minecraft?

You will need to spawn it in from by typing /give <your username> command_block. Due to its ability to affect all aspects of the game, command blocks are not accessible in survival mode. Now that you have command blocks the next step is to activate it.

What is the command to spawn a block?

The way it works is simple: If a players die, the scoreboard will register and add a point to whoever died. After that, the command block will execute as the player (note that the command could go 'execute if @a[scores={deaths=1..}]') and clear everyone (including his) score.



How to Make a Lighting Bolt Summon When a Player Dies | Only 2 Command Blocks!




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Jim De Ramos, Pixabay, cottonbro, Tima Miroshnichenko