Node

A representation of a node in the game world, inheriting from Point.

In addition to coordinates, a node has a name (e.g., "default:stone") and param1 and param2 attributes, which are used for node-specific data.

If a node is a container (like a chest), it provides access to its Inventory through the inventory property.

class miney.node.Node(x: int | float = 0, y: int | float = 0, z: int | float = 0, name: str = 'default:dirt', param1: int = None, param2: int = None, luanti: Luanti = None)[source]
property inventory: Inventory

Get the inventory of this node, if it has one.

>>> chest_inventory = lt.nodes.get(Point(0, 0, 0)).inventory.add(lt.tool.default.dirt, 100)
Returns:

The inventory object for this node.

Raises:

AttributeError if the node is not bound to a Luanti instance.

property position: Point

Returns the position of the node as a Point object. Since a Node is a subclass of Point, it returns itself.

Returns:

A Point object representing the node’s coordinates.