Update to Minecraft 1.8.3

By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
CraftBukkit/Spigot
2015-02-26 22:41:06 +00:00
parent d789ce91d4
commit 85be409b13
347 changed files with 5027 additions and 5465 deletions

View File

@@ -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));