mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
Fix server crash with BlockPopulator when entities are at a negative chunk border
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
c2e4e91b1b
commit
3a23c54a91
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…
Reference in a new issue