1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 19:42:10 +00:00

Merge remote-tracking branch 'upstream/master' into Visuals-Vol-2

This commit is contained in:
Gefüllte Taubenbrust 2025-08-04 17:41:50 +02:00
commit 66aeedc74d
667 changed files with 34156 additions and 87678 deletions

60
doc/README.md Normal file
View file

@ -0,0 +1,60 @@
# Documentation
This directory contains mostly reference documentation for the Luanti engine.
For a less prescriptive and more guiding documentation, also look at:
https://docs.luanti.org
Note that the inner workings of the engine are not well documented. It's most
often better to read the code.
Markdown files are written in a way that they can also be read in plain text.
When modifying, please keep it that way!
Here is a list with descriptions of relevant files:
## Server Modding
- [lua_api.md](lua_api.md): Server Modding API reference. (Not only the Lua part,
but also file structure and everything else.)
If you want to make a mod or game, look here!
A rendered version is also available at <https://api.luanti.org/>.
- [builtin_entities.md](builtin_entities.md): Doc for entities predefined by the
engine (in builtin), i.e. dropped items and falling nodes.
## Client-Side Content
- [texture_packs.md](texture_packs.md): Layout and description of Luanti's
texture packs structure and configuration.
- [client_lua_api.md](client_lua_api.md): Client-Provided Client-Side Modding
(CPCSM) API reference.
## Mainmenu scripting
- [menu_lua_api.md](menu_lua_api.md): API reference for the mainmenu scripting
environment.
- [fst_api.txt](fst_api.txt): Formspec Toolkit API, included in builtin for the
main menu.
## Formats and Protocols
- [world_format.md](world_format.md): Structure of Luanti world directories and
format of the files therein.
Note: If you want to write your own deserializer, it will be easier to read
the `serialize()` and `deSerialize()` functions of the various structures in
C++, e.g. `MapBlock::deSerialize()`.
- [protocol.txt](protocol.txt): *Rough* outline of Luanti's network protocol.
## Misc.
- [compiling/](compiling/): Compilation instructions, and options.
- [ides/](ides/): Instructions for configuring certain IDEs for engine development.
- [developing/](developing/): Information about Luanti development.
Note: [developing/profiling.md](developing/profiling.md) can be useful for
modders and server owners!
- [android.md](android.md): Android quirks.
- [direction.md](direction.md): Information related to the future direction of
Luanti. Commonly referred to as the roadmap document.
- [breakages.md](breakages.md): List of planned breakages for the next major
release, i.e. 6.0.0.
- [docker_server.md](docker_server.md): Information about our Docker server
images in the ghcr.

View file

