Started by
91arrows
on
Topic category: Help with Minecraft modding (Java Edition)
i added a procedure to the block broken trigger
i want to get information about the block that was broken
however, when i get the block at [x, y, z], it returns as air, because the block was just broken and it's sensing what block is at that position after it is broken
does anyone know a workaround to this
You could try cancelling the event, then checking the pos. After that, try using remove block with particles. I haven't tested this though, so it might not work.
that would make sense but cancelling only works with global triggers
i'm using a trigger from a custom block
i'd rather not use the general block breaking global trigger because that would make it laggy
Hmm...
You could just go on ahead and do the global one. As long as you don't explode masses of TNT or something, it should be fine. (Masses of TNT already lag computers so no change there)
If it is too laggy anyways, you could try when a player starts to mine the block, store the block in a variable, then wait a little bit of time. If the block returns as air, you know it has been broken and use the variable as the data.
That might be laggy as well, but it is the best I got for you. Sorry.
I'll let you know if I find a better solution to your problem.
thank you for the suggestion and creative solution
strange that mcreator hasn't addressed this yet