Add in code to support the bukkit fun
This commit is contained in:
parent
f12f8b1c31
commit
554d6c7005
|
@ -3,13 +3,18 @@ package cpw.mods.ironchest;
|
|||
import net.minecraft.src.Container;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.IInventory;
|
||||
import net.minecraft.src.InventoryPlayer;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.Slot;
|
||||
|
||||
public class ContainerIronChestBase extends Container {
|
||||
private IronChestType type;
|
||||
private EntityPlayer player;
|
||||
private IInventory chest;
|
||||
|
||||
public ContainerIronChestBase(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize) {
|
||||
chest = chestInventory;
|
||||
player = ((InventoryPlayer) playerInventory).player;
|
||||
this.type = type;
|
||||
chestInventory.openChest();
|
||||
layoutContainer(playerInventory, chestInventory, type, xSize, ySize);
|
||||
|
@ -34,8 +39,7 @@ public class ContainerIronChestBase extends Container {
|
|||
{
|
||||
return null;
|
||||
}
|
||||
} else
|
||||
if(!mergeItemStack(itemstack1, 0, type.size, false))
|
||||
} else if (!mergeItemStack(itemstack1, 0, type.size, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -81,6 +85,11 @@ public class ContainerIronChestBase extends Container {
|
|||
addSlot(new Slot(playerInventory, hotbarSlot, leftCol + hotbarSlot * 18, ySize - 24));
|
||||
}
|
||||
}
|
||||
|
||||
private IInventory chest;
|
||||
public EntityPlayer getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public IInventory getInventory() {
|
||||
return chest;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -382,4 +382,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
public void setMaxStackSize(int size) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue