We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

1

Target Blocks should be Block Entities

3 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 1
    Registered User commented
    Comment actions Permalink

    You can test for the block state instead:

    execute if block 12 23 34 minecraft:target[power=1] run ...
    execute if block 12 23 34 minecraft:target[power=2] run ...
    execute if block 12 23 34 minecraft:target[power=3] run ...
    ...
  • 0
    Registered User commented
    Comment actions Permalink

    "You can test for the block state instead"

    ...That's exactly what OP meant to eliminate, don't you see?

    Although this is very old suggestion, I endorse it. That or to make an easier way to get these non-entity block data, it just doesn't make sense to not be able to do so.

  • 1
    Registered User commented
    Comment actions Permalink

    just use

    execute positioned x y z if entity @e[type=arrow,distance=..1.5] run ...

    on bedrock, use

    just use

    execute positioned x y z if entity @e[type=arrow,r=1.5] run ...

    also, this would cause lag to anyone who has a lot of target blocks in their world