Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Commit

Permalink
Fix BlockExplodedEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjlintkh committed Feb 8, 2022
1 parent 70ae1ff commit 5f32f63
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bdsx/bdsx-lxl",
"version": "1.0.4",
"version": "1.0.5",
"description": "LiteXLoader ported into BDSX",
"main": "index.js",
"keywords": [],
Expand Down
6 changes: 4 additions & 2 deletions src/api/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,10 @@ events.playerDropItem.on(event => {
const original = symhook("?onExploded@Block@@QEBAXAEAVBlockSource@@AEBVBlockPos@@PEAVActor@@@Z",
void_t, null, Block, BlockSource, BlockPos, Actor)
((thiz, region, pos, entitySource) => {
const cancelled = LXL_Events.onBlockExploded.fire(Block$newBlock(pos, entitySource.getDimensionId()), Entity$newEntity(entitySource));
_tickCallback();
if (entitySource) {
const cancelled = LXL_Events.onBlockExploded.fire(Block$newBlock(pos, entitySource.getDimensionId()), Entity$newEntity(entitySource));
_tickCallback();
}
return original(thiz, region, pos, entitySource);
});
}
Expand Down

0 comments on commit 5f32f63

Please sign in to comment.