Difference between revisions of "Unknown Node"
m (→Technical background: fix typo) |
m (re-sort) |
||
Line 15: | Line 15: | ||
An '''unknown node''' (other name: '''<code>CONTENT_UNKNOWN</code>''') is a block which is internally used by Minetest to represent an undefined block. Players should never see this block in the game, it's always an error. | An '''unknown node''' (other name: '''<code>CONTENT_UNKNOWN</code>''') is a block which is internally used by Minetest to represent an undefined block. Players should never see this block in the game, it's always an error. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Behaviour == | == Behaviour == | ||
Line 25: | Line 20: | ||
Think carefully before destroying an unknown node as all information associated with the block (except the itemstring) will be gone for good. (It might have been the diamond-encrusted golden chest with the flaming longsword of overpower, after all! ;-) ). Try to do some [[#Troubleshooting|troubleshooting]] first. | Think carefully before destroying an unknown node as all information associated with the block (except the itemstring) will be gone for good. (It might have been the diamond-encrusted golden chest with the flaming longsword of overpower, after all! ;-) ). Try to do some [[#Troubleshooting|troubleshooting]] first. | ||
+ | |||
+ | Unknown nodes are not items, can not be stored in inventories and have no itemstring. | ||
+ | |||
+ | == Internal data == | ||
+ | Internally, an unknown node always “knows” the real block it represents and stll contains all the internal data accociated with it (like an inventory) as long you don't destroy the block. So don't worry if a large portion of your world suddenly turns into unknown nodes, you might still fix this. | ||
== Troubleshooting == | == Troubleshooting == |
Revision as of 17:32, 7 September 2017
Language: | English • Deutsch |
---|
Unknown Node | |
---|---|
A node in Minetest | |
Node Type | Internally-used block |
Drops | Unknown Item |
Physics | No |
Luminance | No |
Flammable | No |
Generated | Hopefully not! |
Renewable | No |
Stackable | N/A |
Itemstring | N/A |
An unknown node (other name: CONTENT_UNKNOWN
) is a block which is internally used by Minetest to represent an undefined block. Players should never see this block in the game, it's always an error.
Behaviour
Unknown node is a solid opaque block. When punched, an error message is shown with the itemstring of the block it actually represents. It can be mined by hand in 0.5 seconds, even if the actual block it represents would be unbreakable. It drops an unknown item with the same itemstring.
Think carefully before destroying an unknown node as all information associated with the block (except the itemstring) will be gone for good. (It might have been the diamond-encrusted golden chest with the flaming longsword of overpower, after all! ;-) ). Try to do some troubleshooting first.
Unknown nodes are not items, can not be stored in inventories and have no itemstring.
Internal data
Internally, an unknown node always “knows” the real block it represents and stll contains all the internal data accociated with it (like an inventory) as long you don't destroy the block. So don't worry if a large portion of your world suddenly turns into unknown nodes, you might still fix this.
Troubleshooting
A common reason for this block to appear is when you have previously activated a mod which added some new blocks (e.g. a blue stone), then later deactivated said mod. Now all blocks from this mod will appear as an unknown node. In this case, you can solve this simply by enabling the missing mod again. Punch the block once to see the itemstring. The part before the column is the mod name.
Another source of this block is a bug in mods or subgames or just general developer clumsiness. Developers of a subgame may have made a mistake or removed blocks intentionally without any replacement. Complain to the subgame authors if this happens, as this is generally considered poor development practice. If unknown nodes occour without you using any mods, you can be certain it is a bug.
Technical background
Technically, an unknown node still tries it best to pretend like it would be a real node. If an unknown node is queried with a function like minetest.get_node, the itemstring of the node it actually represents is returned. To find out whether a node is unknown, do a lookup in minetest.registered_nodes
. If the node does not occour in this table, it is unknown.
In the Minetest source code, this pseudo-node is also called “CONTENT_UNKNOWN
”.