summaryrefslogtreecommitdiffstats
path: root/nms-patches/World.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/World.patch')
-rw-r--r--nms-patches/World.patch54
1 files changed, 21 insertions, 33 deletions
diff --git a/nms-patches/World.patch b/nms-patches/World.patch
index 50b3b765..4686f777 100644
--- a/nms-patches/World.patch
+++ b/nms-patches/World.patch
@@ -198,7 +198,7 @@
+
+ if (!this.isClientSide && (i & 1) != 0) {
+ this.update(blockposition, oldBlock.getBlock(), true);
-+ if (newBlock.o()) {
++ if (newBlock.n()) {
+ this.updateAdjacentComparators(blockposition, newBlock.getBlock());
+ }
+ } else if (!this.isClientSide && (i & 16) == 0) {
@@ -448,27 +448,15 @@
}
}
}
-@@ -1245,7 +1494,10 @@
- int j = MathHelper.floor(entity.locZ);
- boolean flag1 = true;
-
-- if (!flag || this.isAreaLoaded(i - 32, 0, j - 32, i + 32, 0, j + 32, true)) {
-+ // CraftBukkit start - Use neighbor cache instead of looking up
-+ Chunk startingChunk = this.getChunkIfLoaded(i >> 4, j >> 4);
-+ if (!flag || (startingChunk != null && startingChunk.areNeighborsLoaded(2)) /* this.isAreaLoaded(i - b0, 0, j - b0, i + b0, 0, j + b0) */) {
-+ // CraftBukkit end
- entity.M = entity.locX;
- entity.N = entity.locY;
- entity.O = entity.locZ;
-@@ -1257,6 +1509,7 @@
- entity.leaveVehicle();
- } else {
- entity.B_();
-+ entity.postTick(); // CraftBukkit
- }
+@@ -1252,6 +1501,7 @@
+ entity.leaveVehicle();
+ } else {
+ entity.B_();
++ entity.postTick(); // CraftBukkit
}
+ }
-@@ -1549,11 +1802,18 @@
+@@ -1543,11 +1793,18 @@
}
}
@@ -487,7 +475,7 @@
TileEntity tileentity = null;
if (this.O) {
-@@ -1588,6 +1848,14 @@
+@@ -1582,6 +1839,14 @@
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
if (!this.E(blockposition)) {
if (tileentity != null && !tileentity.y()) {
@@ -502,7 +490,7 @@
if (this.O) {
tileentity.setPosition(blockposition);
Iterator iterator = this.b.iterator();
-@@ -1747,6 +2015,14 @@
+@@ -1741,6 +2006,14 @@
}
this.o = MathHelper.a(this.o, 0.0F, 1.0F);
@@ -517,7 +505,7 @@
}
}
}
-@@ -1878,7 +2154,10 @@
+@@ -1878,7 +2151,10 @@
}
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
@@ -529,7 +517,7 @@
return false;
} else {
int i = 0;
-@@ -2045,7 +2324,7 @@
+@@ -2045,7 +2321,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -538,7 +526,7 @@
arraylist.add(entity);
}
}
-@@ -2060,7 +2339,7 @@
+@@ -2060,7 +2336,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -547,7 +535,7 @@
arraylist.add(entity);
}
}
-@@ -2109,7 +2388,7 @@
+@@ -2109,7 +2385,7 @@
}
}
@@ -556,7 +544,7 @@
}
@Nullable
-@@ -2130,8 +2409,17 @@
+@@ -2130,8 +2406,17 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -575,7 +563,7 @@
++i;
}
}
-@@ -2140,12 +2428,18 @@
+@@ -2140,12 +2425,18 @@
}
public void a(Collection<Entity> collection) {
@@ -595,9 +583,9 @@
this.b(entity);
}
-@@ -2159,7 +2453,13 @@
+@@ -2159,7 +2450,13 @@
IBlockData iblockdata = this.getType(blockposition);
- AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition);
+ AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition);
- return axisalignedbb != Block.k && !this.a(axisalignedbb.a(blockposition), entity) ? false : (iblockdata.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : iblockdata.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection));
+ // CraftBukkit start - store default return
@@ -610,7 +598,7 @@
}
public int getSeaLevel() {
-@@ -2269,6 +2569,11 @@
+@@ -2269,6 +2566,11 @@
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
@@ -622,7 +610,7 @@
if (predicate.apply(entityhuman1)) {
double d5 = entityhuman1.d(d0, d1, d2);
-@@ -2437,6 +2742,16 @@
+@@ -2437,6 +2739,16 @@
public void everyoneSleeping() {}
@@ -639,7 +627,7 @@
public float h(float f) {
return (this.p + (this.q - this.p) * f) * this.j(f);
}
-@@ -2654,7 +2969,7 @@
+@@ -2654,7 +2966,7 @@
int l = j * 16 + 8 - blockposition.getZ();
boolean flag = true;