This is a library mod for Minetest that simplifies associating objects with nodes. Sometimes nodes need to be displayed or animated in a way that nodes do not lend themselves to. In these cases, it can be helpful to use an object.
Sets the object associated with the node position. If a different object is
already associated, this object is removed. If
association is cleared.
It is recommended that the object have its property
static_save set to
false, since the association is only in-memory.
In addition, you should optionally depend on
mesecons_mvps and register the
object's entity type as unmoveable using that mod's API.
Returns the object (or
nil) associated with the node position. This will
nil if the object has been removed or deactivated.
This is like
node_object.set, but instead of being removed, the past object
nil) is returned.
An object associated with a node is an ephemeral reflection of the node's state. By providing this callback in a node definition, you are telling the library to call it with a node position as its argument when the node may not have an associated object, such as after placement or loading, and to remove any associated object before destruction. If the node state changes, you should update the object yourself.
Note: you cannot set this callback within an
This is the library's version string. I'll try to stick to SemVer.