Skip to content

Commit b1d55c9

Browse files
committed
fix: fix param of onBlockExploded event callback (#264)
1 parent 8efc5f3 commit b1d55c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/lse/events/BlockEvents.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,12 @@ LL_TYPE_INSTANCE_HOOK(
262262
Actor* source
263263
) {
264264
IF_LISTENED(EVENT_TYPES::onBlockExploded) {
265+
if (destroyedBlock.isAir()) {
266+
return origin(dimension, blockPos, destroyedBlock, source);
267+
}
265268
CallEvent(
266269
EVENT_TYPES::onBlockExploded,
267-
BlockClass::newBlock(blockPos, dimension.getDimensionId()),
270+
BlockClass::newBlock(destroyedBlock, blockPos, dimension.getDimensionId()),
268271
EntityClass::newEntity(source)
269272
);
270273
}

0 commit comments

Comments
 (0)