Difference between revisions of "Unknown Item"
(rename Minetest to Luanti) |
|||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
{{Item Data | {{Item Data | ||
− | |wherein=[[ | + | |wherein=[[Luanti]] |
|type=Internally-used item | |type=Internally-used item | ||
|name=Unknown Item | |name=Unknown Item | ||
Line 10: | Line 10: | ||
}} | }} | ||
− | An '''Unknown Item''' is a pseudo-item in | + | An '''Unknown Item''' is a pseudo-item in Luanti 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 == | == Behaviour == | ||
− | If you | + | Most types of world interactions are not possible. Dropping an unknown item is not possible. You can still store and move this item in inventories. |
+ | |||
+ | If you try to place, use or drop an unknown item, an error message will be shown to the server. This message is not visible if you are connected to a server as a normal player. The error message reveals the item's [[Itemstrings|itemstring]]. | ||
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 <code>pulverize</code> [[Server commands|server command]]. | 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 <code>pulverize</code> [[Server commands|server command]]. |
Latest revision as of 22:35, 22 October 2024
Language: | English |
---|
Unknown Item | |
---|---|
An item in Luanti | |
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 Luanti 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
Most types of world interactions are not possible. Dropping an unknown item is not possible. You can still store and move this item in inventories.
If you try to place, use or drop an unknown item, an error message will be shown to the server. This message is not visible if you are connected to a server as a normal player. The error message reveals the item's itemstring.
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 games or just general developer clumsiness. Developers of a game may have made a mistake or removed items intentionally without any replacement. Complain to the game 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 stack is unknown, call itemstack:is_known()
.