How to make a procedure that replaces block that player is looking at with chest with specific nbt tags

Started by _darkdealer_ on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a procedure that replaces block that player is looking at with chest with specific nbt tags

I'm trying to make a procedure that replaces block that player is looking at with a chest that contains some items.
Idk how to post images here or via imgur(it doesn't let me) so i'll describe what i have in my procedure boxes.

firstly the procedure's occure when you press the button of GUI
 then i have a block with executed command with setblock command of chest with some items at x offset direction of player, same with y and z.

and then it closes the GUI where the button was.
How do i make it so chest will spawn at the place where player looks, and how do i make it face the player.