Minecraft has a lot of target selectors, like @r, which targets a random player, or @e, which targets all entities. There is no way to target blocks with target selectors, so it isn’t possible to execute commands as, at, or targeting blocks, except commands like /fill. There will be a new target selector, called @b. @b will target any block of either a certain type or in a certain location. Most selector arguments (things like hasitem or haspermission) won’t work with @b, so there will be new selector arguments that can only be used with the @b selector.
blocktype
One of these new selector arguments will be blocktype. blocktype will control what type of block you are targeting.
@b[blocktype=dirt] will target all dirt blocks.
blockdata
blockdata will only target blocks with certain block states. Block states determine things like the direction the block is facing, or if it is waterlogged. To target all observers facing up, type
@b[blocktype=observer,blockdata={minecraft:facing_direction=up}]
Selector arguments that work
Most selector arguments that work for entities won’t work for blocks. Some will, though. Arguments that target things within certain areas will work with @b.
Where @b can be used
Since @b targets blocks instead of entities, It wouldn’t work with all commands. You can’t kill a block, for example. Commands like tag or scoreboard, will work, and will let us use those selector arguments with @b. Commands like the damage or execute will also work.
Please sign in to leave a comment.
0 Comments