Update CraftBukkit to Minecraft 1.3.1

This commit is contained in:
feildmaster
2012-07-29 02:33:13 -05:00
committed by Travis Watkins
parent 08e2923bd4
commit a43d621c01
240 changed files with 10763 additions and 9150 deletions

View File

@@ -9,7 +9,7 @@ public class ContainerWorkbench extends Container {
public InventoryCrafting craftInventory; // CraftBukkit - move initialization into constructor
public IInventory resultInventory; // CraftBukkit - move initialization into constructor
private World c;
private World g;
private int h;
private int i;
private int j;
@@ -25,7 +25,7 @@ public class ContainerWorkbench extends Container {
this.craftInventory.resultInventory = this.resultInventory;
this.player = playerinventory;
// CraftBukkit end
this.c = world;
this.g = world;
this.h = i;
this.i = j;
this.j = k;
@@ -69,7 +69,7 @@ public class ContainerWorkbench extends Container {
public void a(EntityHuman entityhuman) {
super.a(entityhuman);
if (!this.c.isStatic) {
if (!this.g.isStatic) {
for (int i = 0; i < 9; ++i) {
ItemStack itemstack = this.craftInventory.splitWithoutUpdate(i);
@@ -80,16 +80,16 @@ public class ContainerWorkbench extends Container {
}
}
public boolean b(EntityHuman entityhuman) {
public boolean c(EntityHuman entityhuman) {
if (!this.checkReachable) return true; // CraftBukkit
return this.c.getTypeId(this.h, this.i, this.j) != Block.WORKBENCH.id ? false : entityhuman.e((double) this.h + 0.5D, (double) this.i + 0.5D, (double) this.j + 0.5D) <= 64.0D;
return this.g.getTypeId(this.h, this.i, this.j) != Block.WORKBENCH.id ? false : entityhuman.e((double) this.h + 0.5D, (double) this.i + 0.5D, (double) this.j + 0.5D) <= 64.0D;
}
public ItemStack a(int i) {
public ItemStack b(int i) {
ItemStack itemstack = null;
Slot slot = (Slot) this.e.get(i);
Slot slot = (Slot) this.b.get(i);
if (slot != null && slot.c()) {
if (slot != null && slot.d()) {
ItemStack itemstack1 = slot.getItem();
itemstack = itemstack1.cloneItemStack();
@@ -114,14 +114,14 @@ public class ContainerWorkbench extends Container {
if (itemstack1.count == 0) {
slot.set((ItemStack) null);
} else {
slot.d();
slot.e();
}
if (itemstack1.count == itemstack.count) {
return null;
}
slot.c(itemstack1);
slot.b(itemstack1);
}
return itemstack;
@@ -132,6 +132,7 @@ public class ContainerWorkbench extends Container {
if (bukkitEntity != null) {
return bukkitEntity;
}
CraftInventoryCrafting inventory = new CraftInventoryCrafting(this.craftInventory, this.resultInventory);
bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
return bukkitEntity;