Updated to rename revision 02
This commit is contained in:
@@ -12,12 +12,12 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
public class InventoryLargeChest implements IInventory {
|
||||
|
||||
private String a;
|
||||
public IInventory b; // CraftBukkit - private -> public
|
||||
public IInventory c; // CraftBukkit - private -> public
|
||||
public IInventory left; // CraftBukkit - private -> public
|
||||
public IInventory right; // CraftBukkit - private -> public
|
||||
|
||||
// CraftBukkit start
|
||||
public List<HumanEntity> transaction = new ArrayList<HumanEntity>();
|
||||
|
||||
|
||||
public ItemStack[] getContents() {
|
||||
ItemStack[] result = new ItemStack[this.getSize()];
|
||||
for (int i = 0; i < result.length; i++) {
|
||||
@@ -27,21 +27,21 @@ public class InventoryLargeChest implements IInventory {
|
||||
}
|
||||
|
||||
public void onOpen(CraftHumanEntity who) {
|
||||
b.onOpen(who);
|
||||
c.onOpen(who);
|
||||
this.left.onOpen(who);
|
||||
this.right.onOpen(who);
|
||||
transaction.add(who);
|
||||
}
|
||||
|
||||
public void onClose(CraftHumanEntity who) {
|
||||
b.onClose(who);
|
||||
c.onClose(who);
|
||||
this.left.onClose(who);
|
||||
this.right.onClose(who);
|
||||
transaction.remove(who);
|
||||
}
|
||||
|
||||
|
||||
public List<HumanEntity> getViewers() {
|
||||
return transaction;
|
||||
}
|
||||
|
||||
|
||||
public InventoryHolder getOwner() {
|
||||
return null; // Double chests technically have multiple owners, so there's no sensible way to pick one
|
||||
}
|
||||
@@ -57,12 +57,12 @@ public class InventoryLargeChest implements IInventory {
|
||||
iinventory1 = iinventory;
|
||||
}
|
||||
|
||||
this.b = iinventory;
|
||||
this.c = iinventory1;
|
||||
this.left = iinventory;
|
||||
this.right = iinventory1;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return this.b.getSize() + this.c.getSize();
|
||||
return this.left.getSize() + this.right.getSize();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -70,41 +70,41 @@ public class InventoryLargeChest implements IInventory {
|
||||
}
|
||||
|
||||
public ItemStack getItem(int i) {
|
||||
return i >= this.b.getSize() ? this.c.getItem(i - this.b.getSize()) : this.b.getItem(i);
|
||||
return i >= this.left.getSize() ? this.right.getItem(i - this.left.getSize()) : this.left.getItem(i);
|
||||
}
|
||||
|
||||
public ItemStack splitStack(int i, int j) {
|
||||
return i >= this.b.getSize() ? this.c.splitStack(i - this.b.getSize(), j) : this.b.splitStack(i, j);
|
||||
return i >= this.left.getSize() ? this.right.splitStack(i - this.left.getSize(), j) : this.left.splitStack(i, j);
|
||||
}
|
||||
|
||||
public void setItem(int i, ItemStack itemstack) {
|
||||
if (i >= this.b.getSize()) {
|
||||
this.c.setItem(i - this.b.getSize(), itemstack);
|
||||
if (i >= this.left.getSize()) {
|
||||
this.right.setItem(i - this.left.getSize(), itemstack);
|
||||
} else {
|
||||
this.b.setItem(i, itemstack);
|
||||
this.left.setItem(i, itemstack);
|
||||
}
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return this.b.getMaxStackSize();
|
||||
return this.left.getMaxStackSize();
|
||||
}
|
||||
|
||||
public void update() {
|
||||
this.b.update();
|
||||
this.c.update();
|
||||
this.left.update();
|
||||
this.right.update();
|
||||
}
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
return this.b.a(entityhuman) && this.c.a(entityhuman);
|
||||
return this.left.a(entityhuman) && this.right.a(entityhuman);
|
||||
}
|
||||
|
||||
public void f() {
|
||||
this.b.f();
|
||||
this.c.f();
|
||||
this.left.f();
|
||||
this.right.f();
|
||||
}
|
||||
|
||||
public void g() {
|
||||
this.b.g();
|
||||
this.c.g();
|
||||
this.left.g();
|
||||
this.right.g();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user