Tweak entity counting

This commit is contained in:
Jesse Boyd 2016-08-07 03:52:37 +10:00
parent c99dd1e74a
commit 1ae694ff5b
2 changed files with 5 additions and 2 deletions

View File

@ -1408,6 +1408,9 @@ public class PlayerEvents extends PlotListener implements Listener {
if (cap == Integer.MAX_VALUE) { if (cap == Integer.MAX_VALUE) {
continue; continue;
} }
if (cap == 0) {
return false;
}
if (mobs == null) { if (mobs == null) {
mobs = plot.countEntities(); mobs = plot.countEntities();
} }

View File

@ -449,9 +449,9 @@ public class BukkitChunkManager extends ChunkManager {
boolean doWhole = false; boolean doWhole = false;
List<Entity> entities = null; List<Entity> entities = null;
if (size > 200) { if (size > 200 && chunks.size() > 200) {
entities = world.getEntities(); entities = world.getEntities();
if (entities.size() < 16 + size * size / 64) { if (entities.size() < 16 + size / 8) {
doWhole = true; doWhole = true;
} }
} }