summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-25 14:04:27 +1100
committermd_5 <git@md-5.net>2016-03-25 14:04:27 +1100
commit8e5eab26554f734da63ff4deb13068a69873e949 (patch)
tree5f1056524085f347f48340fe33b51509d8b28ee2 /nms-patches
parent18658965d316a4b23d2b1e2a25b9dd84a6ac7db0 (diff)
downloadcraftbukkit-8e5eab26554f734da63ff4deb13068a69873e949.tar
craftbukkit-8e5eab26554f734da63ff4deb13068a69873e949.tar.gz
craftbukkit-8e5eab26554f734da63ff4deb13068a69873e949.tar.lz
craftbukkit-8e5eab26554f734da63ff4deb13068a69873e949.tar.xz
craftbukkit-8e5eab26554f734da63ff4deb13068a69873e949.zip
SPIGOT-1746: Tile entities may not always tick.
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/World.patch41
1 files changed, 27 insertions, 14 deletions
diff --git a/nms-patches/World.patch b/nms-patches/World.patch
index 95bd5961..e758b434 100644
--- a/nms-patches/World.patch
+++ b/nms-patches/World.patch
@@ -418,7 +418,20 @@
if (this.isLoaded(tileentity1.getPosition())) {
Chunk chunk = this.getChunkAtWorldCoords(tileentity1.getPosition());
-@@ -1231,7 +1468,10 @@
+@@ -1184,6 +1421,12 @@
+
+ chunk.a(tileentity1.getPosition(), tileentity1);
+ this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
++ // CraftBukkit start
++ // From above, don't screw this up - SPIGOT-1746
++ if (!this.tileEntityList.contains(tileentity1)) {
++ this.a(tileentity1);
++ }
++ // CraftBukkit end
+ }
+ }
+ }
+@@ -1231,7 +1474,10 @@
int j = MathHelper.floor(entity.locZ);
byte b0 = 32;
@@ -430,7 +443,7 @@
entity.M = entity.locX;
entity.N = entity.locY;
entity.O = entity.locZ;
-@@ -1570,10 +1810,18 @@
+@@ -1570,10 +1816,18 @@
}
}
@@ -449,7 +462,7 @@
TileEntity tileentity = null;
int i;
TileEntity tileentity1;
-@@ -1608,6 +1856,14 @@
+@@ -1608,6 +1862,14 @@
public void setTileEntity(BlockPosition blockposition, TileEntity tileentity) {
if (tileentity != null && !tileentity.x()) {
@@ -464,7 +477,7 @@
if (this.M) {
tileentity.a(blockposition);
Iterator iterator = this.b.iterator();
-@@ -1762,6 +2018,14 @@
+@@ -1762,6 +2024,14 @@
}
this.o = MathHelper.a(this.o, 0.0F, 1.0F);
@@ -479,7 +492,7 @@
}
}
}
-@@ -1893,7 +2157,10 @@
+@@ -1893,7 +2163,10 @@
}
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
@@ -491,7 +504,7 @@
return false;
} else {
int i = 0;
-@@ -2058,7 +2325,7 @@
+@@ -2058,7 +2331,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -500,7 +513,7 @@
arraylist.add(entity);
}
}
-@@ -2073,7 +2340,7 @@
+@@ -2073,7 +2346,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -509,7 +522,7 @@
arraylist.add(entity);
}
}
-@@ -2121,7 +2388,7 @@
+@@ -2121,7 +2394,7 @@
}
}
@@ -518,7 +531,7 @@
}
public Entity getEntity(int i) {
-@@ -2141,8 +2408,17 @@
+@@ -2141,8 +2414,17 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -538,7 +551,7 @@
++i;
}
}
-@@ -2151,12 +2427,18 @@
+@@ -2151,12 +2433,18 @@
}
public void a(Collection<Entity> collection) {
@@ -558,7 +571,7 @@
this.b(entity);
}
-@@ -2170,7 +2452,13 @@
+@@ -2170,7 +2458,13 @@
IBlockData iblockdata = this.getType(blockposition);
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition);
@@ -573,7 +586,7 @@
}
public int K() {
-@@ -2270,6 +2558,11 @@
+@@ -2270,6 +2564,11 @@
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
@@ -585,7 +598,7 @@
if ((IEntitySelector.d.apply(entityhuman1) || !flag) && (IEntitySelector.e.apply(entityhuman1) || flag)) {
double d5 = entityhuman1.e(d0, d1, d2);
-@@ -2433,6 +2726,16 @@
+@@ -2433,6 +2732,16 @@
public void everyoneSleeping() {}
@@ -602,7 +615,7 @@
public float h(float f) {
return (this.p + (this.q - this.p) * f) * this.j(f);
}
-@@ -2648,7 +2951,7 @@
+@@ -2648,7 +2957,7 @@
int l = j * 16 + 8 - blockposition.getZ();
short short0 = 128;