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:
sfence
2021-06-20 17:21:35 +02:00
committed by GitHub
parent 1805775f3d
commit b10091be9b
6 changed files with 41 additions and 3 deletions

View File

@@ -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