Skip to content

Commit

Permalink
Merge pull request #13 from Niklp09/abm
Browse files Browse the repository at this point in the history
optimize coconut spawn ABM
  • Loading branch information
wsor4035 committed Aug 19, 2022
2 parents cbe846d + 87a997b commit c4d1dde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cocos_palm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ end
-- ABM converts the trunk to a regular fruit trunk, and spawns some coconuts)
minetest.register_abm({
nodenames = { "moretrees:palm_fruit_trunk_gen" },
interval = 1,
interval = 6,
chance = 1,
min_y = biome_lib.mapgen_elevation_limit.min,
max_y = biome_lib.mapgen_elevation_limit.max,
label = "converts palm trunk to a regular fruit trunk, and spawns some coconuts",
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.swap_node(pos, {name="moretrees:palm_fruit_trunk"})
local poslist = minetest.find_nodes_in_area(
Expand Down

0 comments on commit c4d1dde

Please sign in to comment.