Update Readme
This commit is contained in:
parent
3ecba778ce
commit
f2df623fc8
16
README.md
16
README.md
@ -11,7 +11,6 @@ This mod is in early alpha.
|
||||
- Interaction of different liquid types, e.g. lava and water
|
||||
- Ability to scoop up liquids with a level below 8
|
||||
- Interaction with pistons or pipes
|
||||
- Swimming in liquids less than 8 levels high
|
||||
- Perfect performance
|
||||
- Integration with any other mods
|
||||
- A smooth liquid surface
|
||||
@ -23,13 +22,20 @@ This mod is in early alpha.
|
||||
- Settling water
|
||||
- Multi-level liquids from 1 to 8
|
||||
- Draining all oceans in a jiffy
|
||||
- Water duplication due to a [bug](https://github.com/minetest/minetest/issues/15647) in the Luanti Engine
|
||||
|
||||
## API
|
||||
|
||||
- Other developers may chose to support this mod by using the API.
|
||||
```
|
||||
--Example for the default water
|
||||
```lua
|
||||
--Example: Register default:water_source
|
||||
liquid_physics.register_liquid("default", "water_source", "water_flowing")
|
||||
```
|
||||
|
||||
**Note:** the API is not complete and may function may not be available, such as regulating the liquid level
|
||||
--Example: Check if block underneath is liquid and then proceed to reduce its level
|
||||
local id_water = liquid_physics.get_liquid_id("default:water_source")
|
||||
local liquid = liquid_physics.get_liquid_at(pos)
|
||||
|
||||
if liquid and liquid.liquid_id == id_water then
|
||||
liquid_physics.set_liquid_at(pos, id_water, liquid.liquid_level - 1)
|
||||
end
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user