0

What I want to do: Detect if the player is on black concrete, and then change a scoreboard I created called reviveto 1. I'm in 1.14.4, and I can't find tutorials online for this. I assume that the command will be execute, but I'm not sure. Help appreciated!

EDIT: Need to do from a command block, sorry for forgetting this!

9

1 Answer 1

-1

I'm not too keen on scoreboard commands, but I do know how to work the trigger.

For a single block of concrete, place a repeating command block directly underneath the block of concrete and use this command

/execute if entity @p[distance=..1.59375] run /scoreboard <scoreboard parameters>

The distance parameter is a somewhat odd value, but I measure it to activate if the player's truncated X|Z coordinates are exactly the same as the command blocks, assuming the Y coordinate is 2 greater.


For multiple concrete blocks, you could use multiple command blocks, but there is a way where you can only use one if you want.

If you only have a few concrete blocks, I recommend just using multiple command blocks, but if there are several, I'd try this method.

Stand on each block of concrete and run this command:

/summon armor_stand X (Y-2) Z {Invisible:1,Invulnerable:1,CustomName:"\"Element\"",CustomNameVisible:1,NoGravity:1,Marker:1b,DisabledSlots:2039583}

Then place one repeating command block somewhere and cive it this command to run:

/execute as @e[type=armour_stand,name="Element"] run /execute if entity @p[distance=..1.59375] run /scoreboard <scoreboard parameters>

DISCLAIMER: I have not tested this second method. There is a small chance something is wrong.


I hope this helps a bit. Sorry if I didn't know the scoreboard commends very well, but I assume since that's what you're using, you know what you're doing.

4
  • I don't understand your explanation of the weird radius. The player is 0.6 blocks wide, did you attempt to do anything with that? And in general, this answer is waaay too complicated. Look here: (link comes later) Commented Oct 15, 2019 at 23:35
  • @FabianRöling Given the position of the command block in my example, a whole number would cause a few problems. A distance 2 could could activate the command block before the player reaches the block, and a distance of 1 may not allow the command block to activate. If I could, I would make a video showing the process. Also, you only really need the first section of this answer. If that works, just repeat the process. The second part is only if the amount of command blocks causes a lot of lag. Commented Oct 15, 2019 at 23:45
  • Oops, I forgot to insert the link: gaming.stackexchange.com/questions/341263/… This answer is way easier. And for example your last command even has wrong syntax, run /execute is not only unnecessary, but also doesn't work at all with the additional /. What I meant in my first comment is that all relevant lengths of a player hitbox are exact to a tenth of a block, so at least four of your digits don't do anything useful. Maybe you meant "1.6" instead of "1.59375", I don't know, because I don't understand your answer even. Commented Oct 16, 2019 at 12:45
  • You're right, your method is much easier. I used my method for someone who stands at a specific coordinate, not a specific block. Although it could be used here, I now know that there is a much simpler method. Commented Oct 16, 2019 at 15:10

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