Don't tick chests v3 - Now with more not-ticking
As always, thanks Ice
Dieser Commit ist enthalten in:
Ursprung
2352f9cadd
Commit
1ffb628a78
@ -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 <Zbob750@live.com>
|
||||
Date: Wed, 9 Jul 2014 17:38:48 -0500
|
||||
Subject: [PATCH] Configurable nerf for TNT cannons
|
@ -1,43 +1,42 @@
|
||||
From 755651ac280d460be4b612e7bd9203166193c5e8 Mon Sep 17 00:00:00 2001
|
||||
From d0f260cf2b53e7ed2e64eefc42680cfc1c3b189d 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
|
||||
|
||||
|
||||
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) {
|
In neuem Issue referenzieren
Einen Benutzer sperren