IDE hints for Player methods

This commit is contained in:
Alexander Chibrikin
2022-12-28 08:22:58 +03:00
parent 46353f0279
commit 4936dbfab1

View File

@@ -6,324 +6,371 @@ function Player:get_player_name() end
function Player:get_inventory() end function Player:get_inventory() end
--TODO: --TODO:
--* `get_player_name()`: returns `""` if is not a player --- returns `""` if is not a player
--* `get_player_velocity()`: **DEPRECATED**, use get_velocity() instead. function Player:get_player_name() end
-- table {x, y, z} representing the player's instantaneous velocity in nodes/s --- **DEPRECATED**, use get_velocity() instead.
--* `add_player_velocity(vel)`: **DEPRECATED**, use add_velocity(vel) instead. --- table {x, y, z} representing the player's instantaneous velocity in nodes/s
--* `get_look_dir()`: get camera direction as a unit vector function Player:get_player_velocity() end
--* `get_look_vertical()`: pitch in radians --- **DEPRECATED**, use add_velocity(vel) instead.
-- * Angle ranges between -pi/2 and pi/2, which are straight up and down function Player:add_player_velocity(vel) end
-- respectively. --- get camera direction as a unit vector
--* `get_look_horizontal()`: yaw in radians function Player:get_look_dir() end
-- * Angle is counter-clockwise from the +z direction. --- pitch in radians
--* `set_look_vertical(radians)`: sets look pitch --- * Angle ranges between -pi/2 and pi/2, which are straight up and down
-- * radians: Angle from looking forward, where positive is downwards. --- respectively.
--* `set_look_horizontal(radians)`: sets look yaw function Player:get_look_vertical() end
-- * radians: Angle from the +z direction, where positive is counter-clockwise. --- yaw in radians
--* `get_look_pitch()`: pitch in radians - Deprecated as broken. Use --- * Angle is counter-clockwise from the +z direction.
-- `get_look_vertical`. function Player:get_look_horizontal() end
-- * Angle ranges between -pi/2 and pi/2, which are straight down and up --- sets look pitch
-- respectively. --- * radians: Angle from looking forward, where positive is downwards.
--* `get_look_yaw()`: yaw in radians - Deprecated as broken. Use function Player:set_look_vertical(radians) end
-- `get_look_horizontal`. --- sets look yaw
-- * Angle is counter-clockwise from the +x direction. --- * radians: Angle from the +z direction, where positive is counter-clockwise.
--* `set_look_pitch(radians)`: sets look pitch - Deprecated. Use function Player:set_look_horizontal(radians) end
-- `set_look_vertical`. --- pitch in radians - Deprecated as broken. Use
--* `set_look_yaw(radians)`: sets look yaw - Deprecated. Use --- `get_look_vertical`.
-- `set_look_horizontal`. --- * Angle ranges between -pi/2 and pi/2, which are straight down and up
--* `get_breath()`: returns player's breath --- respectively.
--* `set_breath(value)`: sets player's breath function Player:get_look_pitch() end
-- * values: --- yaw in radians - Deprecated as broken. Use
-- * `0`: player is drowning --- `get_look_horizontal`.
-- * max: bubbles bar is not shown --- * Angle is counter-clockwise from the +x direction.
-- * See [Object properties] for more information function Player:get_look_yaw() end
-- * Is limited to range 0 ... 65535 (2^16 - 1) --- sets look pitch - Deprecated. Use `set_look_vertical`.
--* `set_fov(fov, is_multiplier, transition_time)`: Sets player's FOV function Player:set_look_pitch(radians) end
-- * `fov`: FOV value. --- sets look yaw - Deprecated. Use
-- * `is_multiplier`: Set to `true` if the FOV value is a multiplier. --- `set_look_horizontal`.
-- Defaults to `false`. function Player:set_look_yaw(radians) end
-- * `transition_time`: If defined, enables smooth FOV transition. --- returns player's breath
-- Interpreted as the time (in seconds) to reach target FOV. function Player:get_breath() end
-- If set to 0, FOV change is instantaneous. Defaults to 0. --- sets player's breath
-- * Set `fov` to 0 to clear FOV override. --- * values:
--* `get_fov()`: Returns the following: --- * `0`: player is drowning
-- * Server-sent FOV value. Returns 0 if an FOV override doesn't exist. --- * max: bubbles bar is not shown
-- * Boolean indicating whether the FOV value is a multiplier. --- * See [Object properties] for more information
-- * Time (in seconds) taken for the FOV transition. Set by `set_fov`. --- * Is limited to range 0 ... 65535 (2^16 - 1)
--* `set_attribute(attribute, value)`: DEPRECATED, use get_meta() instead function Player:set_breath(value) end
-- * Sets an extra attribute with value on player. --- Sets player's FOV
-- * `value` must be a string, or a number which will be converted to a --- * `fov`: FOV value.
-- string. --- * `is_multiplier`: Set to `true` if the FOV value is a multiplier.
-- * If `value` is `nil`, remove attribute from player. --- Defaults to `false`.
--* `get_attribute(attribute)`: DEPRECATED, use get_meta() instead --- * `transition_time`: If defined, enables smooth FOV transition.
-- * Returns value (a string) for extra attribute. --- Interpreted as the time (in seconds) to reach target FOV.
-- * Returns `nil` if no attribute found. --- If set to 0, FOV change is instantaneous. Defaults to 0.
--* `get_meta()`: Returns a PlayerMetaRef. --- * Set `fov` to 0 to clear FOV override.
--* `set_inventory_formspec(formspec)` function Player:set_fov(fov, is_multiplier, transition_time) end
-- * Redefine player's inventory form --- Returns the following:
-- * Should usually be called in `on_joinplayer` --- * Server-sent FOV value. Returns 0 if an FOV override doesn't exist.
-- * If `formspec` is `""`, the player's inventory is disabled. --- * Boolean indicating whether the FOV value is a multiplier.
--* `get_inventory_formspec()`: returns a formspec string --- * Time (in seconds) taken for the FOV transition. Set by `set_fov`.
--* `set_formspec_prepend(formspec)`: function Player:get_fov() end
-- * the formspec string will be added to every formspec shown to the user, --- DEPRECATED, use get_meta() instead
-- except for those with a no_prepend[] tag. --- * Sets an extra attribute with value on player.
-- * This should be used to set style elements such as background[] and --- * `value` must be a string, or a number which will be converted to a
-- bgcolor[], any non-style elements (eg: label) may result in weird behavior. --- string.
-- * Only affects formspecs shown after this is called. --- * If `value` is `nil`, remove attribute from player.
--* `get_formspec_prepend(formspec)`: returns a formspec string. function Player:set_attribute(attribute, value) end
--* `get_player_control()`: returns table with player pressed keys --- DEPRECATED, use get_meta() instead
-- * The table consists of fields with the following boolean values --- * Returns value (a string) for extra attribute.
-- representing the pressed keys: `up`, `down`, `left`, `right`, `jump`, --- * Returns `nil` if no attribute found.
-- `aux1`, `sneak`, `dig`, `place`, `LMB`, `RMB`, and `zoom`. function Player:get_attribute(attribute) end
-- * The fields `LMB` and `RMB` are equal to `dig` and `place` respectively, --- Returns a PlayerMetaRef.
-- and exist only to preserve backwards compatibility. function Player:get_meta() end
-- * Returns an empty table `{}` if the object is not a player. --- * Redefine player's inventory form
--* `get_player_control_bits()`: returns integer with bit packed player pressed --- * Should usually be called in `on_joinplayer`
-- keys. --- * If `formspec` is `""`, the player's inventory is disabled.
-- * Bits: function Player:set_inventory_formspec(formspec) end
-- * 0 - up --- returns a formspec string
-- * 1 - down function Player:get_inventory_formspec() end
-- * 2 - left --- * the formspec string will be added to every formspec shown to the user,
-- * 3 - right --- except for those with a no_prepend[] tag.
-- * 4 - jump --- * This should be used to set style elements such as background[] and
-- * 5 - aux1 --- bgcolor[], any non-style elements (eg: label) may result in weird behavior.
-- * 6 - sneak --- * Only affects formspecs shown after this is called.
-- * 7 - dig function Player:set_formspec_prepend(formspec) end
-- * 8 - place --- returns a formspec string.
-- * 9 - zoom function Player:get_formspec_prepend(formspec) end
-- * Returns `0` (no bits set) if the object is not a player. --- returns table with player pressed keys
--* `set_physics_override(override_table)` --- * The table consists of fields with the following boolean values
-- * `override_table` is a table with the following fields: --- representing the pressed keys: `up`, `down`, `left`, `right`, `jump`,
-- * `speed`: multiplier to default walking speed value (default: `1`) --- `aux1`, `sneak`, `dig`, `place`, `LMB`, `RMB`, and `zoom`.
-- * `jump`: multiplier to default jump value (default: `1`) --- * The fields `LMB` and `RMB` are equal to `dig` and `place` respectively,
-- * `gravity`: multiplier to default gravity value (default: `1`) --- and exist only to preserve backwards compatibility.
-- * `sneak`: whether player can sneak (default: `true`) --- * Returns an empty table `{}` if the object is not a player.
-- * `sneak_glitch`: whether player can use the new move code replications function Player:get_player_control() end
-- of the old sneak side-effects: sneak ladders and 2 node sneak jump --- returns integer with bit packed player pressed
-- (default: `false`) --- keys.
-- * `new_move`: use new move/sneak code. When `false` the exact old code --- * Bits:
-- is used for the specific old sneak behavior (default: `true`) --- * 0 - up
--* `get_physics_override()`: returns the table given to `set_physics_override` --- * 1 - down
--* `hud_add(hud definition)`: add a HUD element described by HUD def, returns ID --- * 2 - left
-- number on success --- * 3 - right
--* `hud_remove(id)`: remove the HUD element of the specified id --- * 4 - jump
--* `hud_change(id, stat, value)`: change a value of a previously added HUD --- * 5 - aux1
-- element. --- * 6 - sneak
-- * `stat` supports the same keys as in the hud definition table except for --- * 7 - dig
-- `"hud_elem_type"`. --- * 8 - place
--* `hud_get(id)`: gets the HUD element definition structure of the specified ID --- * 9 - zoom
--* `hud_set_flags(flags)`: sets specified HUD flags of player. --- * Returns `0` (no bits set) if the object is not a player.
-- * `flags`: A table with the following fields set to boolean values function Player:get_player_control_bits() end
-- * `hotbar` --- * `override_table` is a table with the following fields:
-- * `healthbar` --- * `speed`: multiplier to default walking speed value (default: `1`)
-- * `crosshair` --- * `jump`: multiplier to default jump value (default: `1`)
-- * `wielditem` --- * `gravity`: multiplier to default gravity value (default: `1`)
-- * `breathbar` --- * `sneak`: whether player can sneak (default: `true`)
-- * `minimap`: Modifies the client's permission to view the minimap. --- * `sneak_glitch`: whether player can use the new move code replications
-- The client may locally elect to not view the minimap. --- of the old sneak side-effects: sneak ladders and 2 node sneak jump
-- * `minimap_radar`: is only usable when `minimap` is true --- (default: `false`)
-- * `basic_debug`: Allow showing basic debug info that might give a gameplay advantage. --- * `new_move`: use new move/sneak code. When `false` the exact old code
-- This includes map seed, player position, look direction, the pointed node and block bounds. --- is used for the specific old sneak behavior (default: `true`)
-- Does not affect players with the `debug` privilege. function Player:set_physics_override(override_table) end
-- * If a flag equals `nil`, the flag is not modified --- returns the table given to `set_physics_override`
--* `hud_get_flags()`: returns a table of player HUD flags with boolean values. function Player:get_physics_override() end
-- * See `hud_set_flags` for a list of flags that can be toggled. --- add a HUD element described by HUD def, returns ID
--* `hud_set_hotbar_itemcount(count)`: sets number of items in builtin hotbar --- number on success
-- * `count`: number of items, must be between `1` and `32` function Player:hud_add(hud_definition) end
--* `hud_get_hotbar_itemcount`: returns number of visible items --- remove the HUD element of the specified id
--* `hud_set_hotbar_image(texturename)` function Player:hud_remove(id) end
-- * sets background image for hotbar --- change a value of a previously added HUD
--* `hud_get_hotbar_image`: returns texturename --- element.
--* `hud_set_hotbar_selected_image(texturename)` --- * `stat` supports the same keys as in the hud definition table except for
-- * sets image for selected item of hotbar --- `"hud_elem_type"`.
--* `hud_get_hotbar_selected_image`: returns texturename function Player:hud_change(id, stat, value) end
--* `set_minimap_modes({mode, mode, ...}, selected_mode)` --- gets the HUD element definition structure of the specified ID
-- * Overrides the available minimap modes (and toggle order), and changes the function Player:hud_get(id) end
-- selected mode. --- sets specified HUD flags of player.
-- * `mode` is a table consisting of up to four fields: --- * `flags`: A table with the following fields set to boolean values
-- * `type`: Available type: --- * `hotbar`
-- * `off`: Minimap off --- * `healthbar`
-- * `surface`: Minimap in surface mode --- * `crosshair`
-- * `radar`: Minimap in radar mode --- * `wielditem`
-- * `texture`: Texture to be displayed instead of terrain map --- * `breathbar`
-- (texture is centered around 0,0 and can be scaled). --- * `minimap`: Modifies the client's permission to view the minimap.
-- Texture size is limited to 512 x 512 pixel. --- The client may locally elect to not view the minimap.
-- * `label`: Optional label to display on minimap mode toggle --- * `minimap_radar`: is only usable when `minimap` is true
-- The translation must be handled within the mod. --- * `basic_debug`: Allow showing basic debug info that might give a gameplay advantage.
-- * `size`: Sidelength or diameter, in number of nodes, of the terrain --- This includes map seed, player position, look direction, the pointed node and block bounds.
-- displayed in minimap --- Does not affect players with the `debug` privilege.
-- * `texture`: Only for texture type, name of the texture to display --- * If a flag equals `nil`, the flag is not modified
-- * `scale`: Only for texture type, scale of the texture map in nodes per function Player:hud_set_flags(flags) end
-- pixel (for example a `scale` of 2 means each pixel represents a 2x2 --- returns a table of player HUD flags with boolean values.
-- nodes square) --- * See `hud_set_flags` for a list of flags that can be toggled.
-- * `selected_mode` is the mode index to be selected after modes have been changed function Player:hud_get_flags() end
-- (0 is the first mode). --- sets number of items in builtin hotbar
--* `set_sky(sky_parameters)` ---- * `count`: number of items, must be between `1` and `32`
-- * The presence of the function `set_sun`, `set_moon` or `set_stars` indicates function Player:hud_set_hotbar_itemcount(count) end
-- whether `set_sky` accepts this format. Check the legacy format otherwise. --- returns number of visible items
-- * Passing no arguments resets the sky to its default values. function Player:hud_get_hotbar_itemcount() end
-- * `sky_parameters` is a table with the following optional fields: --- * sets background image for hotbar
-- * `base_color`: ColorSpec, changes fog in "skybox" and "plain". function Player:hud_set_hotbar_image(texturename) end
-- (default: `#ffffff`) --- returns texturename
-- * `type`: Available types: function Player:hud_get_hotbar_image() end
-- * `"regular"`: Uses 0 textures, `base_color` ignored --- * sets image for selected item of hotbar
-- * `"skybox"`: Uses 6 textures, `base_color` used as fog. function Player:hud_set_hotbar_selected_image(texturename) end
-- * `"plain"`: Uses 0 textures, `base_color` used as both fog and sky. --- returns texturename
-- (default: `"regular"`) function Player:hud_get_hotbar_selected_image() end
-- * `textures`: A table containing up to six textures in the following --- modes_list: {mode, mode, ...}
-- order: Y+ (top), Y- (bottom), X- (west), X+ (east), Z+ (north), Z- (south). --- * Overrides the available minimap modes (and toggle order), and changes the
-- * `clouds`: Boolean for whether clouds appear. (default: `true`) --- selected mode.
-- * `sky_color`: A table used in `"regular"` type only, containing the --- * `mode` is a table consisting of up to four fields:
-- following values (alpha is ignored): --- * `type`: Available type:
-- * `day_sky`: ColorSpec, for the top half of the sky during the day. --- * `off`: Minimap off
-- (default: `#61b5f5`) --- * `surface`: Minimap in surface mode
-- * `day_horizon`: ColorSpec, for the bottom half of the sky during the day. --- * `radar`: Minimap in radar mode
-- (default: `#90d3f6`) --- * `texture`: Texture to be displayed instead of terrain map
-- * `dawn_sky`: ColorSpec, for the top half of the sky during dawn/sunset. --- (texture is centered around 0,0 and can be scaled).
-- (default: `#b4bafa`) --- Texture size is limited to 512 x 512 pixel.
-- The resulting sky color will be a darkened version of the ColorSpec. --- * `label`: Optional label to display on minimap mode toggle
-- Warning: The darkening of the ColorSpec is subject to change. --- The translation must be handled within the mod.
-- * `dawn_horizon`: ColorSpec, for the bottom half of the sky during dawn/sunset. --- * `size`: Sidelength or diameter, in number of nodes, of the terrain
-- (default: `#bac1f0`) --- displayed in minimap
-- The resulting sky color will be a darkened version of the ColorSpec. --- * `texture`: Only for texture type, name of the texture to display
-- Warning: The darkening of the ColorSpec is subject to change. --- * `scale`: Only for texture type, scale of the texture map in nodes per
-- * `night_sky`: ColorSpec, for the top half of the sky during the night. --- pixel (for example a `scale` of 2 means each pixel represents a 2x2
-- (default: `#006bff`) --- nodes square)
-- The resulting sky color will be a dark version of the ColorSpec. --- * `selected_mode` is the mode index to be selected after modes have been changed
-- Warning: The darkening of the ColorSpec is subject to change. --- (0 is the first mode).
-- * `night_horizon`: ColorSpec, for the bottom half of the sky during the night. function Player:set_minimap_modes(modes_list, selected_mode) end
-- (default: `#4090ff`) --- * The presence of the function `set_sun`, `set_moon` or `set_stars` indicates
-- The resulting sky color will be a dark version of the ColorSpec. --- whether `set_sky` accepts this format. Check the legacy format otherwise.
-- Warning: The darkening of the ColorSpec is subject to change. --- * Passing no arguments resets the sky to its default values.
-- * `indoors`: ColorSpec, for when you're either indoors or underground. --- * `sky_parameters` is a table with the following optional fields:
-- (default: `#646464`) --- * `base_color`: ColorSpec, changes fog in "skybox" and "plain".
-- * `fog_sun_tint`: ColorSpec, changes the fog tinting for the sun --- (default: `#ffffff`)
-- at sunrise and sunset. (default: `#f47d1d`) --- * `type`: Available types:
-- * `fog_moon_tint`: ColorSpec, changes the fog tinting for the moon --- * `"regular"`: Uses 0 textures, `base_color` ignored
-- at sunrise and sunset. (default: `#7f99cc`) --- * `"skybox"`: Uses 6 textures, `base_color` used as fog.
-- * `fog_tint_type`: string, changes which mode the directional fog --- * `"plain"`: Uses 0 textures, `base_color` used as both fog and sky.
-- abides by, `"custom"` uses `sun_tint` and `moon_tint`, while --- (default: `"regular"`)
-- `"default"` uses the classic Minetest sun and moon tinting. --- * `textures`: A table containing up to six textures in the following
-- Will use tonemaps, if set to `"default"`. (default: `"default"`) --- order: Y+ (top), Y- (bottom), X- (west), X+ (east), Z+ (north), Z- (south).
--* `set_sky(base_color, type, {texture names}, clouds)` --- * `clouds`: Boolean for whether clouds appear. (default: `true`)
-- * Deprecated. Use `set_sky(sky_parameters)` --- * `sky_color`: A table used in `"regular"` type only, containing the
-- * `base_color`: ColorSpec, defaults to white --- following values (alpha is ignored):
-- * `type`: Available types: --- * `day_sky`: ColorSpec, for the top half of the sky during the day.
-- * `"regular"`: Uses 0 textures, `bgcolor` ignored --- (default: `#61b5f5`)
-- * `"skybox"`: Uses 6 textures, `bgcolor` used --- * `day_horizon`: ColorSpec, for the bottom half of the sky during the day.
-- * `"plain"`: Uses 0 textures, `bgcolor` used --- (default: `#90d3f6`)
-- * `clouds`: Boolean for whether clouds appear in front of `"skybox"` or --- * `dawn_sky`: ColorSpec, for the top half of the sky during dawn/sunset.
-- `"plain"` custom skyboxes (default: `true`) --- (default: `#b4bafa`)
--* `get_sky(as_table)`: --- The resulting sky color will be a darkened version of the ColorSpec.
-- * `as_table`: boolean that determines whether the deprecated version of this --- Warning: The darkening of the ColorSpec is subject to change.
-- function is being used. --- * `dawn_horizon`: ColorSpec, for the bottom half of the sky during dawn/sunset.
-- * `true` returns a table containing sky parameters as defined in `set_sky(sky_parameters)`. --- (default: `#bac1f0`)
-- * Deprecated: `false` or `nil` returns base_color, type, table of textures, --- The resulting sky color will be a darkened version of the ColorSpec.
-- clouds. --- Warning: The darkening of the ColorSpec is subject to change.
--* `get_sky_color()`: --- * `night_sky`: ColorSpec, for the top half of the sky during the night.
-- * Deprecated: Use `get_sky(as_table)` instead. --- (default: `#006bff`)
-- * returns a table with the `sky_color` parameters as in `set_sky`. --- The resulting sky color will be a dark version of the ColorSpec.
--* `set_sun(sun_parameters)`: --- Warning: The darkening of the ColorSpec is subject to change.
-- * Passing no arguments resets the sun to its default values. --- * `night_horizon`: ColorSpec, for the bottom half of the sky during the night.
-- * `sun_parameters` is a table with the following optional fields: --- (default: `#4090ff`)
-- * `visible`: Boolean for whether the sun is visible. --- The resulting sky color will be a dark version of the ColorSpec.
-- (default: `true`) --- Warning: The darkening of the ColorSpec is subject to change.
-- * `texture`: A regular texture for the sun. Setting to `""` --- * `indoors`: ColorSpec, for when you're either indoors or underground.
-- will re-enable the mesh sun. (default: "sun.png", if it exists) --- (default: `#646464`)
-- The texture appears non-rotated at sunrise and rotated 180 degrees --- * `fog_sun_tint`: ColorSpec, changes the fog tinting for the sun
-- (upside down) at sunset. --- at sunrise and sunset. (default: `#f47d1d`)
-- * `tonemap`: A 512x1 texture containing the tonemap for the sun --- * `fog_moon_tint`: ColorSpec, changes the fog tinting for the moon
-- (default: `"sun_tonemap.png"`) --- at sunrise and sunset. (default: `#7f99cc`)
-- * `sunrise`: A regular texture for the sunrise texture. --- * `fog_tint_type`: string, changes which mode the directional fog
-- (default: `"sunrisebg.png"`) --- abides by, `"custom"` uses `sun_tint` and `moon_tint`, while
-- * `sunrise_visible`: Boolean for whether the sunrise texture is visible. --- `"default"` uses the classic Minetest sun and moon tinting.
-- (default: `true`) --- Will use tonemaps, if set to `"default"`. (default: `"default"`)
-- * `scale`: Float controlling the overall size of the sun. (default: `1`) function Player:set_sky(sky_parameters) end
-- Note: For legacy reasons, the sun is bigger than the moon by a factor --- * Deprecated. Use `set_sky(sky_parameters)`
-- of about `1.57` for equal `scale` values. --- * `base_color`: ColorSpec, defaults to white
--* `get_sun()`: returns a table with the current sun parameters as in --- * `type`: Available types:
-- `set_sun`. --- * `"regular"`: Uses 0 textures, `bgcolor` ignored
--* `set_moon(moon_parameters)`: --- * `"skybox"`: Uses 6 textures, `bgcolor` used
-- * Passing no arguments resets the moon to its default values. --- * `"plain"`: Uses 0 textures, `bgcolor` used
-- * `moon_parameters` is a table with the following optional fields: --- * `clouds`: Boolean for whether clouds appear in front of `"skybox"` or
-- * `visible`: Boolean for whether the moon is visible. --- `"plain"` custom skyboxes (default: `true`)
-- (default: `true`) function Player:set_sky(base_color, type, texture_names, clouds) end
-- * `texture`: A regular texture for the moon. Setting to `""` --- * `as_table`: boolean that determines whether the deprecated version of this
-- will re-enable the mesh moon. (default: `"moon.png"`, if it exists) --- function is being used.
-- The texture appears non-rotated at sunrise / moonset and rotated 180 --- * `true` returns a table containing sky parameters as defined in `set_sky(sky_parameters)`.
-- degrees (upside down) at sunset / moonrise. --- * Deprecated: `false` or `nil` returns base_color, type, table of textures,
-- Note: Relative to the sun, the moon texture is hence rotated by 180°. --- clouds.
-- You can use the `^[transformR180` texture modifier to achieve the same orientation. function Player:get_sky(as_table) end
-- * `tonemap`: A 512x1 texture containing the tonemap for the moon --- * Deprecated: Use `get_sky(as_table)` instead.
-- (default: `"moon_tonemap.png"`) --- * returns a table with the `sky_color` parameters as in `set_sky`.
-- * `scale`: Float controlling the overall size of the moon (default: `1`) function Player:get_sky_color() end
-- Note: For legacy reasons, the sun is bigger than the moon by a factor --- * Passing no arguments resets the sun to its default values.
-- of about `1.57` for equal `scale` values. --- * `sun_parameters` is a table with the following optional fields:
--* `get_moon()`: returns a table with the current moon parameters as in --- * `visible`: Boolean for whether the sun is visible.
-- `set_moon`. --- (default: `true`)
--* `set_stars(star_parameters)`: --- * `texture`: A regular texture for the sun. Setting to `""`
-- * Passing no arguments resets stars to their default values. --- will re-enable the mesh sun. (default: "sun.png", if it exists)
-- * `star_parameters` is a table with the following optional fields: --- The texture appears non-rotated at sunrise and rotated 180 degrees
-- * `visible`: Boolean for whether the stars are visible. --- (upside down) at sunset.
-- (default: `true`) --- * `tonemap`: A 512x1 texture containing the tonemap for the sun
-- * `day_opacity`: Float for maximum opacity of stars at day. --- (default: `"sun_tonemap.png"`)
-- No effect if `visible` is false. --- * `sunrise`: A regular texture for the sunrise texture.
-- (default: 0.0; maximum: 1.0; minimum: 0.0) --- (default: `"sunrisebg.png"`)
-- * `count`: Integer number to set the number of stars in --- * `sunrise_visible`: Boolean for whether the sunrise texture is visible.
-- the skybox. Only applies to `"skybox"` and `"regular"` sky types. --- (default: `true`)
-- (default: `1000`) --- * `scale`: Float controlling the overall size of the sun. (default: `1`)
-- * `star_color`: ColorSpec, sets the colors of the stars, --- Note: For legacy reasons, the sun is bigger than the moon by a factor
-- alpha channel is used to set overall star brightness. --- of about `1.57` for equal `scale` values.
-- (default: `#ebebff69`) function Player:set_sun(sun_parameters) end
-- * `scale`: Float controlling the overall size of the stars (default: `1`) --- returns a table with the current sun parameters as in
--* `get_stars()`: returns a table with the current stars parameters as in --- `set_sun`.
-- `set_stars`. function Player:get_sun() end
--* `set_clouds(cloud_parameters)`: set cloud parameters --- * Passing no arguments resets the moon to its default values.
-- * Passing no arguments resets clouds to their default values. --- * `moon_parameters` is a table with the following optional fields:
-- * `cloud_parameters` is a table with the following optional fields: --- * `visible`: Boolean for whether the moon is visible.
-- * `density`: from `0` (no clouds) to `1` (full clouds) (default `0.4`) --- (default: `true`)
-- * `color`: basic cloud color with alpha channel, ColorSpec --- * `texture`: A regular texture for the moon. Setting to `""`
-- (default `#fff0f0e5`). --- will re-enable the mesh moon. (default: `"moon.png"`, if it exists)
-- * `ambient`: cloud color lower bound, use for a "glow at night" effect. --- The texture appears non-rotated at sunrise / moonset and rotated 180
-- ColorSpec (alpha ignored, default `#000000`) --- degrees (upside down) at sunset / moonrise.
-- * `height`: cloud height, i.e. y of cloud base (default per conf, --- Note: Relative to the sun, the moon texture is hence rotated by 180°.
-- usually `120`) --- You can use the `^[transformR180` texture modifier to achieve the same orientation.
-- * `thickness`: cloud thickness in nodes (default `16`) --- * `tonemap`: A 512x1 texture containing the tonemap for the moon
-- * `speed`: 2D cloud speed + direction in nodes per second --- (default: `"moon_tonemap.png"`)
-- (default `{x=0, z=-2}`). --- * `scale`: Float controlling the overall size of the moon (default: `1`)
--* `get_clouds()`: returns a table with the current cloud parameters as in --- Note: For legacy reasons, the sun is bigger than the moon by a factor
-- `set_clouds`. --- of about `1.57` for equal `scale` values.
--* `override_day_night_ratio(ratio or nil)` function Player:set_moon(moon_parameters) end
-- * `0`...`1`: Overrides day-night ratio, controlling sunlight to a specific --- returns a table with the current moon parameters as in
-- amount. --- `set_moon`.
-- * `nil`: Disables override, defaulting to sunlight based on day-night cycle function Player:get_moon() end
--* `get_day_night_ratio()`: returns the ratio or nil if it isn't overridden --- * Passing no arguments resets stars to their default values.
--* `set_local_animation(idle, walk, dig, walk_while_dig, frame_speed)`: --- * `star_parameters` is a table with the following optional fields:
-- set animation for player model in third person view. --- * `visible`: Boolean for whether the stars are visible.
-- * Every animation equals to a `{x=starting frame, y=ending frame}` table. --- (default: `true`)
-- * `frame_speed` sets the animations frame speed. Default is 30. --- * `day_opacity`: Float for maximum opacity of stars at day.
--* `get_local_animation()`: returns idle, walk, dig, walk_while_dig tables and --- No effect if `visible` is false.
-- `frame_speed`. --- (default: 0.0; maximum: 1.0; minimum: 0.0)
--* `set_eye_offset([firstperson, thirdperson])`: defines offset vectors for --- * `count`: Integer number to set the number of stars in
-- camera per player. An argument defaults to `{x=0, y=0, z=0}` if unspecified. --- the skybox. Only applies to `"skybox"` and `"regular"` sky types.
-- * in first person view --- (default: `1000`)
-- * in third person view (max. values `{x=-10/10,y=-10,15,z=-5/5}`) --- * `star_color`: ColorSpec, sets the colors of the stars,
--* `get_eye_offset()`: returns first and third person offsets. --- alpha channel is used to set overall star brightness.
--* `send_mapblock(blockpos)`: --- (default: `#ebebff69`)
-- * Sends an already loaded mapblock to the player. --- * `scale`: Float controlling the overall size of the stars (default: `1`)
-- * Returns `false` if nothing was sent (note that this can also mean that function Player:set_stars(star_parameters) end
-- the client already has the block) --- returns a table with the current stars parameters as in
-- * Resource intensive - use sparsely --- `set_stars`.
--* `set_lighting(light_definition)`: sets lighting for the player function Player:get_stars() end
-- * `light_definition` is a table with the following optional fields: --- set cloud parameters
-- * `saturation` sets the saturation (vividness). --- * Passing no arguments resets clouds to their default values.
-- values > 1 increase the saturation --- * `cloud_parameters` is a table with the following optional fields:
-- values in [0,1) decrease the saturation --- * `density`: from `0` (no clouds) to `1` (full clouds) (default `0.4`)
-- * This value has no effect on clients who have the "Tone Mapping" shader disabled. --- * `color`: basic cloud color with alpha channel, ColorSpec
-- * `shadows` is a table that controls ambient shadows --- (default `#fff0f0e5`).
-- * `intensity` sets the intensity of the shadows from 0 (no shadows, default) to 1 (blackness) --- * `ambient`: cloud color lower bound, use for a "glow at night" effect.
-- * This value has no effect on clients who have the "Dynamic Shadows" shader disabled. --- ColorSpec (alpha ignored, default `#000000`)
--* `get_lighting()`: returns the current state of lighting for the player. --- * `height`: cloud height, i.e. y of cloud base (default per conf,
-- * Result is a table with the same fields as `light_definition` in `set_lighting`. --- usually `120`)
--* `respawn()`: Respawns the player using the same mechanism as the death screen, --- * `thickness`: cloud thickness in nodes (default `16`)
-- including calling on_respawnplayer callbacks. --- * `speed`: 2D cloud speed + direction in nodes per second
--- (default `{x=0, z=-2}`).
function Player:set_clouds(cloud_parameters) end
--- returns a table with the current cloud parameters as in
--- `set_clouds`.
function Player:get_clouds() end
--- * `0`...`1`: Overrides day-night ratio, controlling sunlight to a specific
--- amount.
--- * `nil`: Disables override, defaulting to sunlight based on day-night cycle
function Player:override_day_night_ratio(ratio) end
--- returns the ratio or nil if it isn't overridden
function Player:get_day_night_ratio() end
--- set animation for player model in third person view.
--- * Every animation equals to a `{x=starting frame, y=ending frame}` table.
--- * `frame_speed` sets the animations frame speed. Default is 30.
function Player:set_local_animation(idle, walk, dig, walk_while_dig, frame_speed) end
--- returns idle, walk, dig, walk_while_dig tables and
--- `frame_speed`.
function Player:get_local_animation() end
--- defines offset vectors for
--- camera per player. An argument defaults to `{x=0, y=0, z=0}` if unspecified.
--- * in first person view
--- * in third person view (max. values `{x=-10/10,y=-10,15,z=-5/5}`)
--- v -- [firstperson, thirdperson]
function Player:set_eye_offset(v) end
--- returns first and third person offsets.
function Player:get_eye_offset() end
--- * Sends an already loaded mapblock to the player.
--- * Returns `false` if nothing was sent (note that this can also mean that
--- the client already has the block)
--- * Resource intensive - use sparsely
function Player:send_mapblock(blockpos) end
--- sets lighting for the player
--- * `light_definition` is a table with the following optional fields:
--- * `saturation` sets the saturation (vividness).
--- values > 1 increase the saturation
--- values in [0,1) decrease the saturation
--- * This value has no effect on clients who have the "Tone Mapping" shader disabled.
--- * `shadows` is a table that controls ambient shadows
--- * `intensity` sets the intensity of the shadows from 0 (no shadows, default) to 1 (blackness)
--- * This value has no effect on clients who have the "Dynamic Shadows" shader disabled.
function Player:set_lighting(light_definition) end
--- returns the current state of lighting for the player.
--- * Result is a table with the same fields as `light_definition` in `set_lighting`.
function Player:get_lighting() end
--- Respawns the player using the same mechanism as the death screen,
--- including calling on_respawnplayer callbacks.
function Player:respawn() end