public class InventoryUtil
extends java.lang.Object
Constructor and Description |
---|
InventoryUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addAll(net.minecraftforge.items.IItemHandler src,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> dst)
Adds every stack from src to dst.
|
static void |
addToBestAcceptor(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing ignore,
net.minecraft.item.ItemStack stack)
Attempts to add the given stack to the best acceptor, in this order:
IItemHandler instances,
IInjectable instances, and finally dropping it down on the ground. |
static void |
addToPlayer(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack stack)
Adds the given
ItemStack to the player's inventory, or drops it in front of them if their was not enough
room. |
static net.minecraft.item.ItemStack |
addToRandomInjectable(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing ignore,
net.minecraft.item.ItemStack stack)
Look around the tile given in parameter in all 6 position, tries to add the items to a random injectable tile
around.
|
static net.minecraft.item.ItemStack |
addToRandomInventory(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.item.ItemStack stack) |
static void |
drop(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.item.ItemStack stack) |
static void |
drop(net.minecraft.world.World world,
double x,
double y,
double z,
net.minecraft.item.ItemStack stack) |
static void |
drop(net.minecraft.world.World world,
net.minecraft.util.math.Vec3d vec,
net.minecraft.item.ItemStack stack) |
static void |
dropAll(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraftforge.items.IItemHandlerModifiable handler) |
static void |
dropAll(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> toDrop) |
static void |
dropAll(net.minecraft.world.World world,
double x,
double y,
double z,
net.minecraftforge.items.IItemHandlerModifiable handler) |
static void |
dropAll(net.minecraft.world.World world,
net.minecraft.util.math.Vec3d vec,
net.minecraftforge.items.IItemHandlerModifiable handler) |
public static void dropAll(net.minecraft.world.World world, net.minecraft.util.math.Vec3d vec, net.minecraftforge.items.IItemHandlerModifiable handler)
public static void dropAll(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraftforge.items.IItemHandlerModifiable handler)
public static void dropAll(net.minecraft.world.World world, double x, double y, double z, net.minecraftforge.items.IItemHandlerModifiable handler)
public static void dropAll(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> toDrop)
public static void drop(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, @Nonnull net.minecraft.item.ItemStack stack)
public static void drop(net.minecraft.world.World world, net.minecraft.util.math.Vec3d vec, @Nonnull net.minecraft.item.ItemStack stack)
public static void drop(net.minecraft.world.World world, double x, double y, double z, @Nonnull net.minecraft.item.ItemStack stack)
@Nonnull public static net.minecraft.item.ItemStack addToRandomInventory(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, @Nonnull net.minecraft.item.ItemStack stack)
@Nonnull public static net.minecraft.item.ItemStack addToRandomInjectable(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.EnumFacing ignore, @Nonnull net.minecraft.item.ItemStack stack)
public static void addToBestAcceptor(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.EnumFacing ignore, @Nonnull net.minecraft.item.ItemStack stack)
IItemHandler
instances,
IInjectable
instances, and finally dropping it down on the ground.public static void addAll(net.minecraftforge.items.IItemHandler src, net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> dst)
public static void addToPlayer(net.minecraft.entity.player.EntityPlayer player, net.minecraft.item.ItemStack stack)
ItemStack
to the player's inventory, or drops it in front of them if their was not enough
room.