Logo

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

Commands

Please sign in to leave a comment.

  • Avatar
    TheIronSniper1 commented

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

  • Avatar
    Hulunabc commented

    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.

  • Avatar
    Xavier Hervy commented

    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

  • Avatar
    Martin Carney commented

    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.