From 1ffb628a78d2ef027247bf2891dcb0e6f4763a49 Mon Sep 17 00:00:00 2001 From: Iceee Date: Fri, 11 Jul 2014 01:33:46 -0500 Subject: [PATCH] Don't tick chests v3 - Now with more not-ticking As always, thanks Ice --- ...6-Configurable-nerf-for-TNT-cannons.patch} | 2 +- ...sts.patch => 0027-Don-t-tick-chests.patch} | 40 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) rename CraftBukkit-Patches/{0027-Configurable-nerf-for-TNT-cannons.patch => 0026-Configurable-nerf-for-TNT-cannons.patch} (96%) rename CraftBukkit-Patches/{0026-Don-t-tick-chests.patch => 0027-Don-t-tick-chests.patch} (73%) diff --git a/CraftBukkit-Patches/0027-Configurable-nerf-for-TNT-cannons.patch b/CraftBukkit-Patches/0026-Configurable-nerf-for-TNT-cannons.patch similarity index 96% rename from CraftBukkit-Patches/0027-Configurable-nerf-for-TNT-cannons.patch rename to CraftBukkit-Patches/0026-Configurable-nerf-for-TNT-cannons.patch index 3ba2b3225..e98e528f0 100644 --- a/CraftBukkit-Patches/0027-Configurable-nerf-for-TNT-cannons.patch +++ b/CraftBukkit-Patches/0026-Configurable-nerf-for-TNT-cannons.patch @@ -1,4 +1,4 @@ -From 0b29096d2b5508950db82e05b7c85dc797c9fa5b Mon Sep 17 00:00:00 2001 +From 4c36cb590ffc1b03d3c727375ee7ff2a5ad35bbf Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 9 Jul 2014 17:38:48 -0500 Subject: [PATCH] Configurable nerf for TNT cannons diff --git a/CraftBukkit-Patches/0026-Don-t-tick-chests.patch b/CraftBukkit-Patches/0027-Don-t-tick-chests.patch similarity index 73% rename from CraftBukkit-Patches/0026-Don-t-tick-chests.patch rename to CraftBukkit-Patches/0027-Don-t-tick-chests.patch index c94197630..289bea16d 100644 --- a/CraftBukkit-Patches/0026-Don-t-tick-chests.patch +++ b/CraftBukkit-Patches/0027-Don-t-tick-chests.patch @@ -1,43 +1,42 @@ -From 755651ac280d460be4b612e7bd9203166193c5e8 Mon Sep 17 00:00:00 2001 +From d0f260cf2b53e7ed2e64eefc42680cfc1c3b189d Mon Sep 17 00:00:00 2001 From: Iceee -Date: Tue, 8 Jul 2014 22:51:47 -0500 +Date: Fri, 11 Jul 2014 01:31:43 -0500 Subject: [PATCH] Don't tick chests diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index c900caf..dfa2ce2 100644 +index c900caf..ce612ad 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java -@@ -252,7 +252,8 @@ public class TileEntityChest extends TileEntity implements IInventory { +@@ -249,6 +249,8 @@ public class TileEntityChest extends TileEntity implements IInventory { + } + + public void h() { ++ // PaperSpigot start - Don't tick chests at all, period ++ /* super.h(); if (this.world == null) return; // CraftBukkit this.i(); -- ++this.ticks; -+ // PaperSpigot start - Don't tick chests -+ /* ++this.ticks; - float f; - - if (!this.world.isStatic && this.o != 0 && (this.ticks + this.x + this.y + this.z) % 200 == 0) { -@@ -326,7 +327,7 @@ public class TileEntityChest extends TileEntity implements IInventory { - if (this.m < 0.0F) { +@@ -327,6 +329,7 @@ public class TileEntityChest extends TileEntity implements IInventory { this.m = 0.0F; } -- } -+ } */ + } ++ */ } public boolean c(int i, int j) { -@@ -349,6 +350,25 @@ public class TileEntityChest extends TileEntity implements IInventory { +@@ -349,6 +352,26 @@ public class TileEntityChest extends TileEntity implements IInventory { if (this.world == null) return; // CraftBukkit this.world.playBlockAction(this.x, this.y, this.z, this.q(), 1, this.o); -+ // PaperSpigot start - Sound handling here now that we're not ticking chests -+ float f = 0.1F; ++ // PaperSpigot start - Move chest open sound handling down here ++ this.i(); + double d0; ++ + if (this.o > 0 && this.m == 0.0F && this.i == null && this.k == null) { + double d1 = (double) this.x + 0.5D; -+ d0 = (double) this.z + 0.5D; + ++ d0 = (double) this.z + 0.5D; + if (this.l != null) { + d0 += 0.5D; + } @@ -53,11 +52,12 @@ index c900caf..dfa2ce2 100644 // CraftBukkit start - Call redstone event if (this.q() == Blocks.TRAPPED_CHEST) { int newPower = Math.max(0, Math.min(15, this.o)); -@@ -371,6 +391,25 @@ public class TileEntityChest extends TileEntity implements IInventory { +@@ -371,6 +394,26 @@ public class TileEntityChest extends TileEntity implements IInventory { if (this.world == null) return; // CraftBukkit this.world.playBlockAction(this.x, this.y, this.z, this.q(), 1, this.o); -+ // PaperSpigot start - Sound handling here now that we're not ticking chests ++ // PaperSpigot start - Move chest close sound handling down here ++ this.i(); + double d0; + + if (this.o == 0 && this.i == null && this.k == null) {