Difference between revisions of "Item stack"
m (fix object link) |
(restructured and stuff) |
||
Line 1: | Line 1: | ||
{{Languages}} | {{Languages}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{Object Data | {{Object Data | ||
|name=Dropped item stack | |name=Dropped item stack | ||
Line 17: | Line 8: | ||
|health=∞ | |health=∞ | ||
}} | }} | ||
− | + | An '''item stack''' is a collection of multiple [[items]] of the same type. Any item type has a stack limit, it is not possible to stack more items of such an item than the stack limit. | |
− | |||
− | + | == Appearance == | |
+ | Item stacks can be stored in [[inventory|inventories]] and can also appear in the world itself. | ||
− | + | === In an inventory === | |
+ | In the inventory, item stacks are represented by an icon and optionally a number. The number is the size of the item stack. If there is no number, the size is 1. Refer to [[Inventory#Controls]] for instructions how to use item stacks in inventories. | ||
− | Item stacks are subject to gravity. If multiple item stacks of the same item occupy the same block position, they will merge into one object, as long the stack limit is not exceeded. Dropped items also have a life time. If they stay untouched in the world for too long, they disappear. The life time can be changed via [[minetest.conf]] (<code>item_entity_ttl</code>) | + | === In the world === |
− | + | [[File:Item stacks in the world.png|thumb|250px|Some dropped item stacks]] | |
− | + | Item stacks appear in the world as [[objects]]. They are represented by some sort of symbol. For blocks, the icon is a rotating mini-version of it. Other things represented by the inventory icon. In the world, any item stack appears just as a single object, even with a stack size of 99. But item stacks with a larger stack size will appear larger than item stacks with a low stack size. An item stack can be collected by [[punching]] it. Item stacks are subject to gravity. If multiple item stacks of the same item occupy the same block position, they will merge into one object, as long the stack limit is not exceeded. Dropped items also have a life time. If they stay untouched in the world for too long, they disappear. The life time can be changed via [[minetest.conf]] (<code>item_entity_ttl</code>). | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Dropped items can appear for many reasons: | |
− | + | * a player drops them | |
+ | * a player mines a block, but there's no more space in the inventory | ||
+ | * a [[Mobs|mob]] or a player dies | ||
+ | * other events are possible | ||
− | + | == Modding Item stacks == | |
+ | Mods can change the stack limit, or the behaviour of the dropped items. | ||
+ | For example: | ||
* Item magnet: When a player stands close to a dropped item, it gets attraced like a magnet and will be automatically collected. Punching it is not required | * Item magnet: When a player stands close to a dropped item, it gets attraced like a magnet and will be automatically collected. Punching it is not required | ||
* Water flow: Dropped items move with the flow of [[water]] | * Water flow: Dropped items move with the flow of [[water]] | ||
* Destruction: Dropped items get destroyed if they touch lava or fire | * Destruction: Dropped items get destroyed if they touch lava or fire | ||
− | [[Category: | + | [[Category:Engine]] |
− |
Revision as of 22:02, 17 April 2021
Language: | English |
---|
Dropped item stack | |
---|---|
An object in Luanti | |
Health | ∞ |
Object collision | No |
Block collision | Yes |
Entitystring | __builtin:item |
An item stack is a collection of multiple items of the same type. Any item type has a stack limit, it is not possible to stack more items of such an item than the stack limit.
Appearance
Item stacks can be stored in inventories and can also appear in the world itself.
In an inventory
In the inventory, item stacks are represented by an icon and optionally a number. The number is the size of the item stack. If there is no number, the size is 1. Refer to Inventory#Controls for instructions how to use item stacks in inventories.
In the world
Item stacks appear in the world as objects. They are represented by some sort of symbol. For blocks, the icon is a rotating mini-version of it. Other things represented by the inventory icon. In the world, any item stack appears just as a single object, even with a stack size of 99. But item stacks with a larger stack size will appear larger than item stacks with a low stack size. An item stack can be collected by punching it. Item stacks are subject to gravity. If multiple item stacks of the same item occupy the same block position, they will merge into one object, as long the stack limit is not exceeded. Dropped items also have a life time. If they stay untouched in the world for too long, they disappear. The life time can be changed via minetest.conf (item_entity_ttl
).
Dropped items can appear for many reasons:
- a player drops them
- a player mines a block, but there's no more space in the inventory
- a mob or a player dies
- other events are possible
Modding Item stacks
Mods can change the stack limit, or the behaviour of the dropped items.
For example:
- Item magnet: When a player stands close to a dropped item, it gets attraced like a magnet and will be automatically collected. Punching it is not required
- Water flow: Dropped items move with the flow of water
- Destruction: Dropped items get destroyed if they touch lava or fire