[Bleeding] Implemented Inventory.{get,set}MaxStackSize(). Addresses BUKKIT-1076

- Custom inventories also respect this setting now.
This commit is contained in:
Celtic Minstrel
2012-03-14 10:00:54 -04:00
committed by EvilSeph
parent 66e067f373
commit 5c8fd4995f
14 changed files with 105 additions and 26 deletions

View File

@@ -23,6 +23,7 @@ public class TileEntityBrewingStand extends TileEntity implements IInventory {
// CraftBukkit start
public List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private int maxStack = 1;
public void onOpen(CraftHumanEntity who) {
transaction.add(who);
@@ -39,6 +40,10 @@ public class TileEntityBrewingStand extends TileEntity implements IInventory {
public ItemStack[] getContents() {
return this.items;
}
public void setMaxStackSize(int size) {
maxStack = size;
}
// CraftBukkit end
public String getName() {
@@ -228,7 +233,7 @@ public class TileEntityBrewingStand extends TileEntity implements IInventory {
}
public int getMaxStackSize() {
return 1;
return maxStack; // CraftBukkit
}
public boolean a(EntityHuman entityhuman) {