fix: the server compiles

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
Mariell Hoversholm
2021-06-11 20:33:36 +02:00
parent 041a42e0e4
commit ceecde4a32
4 changed files with 186 additions and 10 deletions

View File

@@ -10,14 +10,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- 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 {
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..0000000000000000000000000000000000000000