From 1567bc9dffb4aac67cdf377ba764e54cd5a89239 Mon Sep 17 00:00:00 2001
From: rubenwardy If you have any difficulty in understanding this, please read
Programming in Lua.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.Programming in Lua
+This page was last updated 08/July/2015.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.Programming in Lua
Startup
@@ -1476,6 +1478,19 @@ list[current_player;craftpreview;7,1;1,1;]
+
+listring[<inventory location>;<list name>]
+
+
+listring[]
+
listring[<inventory location>;<list name>]
listcolors[<slot_bg_normal>;<slot_bg_hover>]
+ColorString
true
to prevent the default damage mechanismminetest.register_on_player_hpchange(func(player, hp_change), modifier)
+
+player
: ObjectRef of the playerhp_change
: the amount of change. Negative when it is damage.modifier
: when true, the function should return the actual hp_change.
+ Note: modifiers only get a temporary hp_change that can be modified by later modifiers.
+ modifiers can return true as a second argument to stop the execution of further functions.minetest.register_on_respawnplayer(func(ObjectRef))
minetest.auth_reload
call the authetification handler.
minetest.find_nodes_in_area(minp, maxp, nodenames)
: returns a list of positionsnodenames
: e.g. {"ignore", "group:tree"}
or "default:dirt"
minetest.auth_reload
call the authetification handler.
{ stack1, stack2, stack3, stack4, stack 5, stack 6, stack 7, stack 8, stack 9 }
output.item
= ItemStack
, if unsuccessful: empty ItemStack
output.time
= a number, if unsuccessful: 0
output.replacements
= list of ItemStack
s that couldn't be placed in
+ decremented_input.items
decremented_input
= like input
minetest.get_node_timer(pos)
.
set_wielded_item(item)
: replaces the wielded item, returns true
if successfulset_armor_groups({group1=rating, group2=rating, ...})
get_armor_groups()
: returns a table with the armor group ratingsset_animation({x=1,y=1}, frame_speed=15, frame_blend=0)
get_animation()
: returns range, frame_speed and frame_blendset_animation({x=1,y=1}, frame_speed=15, frame_blend=0, frame_loop=true)
get_animation()
: returns range, frame_speed, frame_blend and frame_loopset_attach(parent, bone, position, rotation)
bone
: stringposition
: {x=num, y=num, z=num}
(relative)