Uses of Interface
net.minecraft.inventory.Inventory
Package
Description
Contains utility method classes, various enums, serialization helpers, and
miscellaneous classes.
-
Uses of Inventory in net.minecraft.block
Modifier and TypeClassDescriptionprivate static class
private static class
private static class
Modifier and TypeFieldDescriptionprivate static final DoubleBlockProperties.PropertyRetriever
<ChestBlockEntity, Optional<Inventory>> ChestBlock.INVENTORY_RETRIEVER
Modifier and TypeMethodDescriptionChestBlock.getInventory
(ChestBlock block, BlockState state, World world, BlockPos pos, boolean ignoreBlocked) -
Uses of Inventory in net.minecraft.block.entity
Modifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Modifier and TypeMethodDescriptionHopperBlockEntity.getBlockInventoryAt
(World world, BlockPos pos, BlockState state) HopperBlockEntity.getEntityInventoryAt
(World world, double x, double y, double z) HopperBlockEntity.getInputInventory
(World world, Hopper hopper, BlockPos pos, BlockState state) HopperBlockEntity.getInventoryAt
(World world, BlockPos pos) HopperBlockEntity.getInventoryAt
(World world, BlockPos pos, BlockState state, double x, double y, double z) HopperBlockEntity.getOutputInventory
(World world, BlockPos pos, HopperBlockEntity blockEntity) Modifier and TypeMethodDescriptionprivate static boolean
HopperBlockEntity.canExtract
(Inventory hopperInventory, Inventory fromInventory, ItemStack stack, int slot, Direction facing) private static boolean
HopperBlockEntity.canInsert
(Inventory inventory, ItemStack stack, int slot, @Nullable Direction side) boolean
ChiseledBookshelfBlockEntity.canTransferTo
(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstack
fromslot
to the hopper.boolean
JukeboxBlockEntity.canTransferTo
(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstack
fromslot
to the hopper.private static boolean
static boolean
HopperBlockEntity.extract
(Inventory inventory, ItemEntity itemEntity) private static int[]
HopperBlockEntity.getAvailableSlots
(Inventory inventory, Direction side) private static boolean
HopperBlockEntity.isInventoryFull
(Inventory inventory, Direction direction) private static ItemStack
HopperBlockEntity.transfer
(@Nullable Inventory from, Inventory to, ItemStack stack, int slot, @Nullable Direction side) static ItemStack
HopperBlockEntity.transfer
(@Nullable Inventory from, Inventory to, ItemStack stack, @Nullable Direction side) -
Uses of Inventory in net.minecraft.client.gui.screen.ingame
-
Uses of Inventory in net.minecraft.entity.passive
Modifier and TypeMethodDescriptionboolean
AbstractHorseEntity.areInventoriesDifferent
(Inventory inventory) void
AbstractHorseEntity.onInventoryChanged
(Inventory sender) -
Uses of Inventory in net.minecraft.entity.player
Modifier and TypeMethodDescriptionvoid
PlayerEntity.openHorseInventory
(AbstractHorseEntity horse, Inventory inventory) int
PlayerInventory.remove
(Predicate<ItemStack> shouldRemove, int maxCount, Inventory craftingInventory) -
Uses of Inventory in net.minecraft.entity.vehicle
Modifier and TypeClassDescriptionclass
class
class
class
class
class
-
Uses of Inventory in net.minecraft.inventory
Modifier and TypeInterfaceDescriptioninterface
An inventory whose contents can be supplied from a loot table.interface
Represents an inventory that is an input for a recipe, such as crafting table inputs.interface
A special inventory interface for inventories that expose different slots for different sides, such as furnaces.interface
An inventory that holds exactly oneItemStack
, at slot0
.static interface
Modifier and TypeClassDescriptionclass
Represents an inventory for crafting inputs.class
Represents an inventory for the crafting output slot.class
Represents a combined inventory that is backed by two inventories.class
Represents an inventory used for ender chests.class
A generic implementation ofInventory
.Modifier and TypeFieldDescriptionprivate final Inventory
DoubleInventory.first
private final Inventory
DoubleInventory.second
Modifier and TypeMethodDescriptiondefault boolean
Inventory.canTransferTo
(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstack
fromslot
to the hopper.boolean
Returns whetherinventory
is part of the combined inventory.static StackReference
Creates a stack reference backed by an index within an inventory.static StackReference
Creates a stack reference backed by an index within an inventory and guarded by a condition for setting stacks into the inventory.void
InventoryChangedListener.onInventoryChanged
(Inventory sender) static int
Inventories.remove
(Inventory inventory, Predicate<ItemStack> shouldRemove, int maxCount, boolean dryRun) Removes a number, not exceedingmaxCount
, of items from an inventory based on a predicate and returns that number. -
Uses of Inventory in net.minecraft.loot
Modifier and TypeMethodDescriptionLootTable.getFreeSlots
(Inventory inventory, Random random) void
LootTable.supplyInventory
(Inventory inventory, LootWorldContext parameters, long seed) -
Uses of Inventory in net.minecraft.screen
Modifier and TypeFieldDescriptionprivate final Inventory
HorseScreenHandler.horseArmorInventory
protected final Inventory
ForgingScreenHandler.input
(package private) final Inventory
GrindstoneScreenHandler.input
private final Inventory
LoomScreenHandler.input
final Inventory
StonecutterScreenHandler.input
(package private) final Inventory
AbstractFurnaceScreenHandler.inventory
private final Inventory
BrewingStandScreenHandler.inventory
final Inventory
CartographyTableScreenHandler.inventory
private final Inventory
EnchantmentScreenHandler.inventory
private final Inventory
Generic3x3ContainerScreenHandler.inventory
private final Inventory
GenericContainerScreenHandler.inventory
private final Inventory
HopperScreenHandler.inventory
private final Inventory
HorseScreenHandler.inventory
private final Inventory
LecternScreenHandler.inventory
private final Inventory
ShulkerBoxScreenHandler.inventory
private final Inventory
LoomScreenHandler.output
private final Inventory
BeaconScreenHandler.payment
private final Inventory
GrindstoneScreenHandler.result
Modifier and TypeMethodDescriptionCrafterScreenHandler.getInputInventory()
GenericContainerScreenHandler.getInventory()
Modifier and TypeMethodDescriptionprotected void
Generic3x3ContainerScreenHandler.add3x3Slots
(Inventory inventory, int x, int y) private void
GenericContainerScreenHandler.addInventorySlots
(Inventory inventory, int left, int top) protected void
ScreenHandler.addPlayerHotbarSlots
(Inventory playerInventory, int left, int y) protected void
ScreenHandler.addPlayerInventorySlots
(Inventory playerInventory, int left, int top) protected void
ScreenHandler.addPlayerSlots
(Inventory playerInventory, int left, int top) Adds the slots for the player inventory and hotbar.static int
ScreenHandler.calculateComparatorOutput
(@Nullable Inventory inventory) protected static void
Checks that the size of the provided inventory is at least as large as theexpectedSize
.GenericContainerScreenHandler.createGeneric9x3
(int syncId, PlayerInventory playerInventory, Inventory inventory) GenericContainerScreenHandler.createGeneric9x6
(int syncId, PlayerInventory playerInventory, Inventory inventory) protected void
ScreenHandler.dropInventory
(PlayerEntity player, Inventory inventory) ScreenHandler.getSlotIndex
(Inventory inventory, int index) void
CartographyTableScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
CraftingScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
EnchantmentScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
ForgingScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
GrindstoneScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
LoomScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
MerchantScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
PlayerScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
ScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
SmithingScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.void
StonecutterScreenHandler.onContentChanged
(Inventory inventory) Called when a slot's content has changed.ModifierConstructorDescriptionprotected
AbstractFurnaceScreenHandler
(ScreenHandlerType<?> type, RecipeType<? extends AbstractCookingRecipe> recipeType, RegistryKey<RecipePropertySet> recipePropertySetKey, RecipeBookType category, int syncId, PlayerInventory platerInventory, Inventory inventory, PropertyDelegate propertyDelegate) BeaconScreenHandler
(int syncId, Inventory inventory) BeaconScreenHandler
(int syncId, Inventory inventory, PropertyDelegate propertyDelegate, ScreenHandlerContext context) BlastFurnaceScreenHandler
(int syncId, PlayerInventory playerInventory, Inventory inventory, PropertyDelegate propertyDelegate) BrewingStandScreenHandler
(int syncId, PlayerInventory playerInventory, Inventory inventory, PropertyDelegate propertyDelegate) FurnaceScreenHandler
(int syncId, PlayerInventory playerInventory, Inventory inventory, PropertyDelegate propertyDelegate) Generic3x3ContainerScreenHandler
(int syncId, PlayerInventory playerInventory, Inventory inventory) GenericContainerScreenHandler
(ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, Inventory inventory, int rows) HopperScreenHandler
(int syncId, PlayerInventory playerInventory, Inventory inventory) HorseScreenHandler
(int syncId, PlayerInventory playerInventory, Inventory inventory, AbstractHorseEntity entity, int slotColumnCount) IngredientSlot
(BrewingRecipeRegistry brewingRecipeRegistry, Inventory inventory, int index, int x, int y) LecternScreenHandler
(int syncId, Inventory inventory, PropertyDelegate propertyDelegate) PaymentSlot
(Inventory inventory, int index, int x, int y) PotionSlot
(Inventory inventory, int index, int x, int y) ShulkerBoxScreenHandler
(int syncId, PlayerInventory playerInventory, Inventory inventory) SmokerScreenHandler
(int syncId, PlayerInventory playerInventory, Inventory inventory, PropertyDelegate propertyDelegate) -
Uses of Inventory in net.minecraft.screen.slot
ModifierConstructorDescriptionArmorSlot
(Inventory inventory, LivingEntity entity, EquipmentSlot equipmentSlot, int index, int x, int y, @Nullable Identifier backgroundSprite) CrafterInputSlot
(Inventory inventory, int index, int x, int y, CrafterScreenHandler crafterScreenHandler) CrafterOutputSlot
(Inventory inventory, int index, int x, int y) CraftingResultSlot
(PlayerEntity player, RecipeInputInventory input, Inventory inventory, int index, int x, int y) FurnaceFuelSlot
(AbstractFurnaceScreenHandler handler, Inventory inventory, int index, int x, int y) FurnaceOutputSlot
(PlayerEntity player, Inventory inventory, int index, int x, int y) ShulkerBoxSlot
(Inventory inventory, int index, int x, int y) -
Uses of Inventory in net.minecraft.server.command
Modifier and TypeMethodDescriptionprivate static Inventory
LootCommand.getBlockInventory
(ServerCommandSource source, BlockPos pos) (package private) static Inventory
ItemCommand.getInventoryAtPos
(ServerCommandSource source, BlockPos pos, com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType exception) -
Uses of Inventory in net.minecraft.server.network
Modifier and TypeMethodDescriptionvoid
ServerPlayerEntity.openHorseInventory
(AbstractHorseEntity horse, Inventory inventory) -
Uses of Inventory in net.minecraft.util
Modifier and TypeMethodDescriptionprivate static void
Spawns item entities frominventory
around the given position.static void
Spawns item entities frominventory
aroundentity
's position.static void
Spawns item entities frominventory
aroundpos
. -
Uses of Inventory in net.minecraft.village