Use WorldServer#entitesById for entity iteration

WorldServer#globalEntityList is not the actual list of entities in a world
This commit is contained in:
Spottedleaf
2019-05-07 18:49:41 -07:00
parent 54388d8715
commit c0f92870ab
4 changed files with 11 additions and 24 deletions

View File

@@ -6,12 +6,12 @@ Subject: [PATCH] Add MinecraftKey Information to Objects
Stores the reference to the objects respective MinecraftKey
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index 841edd010f..3354fdd60d 100644
index b5f318c00d..ce190d88d6 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -0,0 +0,0 @@ public class PaperCommand extends Command {
List<Entity> entities = world.globalEntityList;
Collection<Entity> entities = world.entitiesById.values();
entities.forEach(e -> {
- MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
+ MinecraftKey key = e.getMinecraftKey();