Capture tile entities and only place them in the event succeeds
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/Chunk.java 2015-03-15 21:30:40.204367362 +0000
|
||||
+++ src/main/java/net/minecraft/server/Chunk.java 2015-03-15 21:30:40.216367361 +0000
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/Chunk.java 2015-03-16 09:47:02.911222177 +0000
|
||||
+++ src/main/java/net/minecraft/server/Chunk.java 2015-03-16 09:47:02.911222177 +0000
|
||||
@@ -14,6 +14,9 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -112,7 +112,24 @@
|
||||
entity.die();
|
||||
}
|
||||
|
||||
@@ -697,6 +744,13 @@
|
||||
@@ -662,7 +709,15 @@
|
||||
}
|
||||
|
||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
- TileEntity tileentity = (TileEntity) this.tileEntities.get(blockposition);
|
||||
+ // CraftBukkit start
|
||||
+ TileEntity tileentity = null;
|
||||
+ if (world.captureBlockStates) {
|
||||
+ tileentity = world.capturedTileEntities.get(blockposition);
|
||||
+ }
|
||||
+ if (tileentity == null) {
|
||||
+ tileentity = (TileEntity) this.tileEntities.get(blockposition);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
if (tileentity == null) {
|
||||
if (chunk_enumtileentitystate == Chunk.EnumTileEntityState.IMMEDIATE) {
|
||||
@@ -697,6 +752,13 @@
|
||||
|
||||
tileentity.D();
|
||||
this.tileEntities.put(blockposition, tileentity);
|
||||
@@ -126,7 +143,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,7 +794,21 @@
|
||||
@@ -740,7 +802,21 @@
|
||||
}
|
||||
|
||||
for (int i = 0; i < this.entitySlices.length; ++i) {
|
||||
@@ -149,7 +166,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -798,8 +866,8 @@
|
||||
@@ -798,8 +874,8 @@
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user