mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Add min_y and max_y checks for Active Block Modifiers (ABM) (#11333)
This check can be used by ABM to reduce CPU usage.
This commit is contained in:
parent
1805775f3d
commit
b10091be9b
6 changed files with 41 additions and 3 deletions
|
@ -4484,6 +4484,8 @@ Utilities
|
|||
-- degrotate param2 rotates in units of 1.5° instead of 2°
|
||||
-- thus changing the range of values from 0-179 to 0-240 (5.5.0)
|
||||
degrotate_240_steps = true,
|
||||
-- ABM supports min_y and max_y fields in definition (5.5.0)
|
||||
abm_min_max_y = true,
|
||||
}
|
||||
|
||||
* `minetest.has_feature(arg)`: returns `boolean, missing_features`
|
||||
|
@ -7187,6 +7189,11 @@ Used by `minetest.register_abm`.
|
|||
chance = 1,
|
||||
-- Chance of triggering `action` per-node per-interval is 1.0 / this
|
||||
-- value
|
||||
|
||||
min_y = -32768,
|
||||
max_y = 32767,
|
||||
-- min and max height levels where ABM will be processed
|
||||
-- can be used to reduce CPU usage
|
||||
|
||||
catch_up = true,
|
||||
-- If true, catch-up behaviour is enabled: The `chance` value is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue