Commands let players perform actions and customize gameplay using text-based instructions. Use this topic to share feedback and ideas for improving commands and related tools.

17

Player data should contain the position of the last block a player placed

5 Comments

Post a new comment:

Please sign in to leave a comment.

Sorted by oldest
  • 0
    Registered User commented
    Comment actions Permalink

    I understand why you would want that information available, but why would it help with multiblock structures?

  • 0
    Registered User commented
    Comment actions Permalink

    I think, to set a trigger when placing block and pass an argument of the position of the place to a function may be better.

  • 0
    Registered User commented
    Comment actions Permalink

    In 1.13 you can use an achievement (in data pack) in order to detect when a block is placed.

    https://minecraft.gamepedia.com/Advancements#minecraft:placed_block

  • 0
    Registered User commented
    Comment actions Permalink

    I'd like to expand this to include the coordinates (and block type) of last block placed, the last block broken, and the last block interacted with (right-clicked), each stored separately.

     

    Maybe useful would also be the coordinates of the last block the player stood on, which could be used in parkour maps to quickly restore a falling player to where they left off.

     

    The current best option for getting the coordinates of a just-placed block? Creating a cubic grid of armor stands around the player and checking each block they occupy to see if it is a certain type. Every single time. And it doesn't work if players are allowed to place more than 1 of that type of block.

  • 0
    Registered User commented
    Comment actions Permalink

    Muito bom