mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
Fix server crash with BlockPopulator when entities are at a negative chunk border
This commit is contained in:
parent
4f6bcc84f9
commit
8c6d60cf50
1 changed files with 2 additions and 2 deletions
|
@ -94,7 +94,7 @@ public class CraftLimitedRegion extends CraftRegionAccessor implements LimitedRe
|
|||
for (net.minecraft.world.entity.Entity entity : entities) {
|
||||
if (entity.isAlive()) {
|
||||
// check if entity is still in region or if it got teleported outside it
|
||||
Preconditions.checkState(isInRegion((int) entity.locX(), (int) entity.locY(), (int) entity.locZ()), "Entity %s is not in the region", entity);
|
||||
Preconditions.checkState(region.contains(entity.locX(), entity.locY(), entity.locZ()), "Entity %s is not in the region", entity);
|
||||
access.addEntity(entity);
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public class CraftLimitedRegion extends CraftRegionAccessor implements LimitedRe
|
|||
|
||||
@Override
|
||||
public boolean isInRegion(Location location) {
|
||||
return isInRegion(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||
return region.contains(location.getX(), location.getY(), location.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue