geforkt von Mirrors/Paper
b62dfa0bf9
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
36 Zeilen
1.3 KiB
Diff
36 Zeilen
1.3 KiB
Diff
From a053053de86c590dc6f65b0f9746fe8e40a26509 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 15 Aug 2018 01:16:34 -0400
|
|
Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
index 76d395c4ed..12c6d850d2 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
@@ -99,7 +99,12 @@ public class CraftChunk implements Chunk {
|
|
return entities;
|
|
}
|
|
|
|
+ // Paper start
|
|
public BlockState[] getTileEntities() {
|
|
+ return getTileEntities(true);
|
|
+ }
|
|
+ public BlockState[] getTileEntities(boolean useSnapshot) {
|
|
+ // Paper end
|
|
int index = 0;
|
|
net.minecraft.server.Chunk chunk = getHandle();
|
|
|
|
@@ -111,7 +116,7 @@ public class CraftChunk implements Chunk {
|
|
}
|
|
|
|
BlockPosition position = (BlockPosition) obj;
|
|
- entities[index++] = worldServer.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState();
|
|
+ entities[index++] = worldServer.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState(useSnapshot); // Paper
|
|
}
|
|
|
|
return entities;
|
|
--
|
|
2.19.0
|
|
|