Don't tick chests v3 - Now with more not-ticking

As always, thanks Ice
This commit is contained in:
Iceee 2014-07-11 01:33:46 -05:00
parent 59643f90bc
commit 59e9c61437
2 changed files with 14 additions and 14 deletions

View File

@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Tue, 8 Jul 2014 22:51:47 -0500
Date: Fri, 11 Jul 2014 01:31:43 -0500
Subject: [PATCH] Don't tick chests
@ -9,21 +9,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -0,0 +0,0 @@ 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) {
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntity implements IInventory {
if (this.m < 0.0F) {
this.m = 0.0F;
}
- }
+ } */
}
+ */
}
public boolean c(int i, int j) {
@ -31,13 +29,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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;
+ }
@ -57,7 +56,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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) {