'__on_player_breaks_block()' block variable does not contains the NBT data of the broken block.
TCasseBloc opened this issue ยท 1 comments
As stated in #368, this script :
__on_player_breaks_block(p, b) ->
(
print(block_data(b));
print(block_data(pos(b)));
print(block_data(block(b)))
)
never returns the expected value when you break a TE.
It should normally return :
{x:<X coordinate>,y:<Y coordinate>,z:<Z coordinate>,id:"minecraft<block id>",<extra NBT data>}
null
(the block_data()
at the pos()
of b
is always null
because it's now air and not the former block object contained in b
)
<same as line 1 because block(block(<something>)) is the same as block(<something>)>
But it always says :
null
null
null
Should be fixed by this: e8d6e16
I moved the event to little earlier when the block is still in the world, before its removed due to user action.