diff --git a/lua_api.html b/lua_api.html index 4f0a2f0..1b8a979 100644 --- a/lua_api.html +++ b/lua_api.html @@ -327,7 +327,7 @@ source code patches to http://www.minetest.net/
If you have any difficulty in understanding this, please read Programming in Lua.
minetest.auth_reload
call the authetification handler.
get_gen_notify()
: returns a flagstring and a table with the deco_idsminetest.get_mapgen_object(objectname)
minetest.auth_reload
call the authetification handler.
should be applied to the default config or current active configminetest.get_noiseparams(name)
: returns a table of the noiseparams for nameminetest.generate_ores(vm, pos1, pos2)
vm
and in the area from pos1
to pos2
.pos1
and pos2
are optional and default to mapchunk minp and maxp.minetest.get_node_timer(pos)
.
get_wielded_item()
: returns an ItemStack
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_attach(parent, bone, position, rotation)
bone
: stringposition
: {x=num, y=num, z=num}
(relative)rotation
: {x=num, y=num, z=num}
get_attach()
: returns parent, bone, position, rotation or nil if it isn't attachedset_detach()
set_bone_position(bone, position, rotation)
bone
: stringminetest.get_node_timer(pos)
.
rotation
: {x=num, y=num, z=num}
get_bone_position(bone)
: returns position and rotation of the boneset_properties(object property table)
get_properties()
: returns object property tableis_player()
: returns true for players, false otherwiseminetest.get_node_timer(pos)
.
get_physics_override()
: returns the table given to set_physics_overridehud_add(hud definition)
: add a HUD element described by HUD def, returns ID
number on successhud_remove(id)
: remove the HUD element of the specified idminetest.get_node_timer(pos)
.
count
: number of items, must be between 1
and 23
hud_get_hotbar_itemcount
: returns number of visible itemshud_set_hotbar_image(texturename)
hud_get_hotbar_image
: returns texturenamehud_set_hotbar_selected_image(texturename)
hud_get_hotbar_selected_image
: returns texturenamehud_replace_builtin(name, hud_definition)
name
: "breath"
or "health"
minetest.get_node_timer(pos)
.
minetest.after(0)
in there.get_sky()
: returns bgcolor, type and a table with the texturesoverride_day_night_ratio(ratio or nil)
0
...1
: Overrides day-night ratio, controlling sunlight to a specific amountnil
: Disables override, defaulting to sunlight based on day-night cycleget_day_night_ratio()
: returns the ratio or nil if it isn't overriddenset_local_animation(walk, dig, walk+dig, frame_speed=frame_speed)
set_local_animation(stand/idle, walk, dig, walk+dig, frame_speed=frame_speed)
set animation for player model in third person view
set_local_animation({x=0, y=79}, -- < stand/idle animation key frames
{x=168, y=187}, -- < walk animation key frames
@@ -3127,22 +3140,18 @@ Can be gotten via minetest.get_node_timer(pos)
.
{x=200, y=219}, -- < walk+dig animation key frames
frame_speed=30): -- < animation frame speed
-set_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0})
: defines offset value for camera per player
get_local_animation()
: returns stand, walk, dig, dig+walk tables and frame_speedset_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0})
: defines offset value for camera per player{x=-10/10,y=-10,15,z=-5/5}
)get_nametag_attributes()
get_eye_offset()
: returns offset_first and offset_thirdget_nametag_attributes()
set_nametag_attributes(attributes)
set_nametag_attributes(attributes)
attributes
:
{