Difference between revisions of "Unknown Item"
m (block→item) |
(add technical info) |
||
Line 20: | Line 20: | ||
Another source of this item is a bug in mods or subgames or just general developer clumsiness. Developers of a subgame may have made a mistake or removed items intentionally without any replacement. Complain to the subgame authors if this happens, as this is generally considered poor development practice. If unknown items occour without you using any mods, this is almost certainly a bug. | Another source of this item is a bug in mods or subgames or just general developer clumsiness. Developers of a subgame may have made a mistake or removed items intentionally without any replacement. Complain to the subgame authors if this happens, as this is generally considered poor development practice. If unknown items occour without you using any mods, this is almost certainly a bug. | ||
+ | |||
+ | == Technical background == | ||
+ | Technically, an unknown item still kinda acts like a normal item, and most item query and manipulation functions will still work. If you query the itemstring of an unknown item with e.g. <code>itemstack:get_name()</code>, you get the itemstring which the unknown item represents. To find out in Lua whether an item is unknown, do a lookup in <code>minetest.registered_items</code>. If the item does not occour in this table, it is unknown. | ||
== See also == | == See also == | ||
* [[Unknown Node]] | * [[Unknown Node]] | ||
* [[Unknown Object]] | * [[Unknown Object]] |
Revision as of 17:00, 7 September 2017
Language: | English |
---|
Unknown Item | |
---|---|
An item in Minetest | |
Item Type | Internally-used item |
Renewable | N/A |
Durability | N/A |
Stackable | Yes (99) |
Itemstring | N/A |
An Unknown Item is a pseudo-item in Minetest to represent an item of which the item definition is unknown. These items must never appear in the game, it's always an error when you encounter it.
Behaviour
If you rightclick or try to drop the unknown item, an error message is shown which reveals the item's itemstring. You can still store and move this item in inventories. But any sort of world interaction is not possible. Due to a bug in Minetest, it's not even possible to drop these items.
Internally, an unknown item still knows the “real” item it represents and the associated data. To fix problems with unknown item, first check the troubleshooting section. You can destroy unknown items with the pulverize
server command.
Troubleshooting
A common reason for this item to appear is when you have previously activated a mod which added some new item, stored some of these items in an inventory, then later deactivated said mod. Now all items from this mod will appear as an unknown items. In this case, you can solve this simply by enabling the missing mod again. If you forgot to which mod this item belonged, rightclick with the item in hand to see its itemstring. The part before the colum is the mod name.
Another source of this item is a bug in mods or subgames or just general developer clumsiness. Developers of a subgame may have made a mistake or removed items intentionally without any replacement. Complain to the subgame authors if this happens, as this is generally considered poor development practice. If unknown items occour without you using any mods, this is almost certainly a bug.
Technical background
Technically, an unknown item still kinda acts like a normal item, and most item query and manipulation functions will still work. If you query the itemstring of an unknown item with e.g. itemstack:get_name()
, you get the itemstring which the unknown item represents. To find out in Lua whether an item is unknown, do a lookup in minetest.registered_items
. If the item does not occour in this table, it is unknown.