Fix accidental reversion of patches, oops
This commit is contained in:
@@ -6,21 +6,8 @@ Subject: [PATCH] Provide E/TE/Chunk count stat methods
|
||||
Provides counts without the ineffeciency of using .getEntities().size()
|
||||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index ff75bb3c6..5ed0fbe5a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
public class WorldServer extends World {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
- private final List<Entity> globalEntityList = Lists.newArrayList();
|
||||
+ public final List<Entity> globalEntityList = Lists.newArrayList(); // Paper - private -> public
|
||||
public final Int2ObjectMap<Entity> entitiesById = new Int2ObjectLinkedOpenHashMap();
|
||||
private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
|
||||
private final Queue<Entity> entitiesToAdd = Queues.newArrayDeque();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index b8de76007..c79b0f42a 100644
|
||||
index b8de76007..b3a77ec3c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
@@ -30,7 +17,7 @@ index b8de76007..c79b0f42a 100644
|
||||
+ // Paper start - Provide fast information methods
|
||||
+ // TODO review these changes
|
||||
+ public int getEntityCount() {
|
||||
+ return world.globalEntityList.size();
|
||||
+ return world.entitiesById.size();
|
||||
+ }
|
||||
+ public int getTileEntityCount() {
|
||||
+ // We don't use the full world tile entity list, so we must iterate chunks
|
||||
|
||||
Reference in New Issue
Block a user