Skip to content

Inventories ​

Lets scripts identify inventory wrappers through the Inventories global,
instead of matching screen-name strings.

js
const inv = Player.openInventory();  
if (inv instanceof Inventories.Villager) {
  Chat.log(inv.getTrades());  
}

These names are available in JavaScript and Python without importing anything. They are read-only aliases of Java types, so instanceof works as usual.

Script nameWhat it is
Inventories.AnvilHandle for an open anvil screen.
Inventories.BeaconHandle for an open beacon screen.
Inventories.BrewingStandExposes a brewing stand's potion, ingredient, and fuel slots by name, with helpers to check recipes and preview brewing results without changing the stand.
Inventories.CartographyA handle for an open cartography table screen.
Inventories.ContainerInventory handle for chest-like container screens.
Inventories.CraftingProvides access to the input grid and result of a crafting menu.
Inventories.CreativeHandles the creative inventory screen and its item tabs.
Inventories.EnchantHandles an open enchanting table screen.
Inventories.FurnaceInventory wrapper for a furnace screen, exposing its input, fuel, result, and smelting state.
Inventories.GrindStoneHandle for an open grindstone screen.
Inventories.HorseHandle for an open horse, mule, donkey, llama, or camel inventory screen.
Inventories.InventoryWraps a container screen's menu; specialized subclasses represent recognized screen types.
Inventories.LoomProvides access to pattern selection in an open loom screen.
Inventories.PlayerThe player's inventory screen, including its crafting result, input grid, equipment, and hotbar.
Inventories.RecipeBase API for recipe-book screens, exposing their input dimensions, cells, output, and recipe-book entries.
Inventories.SmithingWraps an open smithing table screen.
Inventories.StoneCutterHandles an open stonecutter screen.
Inventories.VillagerHandles an open villager trading screen.