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

3

Focusing relative and local coordinates

3 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 2
    Registered User commented
    Comment actions Permalink

    Java Edition does this gracefully with the /execute at command:

    execute at @e[type=snowball] setblock ^ ^ ^1 air
  • 2
    Registered User commented
    Comment actions Permalink

    Oh, I only do bedrock edition, and my examples followed so.

  • 2
    Registered User commented
    Comment actions Permalink

    RegularCube7388 I understand most of the users here are MCBE players. While it would be nice to have the new version of /execute in Bedrock Edition, something tells me that it might not happen for a little while. Your idea with the colon (:), unfortunately, makes the syntax needlessly complicated. Commands are optimized for ease of entry, not for shortest length. Therefore, I have an alternative proposal:

    Allow the entry of a target selector instead of coordinates in the /execute command specifying the position to execute at. Syntax:

    execute <origin: target> <position: x y z> <command: command> # old behaviour
    execute <origin: target> <position: target> <command: command> # allows entity selection
    execute <position: target> <command: command>

    The first two examples are the old behaviour, plus the allowance of selecting an entity by using a target selector instead. The reason I also put a third example is if you want to put it in a command block, because the selector @s doesn't work with that.