Inventory¶
Inventory locations¶
"context": Selected node metadata (deprecated:"current_name")"current_player": Player to whom the menu is shown"player:<name>": Any player"nodemeta:<X>,<Y>,<Z>": Any node metadata"detached:<name>": A detached inventory
Player Inventory lists¶
main: list containing the default inventorycraft: list containing the craft inputcraftpreview: list containing the craft predictioncraftresult: list containing the crafted outputhand: list containing an override for the empty hand- Is not created automatically, use
InvRef:set_size - Players use the first item in this list as their hand
- It behaves as if the default hand
""has been overridden for this specific player
- Is not created automatically, use
Custom lists can be added and deleted with InvRef:set_size(name, size) like
any other inventory.
ItemStack transaction order¶
This list describes the situation for non-empty ItemStacks in both slots that cannot be stacked at all, hence triggering an ItemStack swap operation. Put/take callbacks on empty ItemStack are not executed.
- The "allow take" and "allow put" callbacks are each run once for the source and destination inventory.
- The allowed ItemStacks are exchanged.
- The "on take" callbacks are run for the source and destination inventories
- The "on put" callbacks are run for the source and destination inventories