Initial framework for the item routing is completed
This commit is contained in:
parent
eaefd89287
commit
652b6a45fd
12 changed files with 256 additions and 47 deletions
|
@ -41,10 +41,22 @@ public class GhostItemHelper
|
|||
setItemGhostAmount(stack, amount);
|
||||
}
|
||||
|
||||
public static void decrementGhostAmout(ItemStack stack, int value)
|
||||
public static void decrementGhostAmount(ItemStack stack, int value)
|
||||
{
|
||||
int amount = getItemGhostAmount(stack);
|
||||
amount -= value;
|
||||
setItemGhostAmount(stack, amount);
|
||||
}
|
||||
|
||||
public static ItemStack getStackFromGhost(ItemStack ghostStack)
|
||||
{
|
||||
ItemStack newStack = ghostStack.copy();
|
||||
NBTHelper.checkNBT(newStack);
|
||||
NBTTagCompound tag = newStack.getTagCompound();
|
||||
int amount = getItemGhostAmount(ghostStack);
|
||||
tag.removeTag(Constants.NBT.GHOST_STACK_SIZE);
|
||||
newStack.stackSize = amount;
|
||||
|
||||
return newStack;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue