Using a placed block's coordinates in an explosion command

Started by ProjectGemini12 on

Topic category: Help with modding (Java Edition)

Last seen on 01:58, 10. Dec 2019
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using a placed block's coordinates in an explosion command

Is there any way of getting the coordinates (x,y,z values) of a placed block in a world? My goal is to make a block that when destroyed explodes, but to spawn an explosion onto the block, my code would need to know the position of where the block is located right? I apologize if this post makes no sense, I've just recently got into modding minecraft. Any help would be appreciated. 

Last seen on 14:12, 3. Jun 2023
Joined Nov 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When a procedure is called…
Sat, 11/16/2019 - 10:21

When a procedure is called by a block, the X, Y, Z components are the coordinates of that block.
explosion procedure

For example, this procedure will be called at the block's coordinates