@ -42,7 +42,7 @@ configuration file can usually be found at:
* After 5.4.2:
* `/sdcard/Android/data/net.minetest.minetest/` or `/storage/emulated/0/Android/data/net.minetest.minetest/` if stored on the device
* `/storage/emulated/(varying folder name)/Android/data/net.minetest.minetest/` if stored on the SD card
* [Learn more about Android directory](https://wiki.luanti.org/Accessing_Android_Data_Directory)
* [Learn more about Android directory](https://docs.luanti.org/for-players/mobile/)
## Useful settings

View file

@ -25,3 +25,4 @@ This list is largely advisory and items may be reevaluated once the time comes.
* remove built-in knockback and related functions entirely
* remove `safe` parameter from `core.serialize`, always enforce `safe = true`.
possibly error when `loadstring` calls are encountered in `core.deserialize`.
* introduce strict type checking for all instances of `v3s16` / `v3f` read from Lua

View file

@ -1,12 +1,15 @@
Luanti Lua Client Modding API Reference 5.12.0
Luanti Lua Client Modding API Reference 5.14.0
==============================================
**WARNING**: if you're looking for the `minetest` namespace (e.g. `minetest.something`),
it's now called `core` due to the renaming of Luanti (formerly Minetest).
`minetest` will keep existing as an alias, so that old code won't break.
Note that `core` has already existed since version 0.4.10, so you can use it
safely without breaking backwards compatibility.
* More information at <http://www.luanti.org/>
* Developer Wiki: <https://dev.luanti.org/>
* Additional documentation: <https://docs.luanti.org/>
Introduction
------------

View file

@ -1,26 +1,27 @@
# Developer documentation
## Wiki
## Luanti Documentation
Some important development docs are found in the wiki: https://dev.luanti.org/
Some important development docs are found on the docs site: https://docs.luanti.org/
Notable pages:
- [Releasing Luanti](https://dev.luanti.org/Releasing_Luanti)
- [Engine translations](https://dev.luanti.org/Translation#Maintaining_engine_translations)
- [Changelog](https://dev.luanti.org/Changelog)
- [Organisation](https://dev.luanti.org/Organisation)
- [Code style guidelines](https://dev.luanti.org/Code_style_guidelines)
- [Releasing Luanti](https://docs.luanti.org/for-engine-devs/releasing-luanti/)
- [Engine translations](https://docs.luanti.org/for-creators/translation/)
- [Changelog](https://docs.luanti.org/about/changelog/)
- [Organisation](https://docs.luanti.org/for-engine-devs/organization/)
- [Code style guidelines](https://docs.luanti.org/for-engine-devs/code-style-guidelines/)
and [Lua code style guidelines](https://docs.luanti.org/for-engine-devs/lua-code-style-guidelines/)
## In this folder
- [Developing minetestserver with Docker](docker.md)
- [Android tips & tricks](android.md)
- [OS/library compatibility policy](os-compatibility.md)
- [Miscellaneous](misc.md)
- [docker.md](docker.md): Developing minetestserver with Docker
- [android.md](android.md): Android tips & tricks
- [os-compatibility.md](os-compatibility.md): OS/library compatibility policy
- [profiling.md](profiling.md): Profiling instructions
## IRC
Oftentimes knowledge hasn't been written down (yet) and your best bet is to ask someone experienced and/or the core developers.
Feel free to join the [#minetest-dev IRC](https://wiki.luanti.org/IRC) and ask questions related to **engine development**.
Feel free to join the [#luanti-dev IRC](https://docs.luanti.org/about/irc/) and ask questions related to **engine development**.

View file

@ -1,4 +1,4 @@
# Miscellaneous
# Profiling
## Profiling Luanti on Linux with perf

View file

@ -37,7 +37,7 @@ Examples include
[general view distance](https://github.com/luanti-org/luanti/issues/7222).
This includes work on maintaining
[our Irrlicht fork](https://github.com/minetest/irrlicht), and switching to
[our Irrlicht fork](https://github.com/luanti-org/luanti/tree/master/irr), and switching to
alternative libraries to replace Irrlicht functionality as needed
### 2.2 Internal code refactoring

View file

@ -3,8 +3,10 @@ Formspec toolkit api 0.0.3
Formspec toolkit is a set of functions to create basic ui elements.
You can find the files in builtin/fstk/.
File: fst/ui.lua
File: fstk/ui.lua
----------------
ui.lua adds base ui interface to add additional components to.
@ -25,7 +27,7 @@ ui.find_by_name(name) --> returns component or nil
^ find a component within ui
^ name: name of component to look for
File: fst/tabview.lua
File: fstk/tabview.lua
---------------------
tabview_create(name, size, tabheaderpos) --> returns tabview component
@ -92,7 +94,7 @@ methods:
* icon: path to icon
* on_click(tabview): callback function
File: fst/dialog.lua
File: fstk/dialog.lua
---------------------
Only one dialog can be shown at a time. If a dialog is closed it's parent is
gonna be activated and shown again.
@ -129,7 +131,7 @@ members:
- parent
^ parent component to return to on exit
File: fst/buttonbar.lua
File: fstk/buttonbar.lua
-----------------------
buttonbar_create(name, pos, size, bgcolor, cbf_buttonhandler)

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
Luanti Lua Mainmenu API Reference 5.12.0
Luanti Lua Mainmenu API Reference 5.14.0
========================================
Introduction
@ -23,8 +23,8 @@ Callbacks
* `core.button_handler(fields)`: called when a button is pressed.
* `fields` = `{name1 = value1, name2 = value2, ...}`
* `core.event_handler(event)`
* `event`: `"MenuQuit"`, `"KeyEnter"`, `"ExitButton"`, `"EditBoxEnter"` or
`"FullscreenChange"`
* `event`: `"MenuQuit"` (derived from `quit`) or `"FullscreenChange"`
The main menu may issue custom events, such as `"Refresh"` (server list).
* `core.on_before_close()`: called before the menu is closed, either to exit or
to join a game

View file

@ -3,7 +3,8 @@ Updated 2011-06-18
A custom protocol over UDP.
Integers are big endian.
Refer to connection.{h,cpp} for further reference.
Refer to network/mtp/internal.h, network/networkprotocol.{h,cpp}, and
server/clientiface.h for further reference.
Initialization:
- A dummy reliable packet with peer_id=PEER_ID_INEXISTENT=0 is sent to the server:

View file

@ -401,7 +401,7 @@ See below for description.
Luanti will correct lighting in the day light bank when the block at
`(1, 0, 0)` is also loaded.
Timestamp and node ID mappings were introduced in map format version 29.
Timestamp and node ID mappings come here if map format version >= 29.
* `u32` timestamp
* Timestamp when last saved, as seconds from starting the game.
* `0xffffffff` = invalid/unknown timestamp, nothing should be done with the time
@ -482,13 +482,7 @@ Timestamp and node ID mappings were introduced in map format version 29.
* `s32` timeout * 1000
* `s32` elapsed * 1000
* Since map format version 25:
* `u8` length of the data of a single timer (always 2+4+4=10)
* `u16` `num_of_timers`
* foreach `num_of_timers`:
* `u16` timer position (`(z*16*16 + y*16 + x)`)
* `s32` timeout * 1000
* `s32` elapsed * 1000
* Map format version >= 25: see below
`u8` static object version:
* Always 0
@ -516,6 +510,14 @@ Before map format version 29:
* `u16` `name_len`
* `u8[name_len]` `name`
Since map format version 25, node timers come here:
* `u8` length of the data of a single timer (always 2+4+4=10)
* `u16` `num_of_timers`
* foreach `num_of_timers`:
* `u16` timer position (`(z*16*16 + y*16 + x)`)
* `s32` timeout * 1000
* `s32` elapsed * 1000
End of File (EOF).
# Format of Nodes
@ -594,9 +596,11 @@ Object types:
* `s32` yaw * 1000
Since protocol version 37:
* `u8` `version2` (=1)
* `u8` `version2` (=1 or 2)
* `s32` pitch * 1000
* `s32` roll * 1000
* if version2 >= 2:
* `u8[16]` guid
# Itemstring Format