mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
fa254d2142
A recent commit has been made that caused patches to be out of order, rebuilding
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From 9cb417dcd3c77e4104ea9628013560ec19ffe518 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 0a47353b4..3238ca742 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
@@ -96,7 +96,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();
|
|
|
|
@@ -108,7 +113,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.18.0
|
|
|