public final class ChangingItemStack extends ChangingObject<net.minecraft.item.ItemStack>
ItemStack
that changes between a specified list of stacks. Useful for displaying possible inputs
or outputs for recipes that use the oredictionary, or recipes that vary the output depending on the metadata of the
input (for example a pipe colouring recipe)options
Constructor and Description |
---|
ChangingItemStack(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> stacks)
Creates a stack list that iterates through all of the given stacks.
|
ChangingItemStack(java.lang.String oreId) |
Modifier and Type | Method and Description |
---|---|
protected int |
computeHash() |
static ChangingItemStack |
create(net.minecraft.item.ItemStack stack)
Creates a changing item stack that iterates through all sub-item variants of the specified stack, if its
metadata is equal to
OreDictionary.WILDCARD_VALUE |
boolean |
matches(net.minecraft.item.ItemStack target) |
equals, get, get, hashCode, setTimeGap
public ChangingItemStack(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> stacks)
stacks
- The list to iterate through.public ChangingItemStack(java.lang.String oreId)
public static ChangingItemStack create(@Nonnull net.minecraft.item.ItemStack stack)
OreDictionary.WILDCARD_VALUE
stack
- the stack to check.protected int computeHash()
computeHash
in class ChangingObject<net.minecraft.item.ItemStack>
public boolean matches(net.minecraft.item.ItemStack target)