Minecraft 1.12 kill players on certain blocks?

Ab
8

How can I kill a player if the scoreboard "tag" has the score 3 and the player sits down on e.g. Snow is located? Need it for an adventure map where you die after three minecraft days when you touch ice

Ta

Hi! This is done via so-called selectors and with / execute:

execute @a [score_Tag_min = 3] ~ ~ ~ detect ~ ~ ~ [BLOCK] [BLOCK_ID] kill @p

If you still need help, just ask!

Ab

Thank you! Really helped me!

Ab

I've written this into a repeat commandblock:

execute @a [score_Tag_min = 3] ~ ~ ~ detect ~ ~ ~ snow 80 kill @p

Unfortunately, the commandblock does nothing:-( did I do something wrong?

/ scoreboard players list KrizzlySnider

Then comes:

Day: 3 (day)

Ta

Why "snow 80"? You just want to have snow not a variation of it, so just "snow 0":)

Oh, 80 is the ID of snow… Oh so sorry that was stupidly worded. This is, so to speak, the variation of a block, e.g. Is each color a different number!

Ab

OK

Ab

Unfortunately it only works with snow_layer not at snow. I wrote "snow 0"

Ta

Well, you test if the block in the player himself is snow. That's not the case. If you want to test if it's on snow you need to change the relative coordinate:

execute @a [score_Tag_min = 3] ~ ~ ~ detect ~ ~ -1 ~ snow * kill @p

otherwise, just share a picture of your current situation with the command! Then maybe I can help you better

Ab

Oh thanks. I'm a little bit crazy about the topic