Get XYZ of provided blockstate

Started by BancingDare on

Topic category: Help with modding (Java Edition)

Last seen on 00:01, 23. May 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Get XYZ of provided blockstate

Hello, I'm trying to tweak fire aspect so it lights tnt on fire when hit. I'm using the "player left clicks block" trigger to check if the blockstate is TNT, and then using raytacing to remove the block and spawn the TNT. The problem I'm having is that the raytracing when used in this way is inconsistent and can cause duplication of TNT spawns, so I'm trying to find a way to log the XYZ of the provided blockstate to use that as the spawn location for the TNT instead.

TLDR: How do I find the XYZ of a provided blockstate?

Last seen on 07:55, 2. Feb 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Did you figure out how to do…
Fri, 12/22/2023 - 08:27

Did you figure out how to do that?

Last seen on 22:09, 24. Dec 2023
Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bad news: you can't…
Sun, 12/24/2023 - 22:09

Bad news: you can't. Location information is not stored in blockstates. Doesn't the trigger provide the blockpos?