public class UpgradableItemUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NBT_CREATIVE |
static java.lang.String |
NBT_UPGRADE_TAG |
static int |
UPGRADE_INV_SIZE |
| Constructor and Description |
|---|
UpgradableItemUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addUpgradeInformation(net.minecraft.item.ItemStack iStack,
java.util.List<net.minecraft.util.text.ITextComponent> textList,
net.minecraft.client.util.ITooltipFlag flag)
Add a standardized tooltip listing the installed upgrades in the given item.
|
static java.util.List<java.lang.Integer> |
getUpgradeList(net.minecraft.item.ItemStack stack,
EnumUpgrade... upgradeList) |
static net.minecraftforge.items.ItemStackHandler |
getUpgrades(net.minecraft.item.ItemStack stack) |
static int |
getUpgrades(net.minecraft.item.ItemStack stack,
EnumUpgrade upgrade) |
static net.minecraft.item.ItemStack[] |
getUpgradeStacks(net.minecraft.item.ItemStack stack)
Retrieves the upgrades currently installed on the given itemstack.
|
static boolean |
hasCreativeUpgrade(net.minecraft.item.ItemStack stack) |
static void |
setUpgrades(net.minecraft.item.ItemStack stack,
net.minecraftforge.items.ItemStackHandler handler)
Store a collection of upgrades into an item stack.
|
public static final java.lang.String NBT_CREATIVE
public static final java.lang.String NBT_UPGRADE_TAG
public static final int UPGRADE_INV_SIZE
public static void addUpgradeInformation(net.minecraft.item.ItemStack iStack,
java.util.List<net.minecraft.util.text.ITextComponent> textList,
net.minecraft.client.util.ITooltipFlag flag)
iStack - the itemtextList - list of text to append tooltip tooflag - tooltip flagpublic static void setUpgrades(net.minecraft.item.ItemStack stack,
net.minecraftforge.items.ItemStackHandler handler)
stack - the stackhandler - an ItemStackHandler holding upgrade itemspublic static net.minecraft.item.ItemStack[] getUpgradeStacks(net.minecraft.item.ItemStack stack)
public static net.minecraftforge.items.ItemStackHandler getUpgrades(net.minecraft.item.ItemStack stack)
public static int getUpgrades(net.minecraft.item.ItemStack stack,
EnumUpgrade upgrade)
public static java.util.List<java.lang.Integer> getUpgradeList(net.minecraft.item.ItemStack stack,
EnumUpgrade... upgradeList)
public static boolean hasCreativeUpgrade(net.minecraft.item.ItemStack stack)