Skip to main content
replaced https://minecraft.gamepedia.com/ with https://minecraft.wiki/w/
Source Link

For NBT questions the Minecraft wiki page "Chunk format""Chunk format" (archivearchive) always helps. It can tell you that the "Level" tag of a beacon stores the number of layers of the pyramid that are available to it (with the usual small delay), "Primary" stores the first and "Secondary" the second status effect.

So you can do something based on that check like this:

/execute if block ~ ~ ~ beacon{Level:1} run <command>

But that only works for a single value, not all four. You could use execute store with data get to put it into a scoreboard, then you could check for a range, but since you are only interested in "not 0", you can use this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Level:0} run <command>

This would in theory also select beacons without the Level tag, but that doesn't happen unless it's explicitly removed with commands (or the world gets corrupted or whatever).


If you want to check for the effect instead, you can do something like this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Primary:{Id:0b}}

The value 0 in a beacon's effect ID means "no effect".

For NBT questions the Minecraft wiki page "Chunk format" (archive) always helps. It can tell you that the "Level" tag of a beacon stores the number of layers of the pyramid that are available to it (with the usual small delay), "Primary" stores the first and "Secondary" the second status effect.

So you can do something based on that check like this:

/execute if block ~ ~ ~ beacon{Level:1} run <command>

But that only works for a single value, not all four. You could use execute store with data get to put it into a scoreboard, then you could check for a range, but since you are only interested in "not 0", you can use this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Level:0} run <command>

This would in theory also select beacons without the Level tag, but that doesn't happen unless it's explicitly removed with commands (or the world gets corrupted or whatever).


If you want to check for the effect instead, you can do something like this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Primary:{Id:0b}}

The value 0 in a beacon's effect ID means "no effect".

For NBT questions the Minecraft wiki page "Chunk format" (archive) always helps. It can tell you that the "Level" tag of a beacon stores the number of layers of the pyramid that are available to it (with the usual small delay), "Primary" stores the first and "Secondary" the second status effect.

So you can do something based on that check like this:

/execute if block ~ ~ ~ beacon{Level:1} run <command>

But that only works for a single value, not all four. You could use execute store with data get to put it into a scoreboard, then you could check for a range, but since you are only interested in "not 0", you can use this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Level:0} run <command>

This would in theory also select beacons without the Level tag, but that doesn't happen unless it's explicitly removed with commands (or the world gets corrupted or whatever).


If you want to check for the effect instead, you can do something like this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Primary:{Id:0b}}

The value 0 in a beacon's effect ID means "no effect".

added archive link
Source Link
Fabian Röling
  • 20.7k
  • 6
  • 39
  • 78

For NBT questions the Minecraft wiki page "Chunk format" (archive) always helps. It can tell you that the "Level" tag of a beacon stores the number of layers of the pyramid that are available to it (with the usual small delay), "Primary" stores the first and "Secondary" the second status effect.

So you can do something based on that check like this:

/execute if block ~ ~ ~ beacon{Level:1} run <command>

But that only works for a single value, not all four. You could use execute store with data get to put it into a scoreboard, then you could check for a range, but since you are only interested in "not 0", you can use this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Level:0} run <command>

This would in theory also select beacons without the Level tag, but that doesn't happen unless it's explicitly removed with commands (or the world gets corrupted or whatever).


If you want to check for the effect instead, you can do something like this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Primary:{Id:0b}}

The value 0 in a beacon's effect ID means "no effect".

For NBT questions the Minecraft wiki page "Chunk format" always helps. It can tell you that the "Level" tag of a beacon stores the number of layers of the pyramid that are available to it (with the usual small delay), "Primary" stores the first and "Secondary" the second status effect.

So you can do something based on that check like this:

/execute if block ~ ~ ~ beacon{Level:1} run <command>

But that only works for a single value, not all four. You could use execute store with data get to put it into a scoreboard, then you could check for a range, but since you are only interested in "not 0", you can use this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Level:0} run <command>

This would in theory also select beacons without the Level tag, but that doesn't happen unless it's explicitly removed with commands (or the world gets corrupted or whatever).


If you want to check for the effect instead, you can do something like this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Primary:{Id:0b}}

The value 0 in a beacon's effect ID means "no effect".

For NBT questions the Minecraft wiki page "Chunk format" (archive) always helps. It can tell you that the "Level" tag of a beacon stores the number of layers of the pyramid that are available to it (with the usual small delay), "Primary" stores the first and "Secondary" the second status effect.

So you can do something based on that check like this:

/execute if block ~ ~ ~ beacon{Level:1} run <command>

But that only works for a single value, not all four. You could use execute store with data get to put it into a scoreboard, then you could check for a range, but since you are only interested in "not 0", you can use this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Level:0} run <command>

This would in theory also select beacons without the Level tag, but that doesn't happen unless it's explicitly removed with commands (or the world gets corrupted or whatever).


If you want to check for the effect instead, you can do something like this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Primary:{Id:0b}}

The value 0 in a beacon's effect ID means "no effect".

Source Link
Fabian Röling
  • 20.7k
  • 6
  • 39
  • 78

For NBT questions the Minecraft wiki page "Chunk format" always helps. It can tell you that the "Level" tag of a beacon stores the number of layers of the pyramid that are available to it (with the usual small delay), "Primary" stores the first and "Secondary" the second status effect.

So you can do something based on that check like this:

/execute if block ~ ~ ~ beacon{Level:1} run <command>

But that only works for a single value, not all four. You could use execute store with data get to put it into a scoreboard, then you could check for a range, but since you are only interested in "not 0", you can use this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Level:0} run <command>

This would in theory also select beacons without the Level tag, but that doesn't happen unless it's explicitly removed with commands (or the world gets corrupted or whatever).


If you want to check for the effect instead, you can do something like this:

/execute if block ~ ~ ~ beacon unless block ~ ~ ~ beacon{Primary:{Id:0b}}

The value 0 in a beacon's effect ID means "no effect".