mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
Add InventoryLogic constructor for max stack size, reconf drying rack to use it.
This commit is contained in:
1 parent
08869c23f4
commit
ca86fa895a
2 files changed
+9
-2
No files matched your search
@@ -21,7 +21,7 @@ public class DryingRackLogic extends InventoryLogic
|
|||||||
|
|
||||||
public DryingRackLogic()
|
public DryingRackLogic()
|
||||||
{
|
{
|
||||||
super(1);
|
super(1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -20,10 +20,17 @@ public abstract class InventoryLogic extends TileEntity implements IInventory
|
|||||||
{
|
{
|
||||||
protected ItemStack[] inventory;
|
protected ItemStack[] inventory;
|
||||||
protected String invName;
|
protected String invName;
|
||||||
|
protected int stackSizeLimit;
|
||||||
|
|
||||||
public InventoryLogic(int invSize)
|
public InventoryLogic(int invSize)
|
||||||
|
{
|
||||||
|
this(invSize, 64);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InventoryLogic(int invSize, int maxStackSize)
|
||||||
{
|
{
|
||||||
inventory = new ItemStack[invSize];
|
inventory = new ItemStack[invSize];
|
||||||
|
stackSizeLimit = maxStackSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Inventory management */
|
/* Inventory management */
|
||||||
@@ -48,7 +55,7 @@ public abstract class InventoryLogic extends TileEntity implements IInventory
|
|||||||
@Override
|
@Override
|
||||||
public int getInventoryStackLimit ()
|
public int getInventoryStackLimit ()
|
||||||
{
|
{
|
||||||
return 64;
|
return stackSizeLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canDropInventorySlot (int slot)
|
public boolean canDropInventorySlot (int slot)
|
||||||
|
|||||||
Reference in new issue
Block a user