mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-07 06:06:10 -04:00
Consolidate ABMs
Spread ABM intervals evenly across 1 to 16 seconds 16s ensures no nodes are missed when player walks past Adjust chance values to compensate, for identical action rates Combine lavacooling ABMs into one, return to chance = 1 Grass growth: add 'neighbors = "air"' to avoid processing the thousands of underground dirt nodes Grass death: Reduce action rate to that of grass growth Fire: Use chance = 1 for flame extinguishing and flame removal when mod is disabled
This commit is contained in:
parent
04f01bc57f
commit
7d2dfe4101
6 changed files with 28 additions and 40 deletions
|
@ -264,8 +264,8 @@ farming.register_plant = function(name, def)
|
|||
minetest.register_abm({
|
||||
nodenames = {"group:" .. pname, "group:seed"},
|
||||
neighbors = {"group:soil"},
|
||||
interval = 90,
|
||||
chance = 2,
|
||||
interval = 9,
|
||||
chance = 20,
|
||||
action = function(pos, node)
|
||||
local plant_height = minetest.get_item_group(node.name, pname)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue