public class StackHelper extends java.lang.Object implements IStackHelper
| Constructor and Description |
|---|
StackHelper() |
| Modifier and Type | Method and Description |
|---|---|
int |
addStack(net.minecraft.inventory.Container container,
java.util.Collection<java.lang.Integer> slotIndexes,
net.minecraft.item.ItemStack stack,
boolean doAdd) |
java.util.List<net.minecraft.item.ItemStack> |
condenseStacks(java.util.Collection<net.minecraft.item.ItemStack> stacks) |
java.util.List<net.minecraft.item.ItemStack> |
containsSets(java.util.Collection<net.minecraft.item.ItemStack> required,
java.util.Collection<net.minecraft.item.ItemStack> offered)
Counts how many full sets are contained in the passed stock.
|
net.minecraft.item.ItemStack |
containsStack(java.lang.Iterable<net.minecraft.item.ItemStack> stacks,
net.minecraft.item.ItemStack contains) |
net.minecraft.item.ItemStack |
containsStack(java.lang.Iterable<net.minecraft.item.ItemStack> stacks,
java.lang.Iterable<net.minecraft.item.ItemStack> contains) |
java.util.List<net.minecraft.item.ItemStack> |
getAllSubtypes(java.lang.Iterable stacks)
Expands an Iterable, which may contain ItemStacks or more Iterables, and
returns all the subtypes of itemStacks if they have wildcard meta value.
|
java.util.List<net.minecraft.item.ItemStack> |
getSubtypes(net.minecraft.item.Item item,
int stackSize) |
java.util.List<net.minecraft.item.ItemStack> |
getSubtypes(net.minecraft.item.ItemStack itemStack)
Returns all the subtypes of itemStack if it has a wildcard meta value.
|
java.lang.String |
getUniqueIdentifierForStack(net.minecraft.item.ItemStack stack) |
java.lang.String |
getUniqueIdentifierForStack(net.minecraft.item.ItemStack stack,
boolean wildcard) |
java.util.List<java.lang.String> |
getUniqueIdentifiersWithWildcard(net.minecraft.item.ItemStack itemStack) |
boolean |
isIdentical(net.minecraft.item.ItemStack lhs,
net.minecraft.item.ItemStack rhs) |
java.util.List<net.minecraft.item.ItemStack> |
removeDuplicateItemStacks(java.lang.Iterable<net.minecraft.item.ItemStack> stacks) |
java.util.List<net.minecraft.item.ItemStack> |
toItemStackList(java.lang.Object stacks)
Flattens ItemStacks, OreDict Strings, and Iterables into a list of ItemStacks.
|
@Nonnull
public java.util.List<net.minecraft.item.ItemStack> removeDuplicateItemStacks(@Nonnull
java.lang.Iterable<net.minecraft.item.ItemStack> stacks)
@Nullable
public net.minecraft.item.ItemStack containsStack(@Nullable
java.lang.Iterable<net.minecraft.item.ItemStack> stacks,
@Nullable
java.lang.Iterable<net.minecraft.item.ItemStack> contains)
@Nullable
public net.minecraft.item.ItemStack containsStack(@Nullable
java.lang.Iterable<net.minecraft.item.ItemStack> stacks,
@Nullable
net.minecraft.item.ItemStack contains)
@Nonnull public java.util.List<net.minecraft.item.ItemStack> condenseStacks(java.util.Collection<net.minecraft.item.ItemStack> stacks)
@Nullable
public java.util.List<net.minecraft.item.ItemStack> containsSets(java.util.Collection<net.minecraft.item.ItemStack> required,
java.util.Collection<net.minecraft.item.ItemStack> offered)
public boolean isIdentical(@Nullable
net.minecraft.item.ItemStack lhs,
@Nullable
net.minecraft.item.ItemStack rhs)
@Nonnull
public java.util.List<net.minecraft.item.ItemStack> getSubtypes(@Nullable
net.minecraft.item.ItemStack itemStack)
IStackHelpergetSubtypes in interface IStackHelper@Nonnull
public java.util.List<net.minecraft.item.ItemStack> getSubtypes(@Nonnull
net.minecraft.item.Item item,
int stackSize)
@Nonnull
public java.util.List<net.minecraft.item.ItemStack> getAllSubtypes(@Nullable
java.lang.Iterable stacks)
IStackHelpergetAllSubtypes in interface IStackHelper@Nonnull
public java.util.List<net.minecraft.item.ItemStack> toItemStackList(@Nullable
java.lang.Object stacks)
IStackHelpertoItemStackList in interface IStackHelper@Nonnull
public java.lang.String getUniqueIdentifierForStack(@Nonnull
net.minecraft.item.ItemStack stack)
@Nonnull
public java.lang.String getUniqueIdentifierForStack(@Nonnull
net.minecraft.item.ItemStack stack,
boolean wildcard)
@Nonnull
public java.util.List<java.lang.String> getUniqueIdentifiersWithWildcard(@Nonnull
net.minecraft.item.ItemStack itemStack)
public int addStack(net.minecraft.inventory.Container container,
java.util.Collection<java.lang.Integer> slotIndexes,
net.minecraft.item.ItemStack stack,
boolean doAdd)