Skip to content

Commit

Permalink
fix: fix onFarmLandDecay cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Jan 14, 2025
1 parent ff9d21b commit 77aca91
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lse/events/EventHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,13 @@ LL_TYPE_INSTANCE_HOOK(
float fallDistance
) {
IF_LISTENED(EVENT_TYPES::onFarmLandDecay) {
CallEvent(
EVENT_TYPES::onFarmLandDecay,
IntPos::newPos(pos, region.getDimensionId()),
EntityClass::newEntity(actor)
);
if (!CallEvent(
EVENT_TYPES::onFarmLandDecay,
IntPos::newPos(pos, region.getDimensionId()),
EntityClass::newEntity(actor)
)) {
return;
}
}
IF_LISTENED_END(EVENT_TYPES::onFarmLandDecay);
origin(region, pos, actor, fallDistance);
Expand Down

0 comments on commit 77aca91

Please sign in to comment.