Get XYZ of provided blockstate

Started by BancingDare on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Feb 2022
Points:
481

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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?

Active 11 months ago
Joined Dec 2023
Points:
134

User statistics:

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

Did you figure out how to do that?

Active 1 year ago
Joined Apr 2016
Points:
734

User statistics:

  • Modifications: 1
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
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?