Add pointed_thing to lua_api.txt
parent
c9a2058361
commit
c57e5083e8
|
@ -342,6 +342,11 @@ Position/vector:
|
||||||
Currently the API does not provide any helper functions for addition,
|
Currently the API does not provide any helper functions for addition,
|
||||||
subtraction and whatever; you can define those that you need yourself.
|
subtraction and whatever; you can define those that you need yourself.
|
||||||
|
|
||||||
|
pointed_thing:
|
||||||
|
{type="nothing"}
|
||||||
|
{type="node", under=pos, above=pos}
|
||||||
|
{type="object", ref=ObjectRef}
|
||||||
|
|
||||||
Items
|
Items
|
||||||
------
|
------
|
||||||
Node (register_node):
|
Node (register_node):
|
||||||
|
@ -1167,8 +1172,10 @@ Item definition (register_node, register_craftitem, register_tool)
|
||||||
actual result to client in a short moment.
|
actual result to client in a short moment.
|
||||||
|
|
||||||
on_place = func(itemstack, placer, pointed_thing),
|
on_place = func(itemstack, placer, pointed_thing),
|
||||||
|
^ Shall place item and return the leftover itemstack
|
||||||
^ default: minetest.item_place
|
^ default: minetest.item_place
|
||||||
on_drop = func(itemstack, dropper, pos),
|
on_drop = func(itemstack, dropper, pos),
|
||||||
|
^ Shall drop item and return the leftover itemstack
|
||||||
^ default: minetest.item_drop
|
^ default: minetest.item_drop
|
||||||
on_use = func(itemstack, user, pointed_thing),
|
on_use = func(itemstack, user, pointed_thing),
|
||||||
^ default: nil
|
^ default: nil
|
||||||
|
|
Loading…
Reference in New Issue