mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Specify stack limit for slots at creation time. Fixes equipping 10 knapsacks
This commit is contained in:
1 parent
518de71cac
commit
a0a9e222a3
2 files changed
+13
-10
No files matched your search
@@ -16,13 +16,15 @@ public class ArmorExtendedContainer extends ActiveContainer
|
||||
invPlayer = inventoryplayer;
|
||||
this.armor = armor;
|
||||
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 1, 80, 35));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 2, 116, 17));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 3, 116, 35));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 4, 152, 53));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 5, 152, 35));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 6, 152, 17));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 0, 80, 17, 1));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 1, 80, 35, 1));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 2, 116, 17, 1));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 3, 116, 35, 1));
|
||||
|
||||
// HeartCanister
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 4, 152, 53, 10));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 5, 152, 35, 10));
|
||||
this.addSlotToContainer(new SlotAccessory(armor, 6, 152, 17, 10));
|
||||
for (int playerArmor = 0; playerArmor < 4; ++playerArmor)
|
||||
{
|
||||
this.addSlotToContainer(new SlotArmorCopy(this, inventoryplayer, inventoryplayer.getSizeInventory() - 1 - playerArmor, 98, 8 + playerArmor * 18, playerArmor));
|
||||
|
||||
@@ -7,12 +7,13 @@ import tconstruct.library.accessory.IAccessory;
|
||||
public class SlotAccessory extends Slot
|
||||
{
|
||||
private final int slotID;
|
||||
private final int slotStackLimit;
|
||||
|
||||
public SlotAccessory(IInventory par2IInventory, int par3, int par4, int par5)
|
||||
public SlotAccessory(IInventory par2IInventory, int par3, int par4, int par5, int slotStackLimit)
|
||||
{
|
||||
super(par2IInventory, par3, par4, par5);
|
||||
this.slotID = par3;
|
||||
//this.parent = container;
|
||||
this.slotStackLimit = slotStackLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21,7 +22,7 @@ public class SlotAccessory extends Slot
|
||||
*/
|
||||
public int getSlotStackLimit ()
|
||||
{
|
||||
return 10;
|
||||
return slotStackLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user