diff --git a/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch index 35e948cdb4..10ab014d38 100644 --- a/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0020-Optimize-TileEntity-Ticking.patch @@ -1,11 +1,11 @@ -From e240cad9f99160a8e690e0b7bc1f32b8557ea6d1 Mon Sep 17 00:00:00 2001 +From 3813aa00f37de429ecf9ce36d58c67d658de18fb Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 22:01:19 -0600 Subject: [PATCH] Optimize TileEntity Ticking diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 8f988c3..e7829c5 100644 +index 8f988c3..4b510b9 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -8,17 +8,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -52,7 +52,7 @@ index 8f988c3..e7829c5 100644 } public boolean c(int i, int j) { -@@ -331,6 +334,28 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II +@@ -331,6 +334,29 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added ++this.l; @@ -65,6 +65,7 @@ index 8f988c3..e7829c5 100644 + + double d0 = (double) this.position.getZ() + 0.5D; + double d1 = (double) this.position.getX() + 0.5D; ++ int yLoc = this.position.getY(); + + if (this.i != null) { + d0 += 0.5D; @@ -74,14 +75,14 @@ index 8f988c3..e7829c5 100644 + d1 += 0.5D; + } + -+ this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); ++ this.world.a((EntityHuman) null, d1, (double) yLoc + 0.5D, d0, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + } + // Paper end + if (this.world == null) return; // CraftBukkit this.world.playBlockAction(this.position, this.getBlock(), 1, this.l); -@@ -354,6 +379,33 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II +@@ -354,6 +380,34 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added --this.l; if (this.world == null) return; // CraftBukkit @@ -98,6 +99,7 @@ index 8f988c3..e7829c5 100644 + + double d0 = (double) this.getPosition().getX() + 0.5D; + double d2 = (double) this.getPosition().getZ() + 0.5D; ++ int yLoc = this.position.getY(); + + if (this.i != null) { + d2 += 0.5D; @@ -107,8 +109,8 @@ index 8f988c3..e7829c5 100644 + d0 += 0.5D; + } + -+ this.world.a((EntityHuman) null, d0, (double) j + 0.5D, d2, SoundEffects.V, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); -+ this.j = 0.0F; ++ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.V, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); ++ this.j = 0.0F; + } + // Paper end + diff --git a/paperclip.sh b/paperclip.sh index e73e95b721..5502cb1fe7 100755 --- a/paperclip.sh +++ b/paperclip.sh @@ -11,4 +11,4 @@ echo "" echo "" echo "" echo "Build success!" -echo "Copied final jar to $(pwd)/Paperclip.jar" \ No newline at end of file +echo "Copied final jar to $(pwd)/paperclip.jar"