fix: the server compiles
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
parent
088e980a80
commit
a79616b9cc
4 changed files with 196 additions and 20 deletions
|
@ -6,18 +6,18 @@ 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 94cc5b494cdbc163fb70d0f4a6708d6ca2f42288..3ef396c0a543b5724769e0b83314f332739bdff0 100644
|
||||
index bee2fa2bfbb61209381f24ed6508d3d1c73a344a..1fa190e098079522e0fe3593fa261c1b7ad4e24b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -208,7 +208,7 @@ public class PaperCommand extends Command {
|
||||
@@ -207,7 +207,7 @@ public class PaperCommand extends Command {
|
||||
ServerChunkCache chunkProviderServer = world.getChunkSource();
|
||||
|
||||
Collection<Entity> entities = world.entitiesById.values();
|
||||
entities.forEach(e -> {
|
||||
world.getAllEntities().forEach(e -> {
|
||||
- ResourceLocation key = new ResourceLocation(""); // TODO: update in next patch
|
||||
+ ResourceLocation key = e.getMinecraftKey();
|
||||
|
||||
MutablePair<Integer, Map<ChunkPos, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||
ChunkPos chunk = new ChunkPos(e.xChunk, e.zChunk);
|
||||
ChunkPos chunk = e.chunkPosition();
|
||||
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..d02bd109399d6b32cbbb5e6f9ec7e650e8299a26
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue