Further improved the routing GUI by allowing an amount to be typed into the amount bar

This commit is contained in:
WayofTime 2016-08-31 16:19:20 -04:00
parent 4a21e6cbf0
commit fd684588d4
7 changed files with 152 additions and 77 deletions

View file

@ -8,6 +8,7 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.EnumFacing;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.item.inventory.ItemInventory;
import WayofTime.bloodmagic.util.GhostItemHelper;
public class TileFilteredRoutingNode extends TileRoutingNode implements ISidedInventory
{
@ -28,6 +29,17 @@ public class TileFilteredRoutingNode extends TileRoutingNode implements ISidedIn
return getStackInSlot(index);
}
public void setGhostItemAmount(int ghostItemSlot, int amount)
{
ItemStack stack = itemInventory.getStackInSlot(ghostItemSlot);
if (stack != null)
{
GhostItemHelper.setItemGhostAmount(stack, amount);
}
this.markDirty();
}
@Override
public boolean isInventoryConnectedToSide(EnumFacing side)
{