public final class InventoryUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.entity.item.EntityItem |
drop(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.inventory.IInventory inventory,
int index,
int count,
net.minecraft.util.EnumFacing towards)
Drop some items from an inventory into the world.
|
static net.minecraft.entity.item.EntityItem |
spawnStackInWorld(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing towards)
Spawns an item stack in the world.
|
@Nullable
public static net.minecraft.entity.item.EntityItem drop(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.inventory.IInventory inventory,
int index,
int count,
net.minecraft.util.EnumFacing towards)
world - the world to drop the item into.pos - the position in the world to drop the item at.inventory - the inventory to drop the item from.index - the slot of the inventory to drop the item from.count - the number of items to drop from the stack in that slot.towards - the direction in which to drop the item.@Nullable
public static net.minecraft.entity.item.EntityItem spawnStackInWorld(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing towards)
world - the world to spawn the item stack in.pos - the position to spawn the item stack at.stack - the item stack to spawn in the world.towards - the direction in which to drop the item.