Inventory: Difference between revisions
>ROllerozxa No edit summary |
>ROllerozxa No edit summary |
(No difference)
|
Latest revision as of 07:09, 16 January 2023
An inventory is primarily used to store item stacks. There are other uses, such as crafting. An inventory consists of a rectangular grid of item slots. Each item slot can be either empty or hold one item stack. Item stacks can be moved freely between slot and slot, given that the destination slot is either empty or of the same item type.
Controls
You only use the mouse to take, drop and exchange items to move item stacks around.
Taking
You can take items from an occupied slot if the cursor holds nothing.
- Left click: take entire item stack
- Right click: take half from the item stack (rounding up if uneven)
- Middle click: take 10 items from the item stack
- Roll mouse wheel down: take 1 item from the item stack
Dropping
You can drop items onto a slot if the cursor holds 1 or more items and the slot is either empty or contains an item stack of the same item type.
- Left click: drop entire item stack
- Right click or roll mouse wheel up: drop 1 item of the item stack
- Middle click: drop 10 items of the item stack
Exchanging
You can exchange items if the cursor holds 1 or more items and the destination slot is occupied by a different item type.
- Left, middle and right click: exchange item stacks from cursor and from selected item slot
Throwing away
If you hold an item stack and click with it somewhere outside the menu, the item stack gets thrown away into the environment.
Automatic Transfer
You can automatically transfer an item stack to/from the player inventory to/from another item's inventory slot like a furnace, chest, or any other item with an inventory slot when that item's inventory is accessed. When transferring items to/from the furnace, items that can be smelted will automatically go to the input slot. Items in the furnace output slot will automatically go to the player inventory.
- Shift+Left click: Automatically transfer item stack.
Inventory debug
This is something for developers. If you press F5 when the inventory menu is open, you activate the inventory debug. The formspec elements that your cursor hovers will be highlighted. Press F5 again to disable inventory debug.
Inventories in Minetest Game
Player inventory
The player inventory is in the inventory menu and has a size of 8 rows and 4 lines, providing 32 item slots of storage. It is always available. The top line makes the hotbar.
Chest and Locked Chest
Chests and locked chests both provide 8 × 4 inventories.
Bookshelf
A bookshelf has a special 8×2 inventory which can only be used for 1 book per slot.
Vessels Shelf
A vessels shelf has a special 8×2 inventory which can only be used for glass bottles and drinking glasses.
Bones
When a player dies, a bones block is generated. It has an inventory which contains all the items of the player who died. The bones’ inventory acts in many special ways, see Bones for more information.
Other inventories
Other inventories are the crafting grid and in the furnace. The crafting grid has the same properties of an inventory but you can also craft new items with it. You keep your items if you store them in the crafting grid and close the inventory menu. Even the fuel and smelting slots of the furnace are in fact just special cases of inventories which are, in this case, 1×1 inventories, even though the latter is limited to “fuel”-type items.
Inventories in other games
Other mods or games can completely customize the inventory menu to change the inventories there and also add inventories basicly whereever the modder wants to. In fact, Minetest Game just shows one possibility to use inventories.
For the purpose of this wiki, an ordinary inventory in the inventory menu is refered to as “player inventory”.