public abstract class InventoryUtil
extends java.lang.Object
| Constructor and Description |
|---|
InventoryUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
addStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
boolean doAdd) |
static int |
addStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
int startSlot,
int slots,
boolean doAdd) |
static boolean |
contains(net.minecraft.inventory.IInventory inventory,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> query) |
static boolean |
contains(net.minecraft.inventory.IInventory inventory,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> query,
int startSlot,
int slots) |
static boolean |
containsPercent(net.minecraft.inventory.IInventory inventory,
float percent) |
static boolean |
containsPercent(net.minecraft.inventory.IInventory inventory,
float percent,
int slot1,
int length) |
static void |
deepCopyInventoryContents(net.minecraft.inventory.IInventory source,
net.minecraft.inventory.IInventory destination) |
static boolean |
deleteExactSet(net.minecraft.inventory.IInventory inventory,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> required) |
static void |
dropInventory(net.minecraft.inventory.IInventory inventory,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos) |
static void |
dropInventory(net.minecraft.inventory.IInventory inventory,
net.minecraft.world.World world,
double x,
double y,
double z) |
static void |
dropItemStackFromInventory(net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
double x,
double y,
double z) |
static void |
dropSockets(ISocketable socketable,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos) |
static void |
dropSockets(ISocketable socketable,
net.minecraft.world.World world,
double x,
double y,
double z) |
static net.minecraft.util.NonNullList<java.lang.String> |
getOreDictAsList(java.lang.String[][] oreDicts) |
static net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
getStacks(net.minecraft.inventory.IInventory inventory) |
static net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
getStacks(net.minecraft.inventory.IInventory inventory,
int slot1,
int length) |
static boolean |
isEmpty(net.minecraft.inventory.IInventory inventory,
int slotStart,
int slotCount) |
static boolean |
moveItemStack(net.minecraftforge.items.IItemHandler source,
net.minecraftforge.items.IItemHandler dest)
Attempts to move an ItemStack from one inventory to another.
|
static boolean |
moveItemStack(net.minecraftforge.items.IItemHandler source,
java.lang.Iterable<net.minecraftforge.items.IItemHandler> destinations)
Attempts to move an ItemStack from one inventory to another.
|
static boolean |
moveOneItemToPipe(net.minecraftforge.items.IItemHandler source,
AdjacentTileCache tileCache)
Attempts to move a single item from the source inventory into a adjacent Buildcraft pipe.
|
static boolean |
moveOneItemToPipe(net.minecraftforge.items.IItemHandler source,
AdjacentTileCache tileCache,
net.minecraft.util.EnumFacing[] directions) |
static void |
readFromNBT(net.minecraft.inventory.IInventory inventory,
net.minecraft.nbt.NBTTagCompound nbttagcompound)
The database has an inventory large enough that int must be used here instead of byte
TODO in 1.13 - remove migrations from this.
|
static net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
removeSets(net.minecraft.inventory.IInventory inventory,
int count,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> set,
net.minecraft.entity.player.EntityPlayer player,
boolean stowContainer,
boolean oreDictionary,
boolean craftingTools) |
static boolean |
removeSets(net.minecraft.inventory.IInventory inventory,
int count,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> set,
net.minecraft.entity.player.EntityPlayer player,
boolean stowContainer,
boolean oreDictionary,
boolean craftingTools,
boolean doRemove)
Removes a set of items from an inventory.
|
static net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
removeSets(net.minecraft.inventory.IInventory inventory,
int count,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> set,
net.minecraft.util.NonNullList<java.lang.String> oreDicts,
net.minecraft.entity.player.EntityPlayer player,
boolean stowContainer,
boolean craftingTools) |
static boolean |
removeSets(net.minecraft.inventory.IInventory inventory,
int count,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> set,
net.minecraft.util.NonNullList<java.lang.String> oreDicts,
net.minecraft.entity.player.EntityPlayer player,
boolean stowContainer,
boolean craftingTools,
boolean doRemove) |
static void |
stowContainerItem(net.minecraft.item.ItemStack itemstack,
net.minecraft.inventory.IInventory stowing,
int slotIndex,
net.minecraft.entity.player.EntityPlayer player) |
static boolean |
stowInInventory(net.minecraft.item.ItemStack itemstack,
net.minecraft.inventory.IInventory inventory,
boolean doAdd) |
static boolean |
stowInInventory(net.minecraft.item.ItemStack itemstack,
net.minecraft.inventory.IInventory inventory,
boolean doAdd,
int slot1,
int count) |
static boolean |
tryAddStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
boolean all) |
static boolean |
tryAddStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
boolean all,
boolean doAdd) |
static boolean |
tryAddStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
int startSlot,
int slots,
boolean all)
Tries to add a stack to the specified slot range.
|
static boolean |
tryAddStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
int startSlot,
int slots,
boolean all,
boolean doAdd) |
static boolean |
tryAddStacksCopy(net.minecraft.inventory.IInventory inventory,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> stacks,
int startSlot,
int slots,
boolean all) |
static void |
writeToNBT(net.minecraft.inventory.IInventory inventory,
net.minecraft.nbt.NBTTagCompound nbttagcompound) |
public static boolean moveItemStack(net.minecraftforge.items.IItemHandler source,
net.minecraftforge.items.IItemHandler dest)
source - The source IInventory.dest - The destination IInventory.public static boolean moveItemStack(net.minecraftforge.items.IItemHandler source,
java.lang.Iterable<net.minecraftforge.items.IItemHandler> destinations)
source - The source IInventory.destinations - The destination IInventory.public static boolean moveOneItemToPipe(net.minecraftforge.items.IItemHandler source,
AdjacentTileCache tileCache)
source - The source inventorytileCache - The tile cache of the source block.public static boolean moveOneItemToPipe(net.minecraftforge.items.IItemHandler source,
AdjacentTileCache tileCache,
net.minecraft.util.EnumFacing[] directions)
public static boolean removeSets(net.minecraft.inventory.IInventory inventory,
int count,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> set,
@Nullable
net.minecraft.entity.player.EntityPlayer player,
boolean stowContainer,
boolean oreDictionary,
boolean craftingTools,
boolean doRemove)
public static boolean removeSets(net.minecraft.inventory.IInventory inventory,
int count,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> set,
net.minecraft.util.NonNullList<java.lang.String> oreDicts,
@Nullable
net.minecraft.entity.player.EntityPlayer player,
boolean stowContainer,
boolean craftingTools,
boolean doRemove)
public static boolean deleteExactSet(net.minecraft.inventory.IInventory inventory,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> required)
@Nullable
public static net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> removeSets(net.minecraft.inventory.IInventory inventory,
int count,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> set,
@Nullable
net.minecraft.entity.player.EntityPlayer player,
boolean stowContainer,
boolean oreDictionary,
boolean craftingTools)
@Nullable
public static net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> removeSets(net.minecraft.inventory.IInventory inventory,
int count,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> set,
net.minecraft.util.NonNullList<java.lang.String> oreDicts,
@Nullable
net.minecraft.entity.player.EntityPlayer player,
boolean stowContainer,
boolean craftingTools)
public static boolean contains(net.minecraft.inventory.IInventory inventory,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> query)
public static boolean contains(net.minecraft.inventory.IInventory inventory,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> query,
int startSlot,
int slots)
public static boolean containsPercent(net.minecraft.inventory.IInventory inventory,
float percent)
public static boolean containsPercent(net.minecraft.inventory.IInventory inventory,
float percent,
int slot1,
int length)
public static boolean isEmpty(net.minecraft.inventory.IInventory inventory,
int slotStart,
int slotCount)
public static net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> getStacks(net.minecraft.inventory.IInventory inventory)
public static net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> getStacks(net.minecraft.inventory.IInventory inventory,
int slot1,
int length)
public static net.minecraft.util.NonNullList<java.lang.String> getOreDictAsList(java.lang.String[][] oreDicts)
public static boolean tryAddStacksCopy(net.minecraft.inventory.IInventory inventory,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> stacks,
int startSlot,
int slots,
boolean all)
public static boolean tryAddStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
boolean all)
public static boolean tryAddStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
boolean all,
boolean doAdd)
public static boolean tryAddStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
int startSlot,
int slots,
boolean all)
public static boolean tryAddStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
int startSlot,
int slots,
boolean all,
boolean doAdd)
public static int addStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
boolean doAdd)
public static int addStack(net.minecraft.inventory.IInventory inventory,
net.minecraft.item.ItemStack stack,
int startSlot,
int slots,
boolean doAdd)
public static boolean stowInInventory(net.minecraft.item.ItemStack itemstack,
net.minecraft.inventory.IInventory inventory,
boolean doAdd)
public static boolean stowInInventory(net.minecraft.item.ItemStack itemstack,
net.minecraft.inventory.IInventory inventory,
boolean doAdd,
int slot1,
int count)
public static void stowContainerItem(net.minecraft.item.ItemStack itemstack,
net.minecraft.inventory.IInventory stowing,
int slotIndex,
@Nullable
net.minecraft.entity.player.EntityPlayer player)
public static void deepCopyInventoryContents(net.minecraft.inventory.IInventory source,
net.minecraft.inventory.IInventory destination)
public static void dropInventory(net.minecraft.inventory.IInventory inventory,
net.minecraft.world.World world,
double x,
double y,
double z)
public static void dropInventory(net.minecraft.inventory.IInventory inventory,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
public static void dropSockets(ISocketable socketable, net.minecraft.world.World world, double x, double y, double z)
public static void dropSockets(ISocketable socketable, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
public static void dropItemStackFromInventory(net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
double x,
double y,
double z)
public static void readFromNBT(net.minecraft.inventory.IInventory inventory,
net.minecraft.nbt.NBTTagCompound nbttagcompound)
public static void writeToNBT(net.minecraft.inventory.IInventory inventory,
net.minecraft.nbt.NBTTagCompound nbttagcompound)