Skip to content

Commit

Permalink
fix(portals): protect against rare player state corruption in papermc…
Browse files Browse the repository at this point in the history
… (can't use nether portals -> also affects our portals)
  • Loading branch information
oddlama committed Nov 19, 2023
1 parent 1b174d0 commit 7d3edb7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void on_entity_move(final EntityMoveEvent event) {
entities_portalling.put(entity_id, event.getFrom().clone());
} else if (!get_module().portal_area_materials.contains(block.getType())) {
// At least 2 blocks away and outside of portal area → finish portalling.
if (event.getFrom().distance(loc) > 2.0) {
if (loc.getWorld() == event.getFrom().getWorld() && event.getFrom().distance(loc) > 2.0) {
entities_portalling.remove(entity_id);
}
}
Expand Down

0 comments on commit 7d3edb7

Please sign in to comment.