mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 02:10:30 +01:00
459987d69f
improved the water code so that immunity wont trigger if the entity has the water pathfinder system active, so this improves support for all entities that know how to behave in water. Merged 2 EAR patches together, and removed an MCUtil method that doesnt have a purpose anymore
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From d1cb50480f7aad995cfc80a502340961c7e623f6 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
|
|
|