Initial framework for the item routing is completed

This commit is contained in:
WayofTime 2016-01-14 14:11:16 -05:00
parent eaefd89287
commit 652b6a45fd
12 changed files with 256 additions and 47 deletions

View file

@ -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;
}
}