public class ItemHandlerHelper
extends java.lang.Object
Constructor and Description |
---|
ItemHandlerHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canItemStacksStack(ItemStack a,
ItemStack b) |
static boolean |
canItemStacksStackRelaxed(ItemStack a,
ItemStack b)
A relaxed version of canItemStacksStack that stacks itemstacks with different metadata if they don't have subtypes.
|
static ItemStack |
copyStackWithSize(ItemStack itemStack,
int size) |
static void |
giveItemToPlayer(EntityPlayer player,
ItemStack stack)
giveItemToPlayer without preferred slot
|
static void |
giveItemToPlayer(EntityPlayer player,
ItemStack stack,
int preferredSlot)
Inserts the given itemstack into the players inventory.
|
static ItemStack |
insertItem(IItemHandler dest,
ItemStack stack,
boolean simulate) |
static ItemStack |
insertItemStacked(IItemHandler inventory,
ItemStack stack,
boolean simulate)
Inserts the ItemStack into the inventory, filling up already present stacks first.
|
public static ItemStack insertItem(IItemHandler dest, ItemStack stack, boolean simulate)
public static boolean canItemStacksStackRelaxed(ItemStack a, ItemStack b)
public static ItemStack insertItemStacked(IItemHandler inventory, ItemStack stack, boolean simulate)
public static void giveItemToPlayer(EntityPlayer player, ItemStack stack)
public static void giveItemToPlayer(EntityPlayer player, ItemStack stack, int preferredSlot)
player
- The player to give the item tostack
- The itemstack to insert