I'm making a map where you have to "capture" all the beacons by changing their color. Is there any way (in single player vanilla Minecraft) to detect when a beacon color is changed? I was thinking of maybe using observers, but those would only detect if any block was placed there.

  • Maybe try /testfor for the different colored glass above the beacon. I think there isn't a way to detect a color of a beacon, as it may also have multiple colors (white until the colored glass, just then becoming colored, etc.) – Quijibo May 31 '17 at 12:56
  • I thought /testfor was for entitys, isn't it? – Aperson May 31 '17 at 13:01
  • Is the map set up so that there's only one place to put a stained glass block, or could it be in any of the ~250 blocks above the beacon? – ash4fun May 31 '17 at 13:27
  • well I made the glass blocks with the CanPlace tag for ONLY beacons, so It shouldn't be possible to place them anywhere else. (unless they cheat) (also sorry I'm so late It only showed that comment when I clicked a tiny button XD) – Aperson Jun 1 '17 at 13:20
  • @Aperson Yeah, /testfor is only for entities, but, as minecraftprank's answer says, you can use /testforblock. Sorry for that. – Quijibo Jun 1 '17 at 15:35

~~~/testforblock(s) You may use this when using /execute

Summon an invisible Armor_Stand (with the name 'Beacon') inside the beacon and then do a sort of '/execute @e[type=Armor_Stand,name=Beacon] ~ ~ ~ /testforblocks XXX' to test if a block changed

  • wait should I replace XXX with ~ ~1 ~ for the block above the stands? (I put them inside the beacons) – Aperson Jun 1 '17 at 13:38
  • ok so I did that but it still says: failed to execute /testforblocks ~ ~1 ~ as Beacon :( – Aperson Jun 1 '17 at 13:52
  • there are TWO sets of coords that you have to enter! not just one! – Aperson Jun 1 '17 at 14:03
  • ugh! it still says failed to execute! – Aperson Jun 1 '17 at 14:07

Ok guys I finally found the command. it goes as follows:

/execute @a ~ ~ ~ detect ~ ~1 ~ minecraft:stained_glass 0  

but there is another problem. now I need to know (please don't call me a noob but) how to add 1 to a players score I simply can't figure it out. Help? (again) btw this is what will go in place of (command).

  • 3
    If you have another question, it may be more appropriate to ask it as a separate question, and select an answer which you think sufficiently answered your original question. You can always link back to this question in the new question if its an extension of this question – B. S. Morganstein Jun 1 '17 at 14:43
  • well it kind of is an extension because its the same command, just that I now need help finishing it off. – Aperson Jun 1 '17 at 14:45
  • If you're modifying your question then you should change it in the question above or ask a new question entirely, not ask a new question in an answer – B. S. Morganstein Jun 1 '17 at 14:46
  • Ok your right I'm gonna make a new question – Aperson Jun 1 '17 at 14:58
  • Great! If any of the answers here helped you figure out the command then you should also accept it as the correct answer by clicking the check mark to the left of the answer – B. S. Morganstein Jun 1 '17 at 15:00

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.