Update to Minecraft 1.9

This commit is contained in:
md_5
2016-03-01 08:32:46 +11:00
parent e1ebe524a7
commit aa008dff0f
305 changed files with 6684 additions and 6105 deletions

View File

@@ -13,7 +13,7 @@
+import org.bukkit.inventory.Inventory;
+// CraftBukkit end
+
public class TileEntityHopper extends TileEntityContainer implements IHopper, IUpdatePlayerListBox {
public class TileEntityHopper extends TileEntityLootable implements IHopper, ITickable {
private ItemStack[] items = new ItemStack[5];
private String f;
@@ -47,7 +47,7 @@
public TileEntityHopper() {}
public void a(NBTTagCompound nbttagcompound) {
@@ -120,7 +154,7 @@
@@ -100,7 +134,7 @@
}
public int getMaxStackSize() {
@@ -56,7 +56,7 @@
}
public boolean a(EntityHuman entityhuman) {
@@ -216,10 +250,35 @@
@@ -196,10 +230,35 @@
for (int i = 0; i < this.getSize(); ++i) {
if (this.getItem(i) != null) {
ItemStack itemstack = this.getItem(i).cloneItemStack();
@@ -78,7 +78,7 @@
+ this.getWorld().getServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) {
+ this.setItem(i, itemstack);
+ this.d(8); // Delay hopper checks
+ this.setCooldown(8); // Delay hopper checks
+ return false;
+ }
+ ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection);
@@ -94,7 +94,7 @@
return true;
}
@@ -330,10 +389,41 @@
@@ -310,10 +369,41 @@
if (itemstack != null && b(iinventory, itemstack, i, enumdirection)) {
ItemStack itemstack1 = itemstack.cloneItemStack();
@@ -118,9 +118,9 @@
+ iinventory.setItem(i, itemstack1);
+
+ if (ihopper instanceof TileEntityHopper) {
+ ((TileEntityHopper) ihopper).d(8); // Delay hopper checks
+ ((TileEntityHopper) ihopper).setCooldown(8); // Delay hopper checks
+ } else if (ihopper instanceof EntityMinecartHopper) {
+ ((EntityMinecartHopper) ihopper).m(4); // Delay hopper minecart checks
+ ((EntityMinecartHopper) ihopper).setCooldown(4); // Delay hopper minecart checks
+ }
+
+ return false;
@@ -138,7 +138,7 @@
return true;
}
@@ -349,6 +439,13 @@
@@ -329,6 +419,13 @@
if (entityitem == null) {
return false;
} else {