Just a quick question that is slightly complicated that has to do with command blocks and such.

Is it possible to determine where a certain block is placed in the world without knowing where it can be placed? In my case, I have an admin team (I am making a red vs. blue game), and for the admin team to teleport around, they must place a glass block on the ground. The admin can place the block anywhere therefore there is no set coordinates of where the block will be.

After finding the block, I can do the rest. It would be very helpful if you guys (or girls) could explain if this is in fact possible, and then how it could be achieved.

  • I've really wanted this but the solution is a bit complicated. See gaming.stackexchange.com/a/252408/118457 – Judge2020 Mar 1 '16 at 23:02
  • Your edit doesn't really help your question, so I've rolled it back. – Frank Mar 1 '16 at 23:24
  • @Frank I was either going to delete the question or delete the edit after I was finished checking something. It would have given me my answer, or I would have come up with a different method to test for a block. – Dylpyckle13 Mar 1 '16 at 23:30
  • Which is fine. But it has no bearing on your actual question, so there's no reason to include it. If you do find an answer, though, feel free to answer your own question! That would help others running into the same issue. – Frank Mar 1 '16 at 23:37

So instead of actually testing for the block to be placed anywhere, I thought it may be a better (and simpler) idea to test for the player throwing the item and testing for the entity, which is what I ended up doing.


run this:

/scoreboard objectives add name stat.useItem.minecraft.glass

run on loop in chain:

/tp @a[score_name_min=1] whereverYouWant

/scoreboard players remove @a[score_name_min=1] name 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.