public class ItemHelpers
extends java.lang.Object
| Constructor and Description |
|---|
ItemHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.item.ItemStack |
getBloodBucket() |
static int |
getNBTInt(net.minecraft.item.ItemStack itemStack,
java.lang.String tag)
Get the integer value of the given ItemStack.
|
static boolean |
isActivated(net.minecraft.item.ItemStack itemStack)
Check if the given item is activated.
|
static void |
setNBTInt(net.minecraft.item.ItemStack itemStack,
int integer,
java.lang.String tag)
Set the integer value of the given ItemStack for the given tag.
|
static void |
toggleActivation(net.minecraft.item.ItemStack itemStack)
Toggle activation for the given item.
|
static net.minecraft.item.ItemStack |
tryFillContainerForPlayer(net.minecraftforge.fluids.capability.IFluidHandler toDrain,
net.minecraft.item.ItemStack itemStack,
net.minecraft.item.ItemStack toFill,
net.minecraftforge.fluids.FluidStack tickFluid,
net.minecraft.entity.player.EntityPlayer player)
Tries to fill a container item in a player inventory.
|
static void |
updateAutoFill(net.minecraftforge.fluids.capability.IFluidHandler toDrain,
net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity)
Run an auto-fill tick for filling currently held container items from this item.
|
public static boolean isActivated(net.minecraft.item.ItemStack itemStack)
itemStack - The item to checkpublic static void toggleActivation(net.minecraft.item.ItemStack itemStack)
itemStack - The item to toggle.public static int getNBTInt(net.minecraft.item.ItemStack itemStack,
java.lang.String tag)
itemStack - The item to check.tag - The tag in NBT for storing this value.public static void setNBTInt(net.minecraft.item.ItemStack itemStack,
int integer,
java.lang.String tag)
itemStack - The item to change.integer - The new integer value.tag - The tag in NBT for storing this value.public static void updateAutoFill(net.minecraftforge.fluids.capability.IFluidHandler toDrain,
net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity)
toDrain - The item handler to drain from.itemStack - The item stack to fill from.world - The world.entity - The entity that holds this item.public static net.minecraft.item.ItemStack tryFillContainerForPlayer(net.minecraftforge.fluids.capability.IFluidHandler toDrain,
net.minecraft.item.ItemStack itemStack,
net.minecraft.item.ItemStack toFill,
net.minecraftforge.fluids.FluidStack tickFluid,
net.minecraft.entity.player.EntityPlayer player)
toDrain - The item handler to drain from.itemStack - The stack to drain from.toFill - The container to try to fill.tickFluid - The fluid to fill with.player - The player that is the owner of toFill.public static net.minecraft.item.ItemStack getBloodBucket()