get available slots!
This commit is contained in:
parent
5edb6ee7a6
commit
47f4946279
1 changed files with 6 additions and 0 deletions
|
@ -3,6 +3,7 @@ package appeng.parts.automation;
|
|||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.ticking.IGridTickable;
|
||||
import appeng.api.networking.ticking.TickingRequest;
|
||||
|
@ -18,6 +19,11 @@ public abstract class PartSharedItemBus extends PartUpgradeable implements IGrid
|
|||
super( c, is );
|
||||
}
|
||||
|
||||
protected int availableSlots()
|
||||
{
|
||||
return Math.min( 1 + getInstalledUpgrades( Upgrades.CAPACITY ) * 4, config.getSizeInventory() );
|
||||
}
|
||||
|
||||
public void writeToNBT(net.minecraft.nbt.NBTTagCompound extra)
|
||||
{
|
||||
super.writeToNBT( extra );
|
||||
|
|
Loading…
Reference in a new issue