diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-02-26 22:41:06 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-03-04 09:48:58 +0000 |
commit | d8a9c7be4227b2243968b63ab7cc7a00098c93ad (patch) | |
tree | 554a08a5f23ffa5dd66a28247d6358515b1ffb7a /nms-patches/TileEntityChest.patch | |
parent | 33d5de312e9fcc8aec3fc53136658cb6920562aa (diff) | |
download | craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.tar craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.tar.gz craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.tar.lz craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.tar.xz craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.zip |
Update to Minecraft 1.8.3
Diffstat (limited to 'nms-patches/TileEntityChest.patch')
-rw-r--r-- | nms-patches/TileEntityChest.patch | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/nms-patches/TileEntityChest.patch b/nms-patches/TileEntityChest.patch index a5e476f0..ac339705 100644 --- a/nms-patches/TileEntityChest.patch +++ b/nms-patches/TileEntityChest.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/TileEntityChest.java 2014-11-28 17:43:43.393707428 +0000 -+++ src/main/java/net/minecraft/server/TileEntityChest.java 2014-11-28 17:38:17.000000000 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/TileEntityChest.java 2015-02-26 22:40:23.127608134 +0000 ++++ src/main/java/net/minecraft/server/TileEntityChest.java 2015-02-26 22:40:23.127608134 +0000 @@ -3,6 +3,11 @@ import java.util.Iterator; import java.util.List; @@ -12,11 +12,10 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlayerListBox, IInventory { private ItemStack[] items = new ItemStack[27]; -@@ -19,6 +24,31 @@ - private String p; +@@ -20,6 +25,31 @@ public TileEntityChest() {} -+ + + // CraftBukkit start - add fields and methods + public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>(); + private int maxStack = MAX_STACK; @@ -41,9 +40,10 @@ + maxStack = size; + } + // CraftBukkit end - ++ public int getSize() { return 27; + } @@ -125,10 +155,11 @@ } @@ -57,11 +57,10 @@ return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D; } -@@ -304,9 +335,22 @@ +@@ -304,9 +335,21 @@ if (this.l < 0) { this.l = 0; } -+ + int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added ++this.l; @@ -80,16 +79,15 @@ this.world.applyPhysics(this.position, this.w()); this.world.applyPhysics(this.position.down(), this.w()); } -@@ -315,8 +359,21 @@ +@@ -315,8 +358,20 @@ public void closeContainer(EntityHuman entityhuman) { if (!entityhuman.v() && this.w() instanceof BlockChest) { + 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 this.world.playBlockAction(this.position, this.w(), 1, this.l); -+ ++ + // CraftBukkit start - Call redstone event + if (this.w() == Blocks.TRAPPED_CHEST) { + int newPower = Math.max(0, Math.min(15, this.l)); |