mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-03 18:53:43 +01:00 
			
		
		
		
	Tweak entity counting
This commit is contained in:
		@@ -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();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user