Module minetestex

Provides various extensions to the builtin functions.

Functions

handle_node_drops (position, drops, player) The handler that is used for invoking the registered node drop functions.
init () Initializes the node drops system.
register_on_nodedrops (handler) Registers the given handler for node drops.


Functions

handle_node_drops (position, drops, player)
The handler that is used for invoking the registered node drop functions.

Parameters:

  • position The position at which the drop occurred.
  • drops The drops that are being dropped, a list of ItemStacks.
  • player The player which the event originated at.
init ()
Initializes the node drops system. This is an internal function and should not be called from clients.
register_on_nodedrops (handler)
Registers the given handler for node drops.

Parameters:

  • handler The handler function. The function is assumed to take four parameters, the position at which the drops occurred, the drops which are dropped as list if ItemStacks, the player with which the even originated and if the event has been handled so far or not. Can return a boolean if the event has been handled. The handled flag is used to indicate wether the builtin functionality should be invoked or not. That means that if the last handler returns true, the items will not be added to the players inventory by default. By default the handler should return the given handled parameter to not change the state or return the desired state.
generated by LDoc 1.4.2