Merge branch 'master' of ssh://git.minetest.land:29418/MineClone2/MineClone2

This commit is contained in:
AFCMS 2021-05-15 12:19:29 +02:00
commit 4992a05c2b
5 changed files with 63 additions and 75 deletions

@ -938,12 +938,15 @@ mobs.mob_step = function(self, dtime)
end end
end end
if self.burn_timer == 0 and minetest_get_node_light(pos) > 12 and minetest_get_node_light(pos, 0.5) == 15 then if self.burn_timer == 0 then
local light_current, light_day = minetest_get_node_light(pos), minetest_get_node_light(pos, 0.5)
if light_current and light_day and light_current > 12 and light_day == 15 then
mcl_burning.set_on_fire(self.object, 1) mcl_burning.set_on_fire(self.object, 1)
self.burn_timer = 1 --1.7 seconds self.burn_timer = 1 --1.7 seconds
self.pause_timer = 0.4 self.pause_timer = 0.4
end end
end end
end

@ -13,36 +13,21 @@ local craft_planks = function(output, input)
}) })
end end
craft_planks("", "tree") local planks = {
craft_planks("", "tree_bark") {"", "oak"},
craft_planks("", "stripped_oak") {"dark", "dark_oak"},
craft_planks("", "stripped_oak_bark") {"jungle", "jungle"},
{"acacia", "acacia"},
craft_planks("dark", "darktree") {"spruce", "spruce"},
craft_planks("dark", "darktree_bark") {"birch", "birch"}
craft_planks("dark", "stripped_dark_oak") }
craft_planks("dark", "stripped_dark_oak_bark")
craft_planks("jungle", "jungletree")
craft_planks("jungle", "jungletree_bark")
craft_planks("jungle", "stripped_jungle")
craft_planks("jungle", "stripped_jungle_bark")
craft_planks("acacia", "acaciatree")
craft_planks("acacia", "acaciatree_bark")
craft_planks("acacia", "stripped_acacia")
craft_planks("acacia", "stripped_acacia_bark")
craft_planks("spruce", "sprucetree")
craft_planks("spruce", "sprucetree_bark")
craft_planks("spruce", "stripped_spruce")
craft_planks("spruce", "stripped_spruce_bark")
craft_planks("birch", "birchtree")
craft_planks("birch", "birchtree_bark")
craft_planks("birch", "stripped_birch")
craft_planks("birch", "stripped_birch_bark")
for _, p in pairs(planks) do
craft_planks(p[1], p[1].."tree")
craft_planks(p[1], p[1].."tree_bark")
craft_planks(p[1], "stripped_"..p[2])
craft_planks(p[1], "stripped_"..p[2].."_bark")
end
minetest.register_craft({ minetest.register_craft({
type = 'shapeless', type = 'shapeless',

@ -107,7 +107,7 @@ minetest.register_globalstep(function(dtime)
EF.invisible[player].timer = EF.invisible[player].timer + dtime EF.invisible[player].timer = EF.invisible[player].timer + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#B0B0B0") end if player:get_pos() then mcl_potions._add_spawner(player, "#7F8392") end
if EF.invisible[player].timer >= EF.invisible[player].dur then if EF.invisible[player].timer >= EF.invisible[player].dur then
mcl_potions.make_invisible(player, false) mcl_potions.make_invisible(player, false)
@ -129,7 +129,7 @@ minetest.register_globalstep(function(dtime)
EF.poisoned[player].timer = EF.poisoned[player].timer + dtime EF.poisoned[player].timer = EF.poisoned[player].timer + dtime
EF.poisoned[player].hit_timer = (EF.poisoned[player].hit_timer or 0) + dtime EF.poisoned[player].hit_timer = (EF.poisoned[player].hit_timer or 0) + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#225533") end if player:get_pos() then mcl_potions._add_spawner(player, "#4E9331") end
if EF.poisoned[player].hit_timer >= EF.poisoned[player].step then if EF.poisoned[player].hit_timer >= EF.poisoned[player].step then
if mcl_util.get_hp(player) - 1 > 0 then if mcl_util.get_hp(player) - 1 > 0 then
@ -158,7 +158,7 @@ minetest.register_globalstep(function(dtime)
EF.regenerating[player].timer = EF.regenerating[player].timer + dtime EF.regenerating[player].timer = EF.regenerating[player].timer + dtime
EF.regenerating[player].heal_timer = (EF.regenerating[player].heal_timer or 0) + dtime EF.regenerating[player].heal_timer = (EF.regenerating[player].heal_timer or 0) + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#A52BB2") end if player:get_pos() then mcl_potions._add_spawner(player, "#CD5CAB") end
if EF.regenerating[player].heal_timer >= EF.regenerating[player].step then if EF.regenerating[player].heal_timer >= EF.regenerating[player].step then
@ -192,7 +192,7 @@ minetest.register_globalstep(function(dtime)
EF.water_breathing[player].timer = EF.water_breathing[player].timer + dtime EF.water_breathing[player].timer = EF.water_breathing[player].timer + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#0000AA") end if player:get_pos() then mcl_potions._add_spawner(player, "#2E5299") end
if player:get_breath() then if player:get_breath() then
if player:get_breath() < 10 then player:set_breath(10) end if player:get_breath() < 10 then player:set_breath(10) end
@ -217,7 +217,7 @@ minetest.register_globalstep(function(dtime)
EF.leaping[player].timer = EF.leaping[player].timer + dtime EF.leaping[player].timer = EF.leaping[player].timer + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#00CC33") end if player:get_pos() then mcl_potions._add_spawner(player, "#22FF4C") end
if EF.leaping[player].timer >= EF.leaping[player].dur then if EF.leaping[player].timer >= EF.leaping[player].dur then
playerphysics.remove_physics_factor(player, "jump", "mcl_potions:leaping") playerphysics.remove_physics_factor(player, "jump", "mcl_potions:leaping")
@ -239,7 +239,7 @@ minetest.register_globalstep(function(dtime)
EF.swift[player].timer = EF.swift[player].timer + dtime EF.swift[player].timer = EF.swift[player].timer + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#009999") end if player:get_pos() then mcl_potions._add_spawner(player, "#7CAFC6") end
if EF.swift[player].timer >= EF.swift[player].dur then if EF.swift[player].timer >= EF.swift[player].dur then
playerphysics.remove_physics_factor(player, "speed", "mcl_potions:swiftness") playerphysics.remove_physics_factor(player, "speed", "mcl_potions:swiftness")
@ -261,7 +261,7 @@ minetest.register_globalstep(function(dtime)
EF.night_vision[player].timer = EF.night_vision[player].timer + dtime EF.night_vision[player].timer = EF.night_vision[player].timer + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#1010AA") end if player:get_pos() then mcl_potions._add_spawner(player, "#1F1FA1") end
if EF.night_vision[player].timer >= EF.night_vision[player].dur then if EF.night_vision[player].timer >= EF.night_vision[player].dur then
EF.night_vision[player] = nil EF.night_vision[player] = nil
@ -286,7 +286,7 @@ minetest.register_globalstep(function(dtime)
EF.fire_proof[player].timer = EF.fire_proof[player].timer + dtime EF.fire_proof[player].timer = EF.fire_proof[player].timer + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#E0B050") end if player:get_pos() then mcl_potions._add_spawner(player, "#E49A3A") end
if EF.fire_proof[player].timer >= EF.fire_proof[player].dur then if EF.fire_proof[player].timer >= EF.fire_proof[player].dur then
EF.fire_proof[player] = nil EF.fire_proof[player] = nil
@ -307,7 +307,7 @@ minetest.register_globalstep(function(dtime)
EF.weak[player].timer = EF.weak[player].timer + dtime EF.weak[player].timer = EF.weak[player].timer + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#7700BB") end if player:get_pos() then mcl_potions._add_spawner(player, "#484D48") end
if EF.weak[player].timer >= EF.weak[player].dur then if EF.weak[player].timer >= EF.weak[player].dur then
EF.weak[player] = nil EF.weak[player] = nil
@ -328,7 +328,7 @@ minetest.register_globalstep(function(dtime)
EF.strong[player].timer = EF.strong[player].timer + dtime EF.strong[player].timer = EF.strong[player].timer + dtime
if player:get_pos() then mcl_potions._add_spawner(player, "#7700BB") end if player:get_pos() then mcl_potions._add_spawner(player, "#932423") end
if EF.strong[player].timer >= EF.strong[player].dur then if EF.strong[player].timer >= EF.strong[player].dur then
EF.strong[player] = nil EF.strong[player] = nil

@ -459,7 +459,7 @@ local healing_def = {
_tt = S("+4 HP"), _tt = S("+4 HP"),
_tt_2 = S("+8 HP"), _tt_2 = S("+8 HP"),
_longdesc = S("Instantly heals."), _longdesc = S("Instantly heals."),
color = "#CC0000", color = "#F82423",
effect = 4, effect = 4,
instant = true, instant = true,
on_use = mcl_potions.healing_func, on_use = mcl_potions.healing_func,
@ -473,7 +473,7 @@ local harming_def = {
_tt = S("-6 HP"), _tt = S("-6 HP"),
_tt_II = S("-12 HP"), _tt_II = S("-12 HP"),
_longdesc = S("Instantly deals damage."), _longdesc = S("Instantly deals damage."),
color = "#660099", color = "#430A09",
effect = -6, effect = -6,
instant = true, instant = true,
on_use = mcl_potions.healing_func, on_use = mcl_potions.healing_func,
@ -486,7 +486,7 @@ local night_vision_def = {
description = S("Night Vision"), description = S("Night Vision"),
_tt = nil, _tt = nil,
_longdesc = S("Increases the perceived brightness of light under a dark sky."), _longdesc = S("Increases the perceived brightness of light under a dark sky."),
color = "#1010AA", color = "#1F1FA1",
effect = nil, effect = nil,
is_dur = true, is_dur = true,
on_use = mcl_potions.night_vision_func, on_use = mcl_potions.night_vision_func,
@ -498,7 +498,7 @@ local swiftness_def = {
description = S("Swiftness"), description = S("Swiftness"),
_tt = nil, _tt = nil,
_longdesc = S("Increases walking speed."), _longdesc = S("Increases walking speed."),
color = "#009999", color = "#7CAFC6",
effect = 1.2, effect = 1.2,
is_dur = true, is_dur = true,
on_use = mcl_potions.swiftness_func, on_use = mcl_potions.swiftness_func,
@ -511,7 +511,7 @@ local slowness_def = {
description = S("Slowness"), description = S("Slowness"),
_tt = nil, _tt = nil,
_longdesc = S("Decreases walking speed."), _longdesc = S("Decreases walking speed."),
color = "#000080", color = "#5A6C81",
effect = 0.85, effect = 0.85,
is_dur = true, is_dur = true,
on_use = mcl_potions.swiftness_func, on_use = mcl_potions.swiftness_func,
@ -525,7 +525,7 @@ local leaping_def = {
description = S("Leaping"), description = S("Leaping"),
_tt = nil, _tt = nil,
_longdesc = S("Increases jump strength."), _longdesc = S("Increases jump strength."),
color = "#00CC33", color = "#22FF4C",
effect = 1.15, effect = 1.15,
is_dur = true, is_dur = true,
on_use = mcl_potions.leaping_func, on_use = mcl_potions.leaping_func,
@ -538,7 +538,7 @@ local poison_def = {
description = S("Poison"), description = S("Poison"),
_tt = nil, _tt = nil,
_longdesc = S("Applies the poison effect which deals damage at a regular interval."), _longdesc = S("Applies the poison effect which deals damage at a regular interval."),
color = "#447755", color = "#4E9331",
effect = 2.5, effect = 2.5,
is_dur = true, is_dur = true,
on_use = mcl_potions.poison_func, on_use = mcl_potions.poison_func,
@ -552,7 +552,7 @@ local regeneration_def = {
description = S("Regeneration"), description = S("Regeneration"),
_tt = nil, _tt = nil,
_longdesc = S("Regenerates health over time."), _longdesc = S("Regenerates health over time."),
color = "#B52CC2", color = "#CD5CAB",
effect = 2.5, effect = 2.5,
is_dur = true, is_dur = true,
on_use = mcl_potions.regeneration_func, on_use = mcl_potions.regeneration_func,
@ -565,7 +565,7 @@ local invisibility_def = {
description = S("Invisibility"), description = S("Invisibility"),
_tt = nil, _tt = nil,
_longdesc = S("Grants invisibility."), _longdesc = S("Grants invisibility."),
color = "#B0B0B0", color = "#7F8392",
is_dur = true, is_dur = true,
on_use = mcl_potions.invisiblility_func, on_use = mcl_potions.invisiblility_func,
is_plus = true, is_plus = true,
@ -576,7 +576,7 @@ local water_breathing_def = {
description = S("Water Breathing"), description = S("Water Breathing"),
_tt = nil, _tt = nil,
_longdesc = S("Grants limitless breath underwater."), _longdesc = S("Grants limitless breath underwater."),
color = "#0000AA", color = "#2E5299",
is_dur = true, is_dur = true,
on_use = mcl_potions.water_breathing_func, on_use = mcl_potions.water_breathing_func,
is_plus = true, is_plus = true,
@ -587,7 +587,7 @@ local fire_resistance_def = {
description = S("Fire Resistance"), description = S("Fire Resistance"),
_tt = nil, _tt = nil,
_longdesc = S("Grants immunity to damage from heat sources like fire."), _longdesc = S("Grants immunity to damage from heat sources like fire."),
color = "#D0A040", color = "#E49A3A",
is_dur = true, is_dur = true,
on_use = mcl_potions.fire_resistance_func, on_use = mcl_potions.fire_resistance_func,
is_plus = true, is_plus = true,
@ -611,22 +611,22 @@ end
-- description = S("Weakness"), -- description = S("Weakness"),
-- _tt_help = TODO, -- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp, -- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#6600AA"), -- wield_image = potion_image("#484D48"),
-- inventory_image = potion_image("#6600AA"), -- inventory_image = potion_image("#484D48"),
-- groups = { brewitem=1, food=3, can_eat_when_full=1 }, -- groups = { brewitem=1, food=3, can_eat_when_full=1 },
-- stack_max = 1, -- stack_max = 1,
-- --
-- on_place = function(itemstack, user, pointed_thing) -- on_place = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR) -- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#6600AA") -- mcl_potions._use_potion(itemstack, user, "#484D48")
-- return itemstack -- return itemstack
-- end, -- end,
-- --
-- on_secondary_use = function(itemstack, user, pointed_thing) -- on_secondary_use = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR) -- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#6600AA") -- mcl_potions._use_potion(itemstack, user, "#484D48")
-- return itemstack -- return itemstack
-- end -- end
-- }) -- })
@ -635,22 +635,22 @@ end
-- description = S("Weakness +"), -- description = S("Weakness +"),
-- _tt_help = TODO, -- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp, -- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#7700BB"), -- wield_image = potion_image("#484D48"),
-- inventory_image = potion_image("#7700BB"), -- inventory_image = potion_image("#484D48"),
-- groups = { brewitem=1, food=3, can_eat_when_full=1 }, -- groups = { brewitem=1, food=3, can_eat_when_full=1 },
-- stack_max = 1, -- stack_max = 1,
-- --
-- on_place = function(itemstack, user, pointed_thing) -- on_place = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR) -- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#7700BB") -- mcl_potions._use_potion(itemstack, user, "#484D48")
-- return itemstack -- return itemstack
-- end, -- end,
-- --
-- on_secondary_use = function(itemstack, user, pointed_thing) -- on_secondary_use = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR) -- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#7700BB") -- mcl_potions._use_potion(itemstack, user, "#484D48")
-- return itemstack -- return itemstack
-- end -- end
-- }) -- })
@ -659,22 +659,22 @@ end
-- description = S("Strength"), -- description = S("Strength"),
-- _tt_help = TODO, -- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp, -- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#D444D4"), -- wield_image = potion_image("#932423"),
-- inventory_image = potion_image("#D444D4"), -- inventory_image = potion_image("#932423"),
-- groups = { brewitem=1, food=3, can_eat_when_full=1 }, -- groups = { brewitem=1, food=3, can_eat_when_full=1 },
-- stack_max = 1, -- stack_max = 1,
-- --
-- on_place = function(itemstack, user, pointed_thing) -- on_place = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION) -- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#D444D4") -- mcl_potions._use_potion(itemstack, user, "#932423")
-- return itemstack -- return itemstack
-- end, -- end,
-- --
-- on_secondary_use = function(itemstack, user, pointed_thing) -- on_secondary_use = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION) -- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#D444D4") -- mcl_potions._use_potion(itemstack, user, "#932423")
-- return itemstack -- return itemstack
-- end -- end
-- }) -- })
@ -683,22 +683,22 @@ end
-- description = S("Strength II"), -- description = S("Strength II"),
-- _tt_help = TODO, -- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp, -- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#D444E4"), -- wield_image = potion_image("#932423"),
-- inventory_image = potion_image("#D444E4"), -- inventory_image = potion_image("#932423"),
-- groups = { brewitem=1, food=3, can_eat_when_full=1 }, -- groups = { brewitem=1, food=3, can_eat_when_full=1 },
-- stack_max = 1, -- stack_max = 1,
-- --
-- on_place = function(itemstack, user, pointed_thing) -- on_place = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, 6, mcl_potions.DURATION_2) -- mcl_potions.weakness_func(user, 6, mcl_potions.DURATION_2)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#D444E4") -- mcl_potions._use_potion(itemstack, user, "#932423")
-- return itemstack -- return itemstack
-- end, -- end,
-- --
-- on_secondary_use = function(itemstack, user, pointed_thing) -- on_secondary_use = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, 6, mcl_potions.DURATION_2) -- mcl_potions.weakness_func(user, 6, mcl_potions.DURATION_2)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#D444E4") -- mcl_potions._use_potion(itemstack, user, "#932423")
-- return itemstack -- return itemstack
-- end -- end
-- }) -- })
@ -707,22 +707,22 @@ end
-- description = S("Strength +"), -- description = S("Strength +"),
-- _tt_help = TODO, -- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp, -- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#D444F4"), -- wield_image = potion_image("#932423"),
-- inventory_image = potion_image("#D444F4"), -- inventory_image = potion_image("#932423"),
-- groups = { brewitem=1, food=3, can_eat_when_full=1 }, -- groups = { brewitem=1, food=3, can_eat_when_full=1 },
-- stack_max = 1, -- stack_max = 1,
-- --
-- on_place = function(itemstack, user, pointed_thing) -- on_place = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION_PLUS) -- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION_PLUS)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#D444F4") -- mcl_potions._use_potion(itemstack, user, "#932423")
-- return itemstack -- return itemstack
-- end, -- end,
-- --
-- on_secondary_use = function(itemstack, user, pointed_thing) -- on_secondary_use = function(itemstack, user, pointed_thing)
-- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION_PLUS) -- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION_PLUS)
-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) -- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
-- mcl_potions._use_potion(itemstack, user, "#D444F4") -- mcl_potions._use_potion(itemstack, user, "#932423")
-- return itemstack -- return itemstack
-- end -- end
-- }) -- })

@ -3974,7 +3974,7 @@ if mg_name ~= "singlenode" then
mcl_mapgen_core.register_generator("chorus_grow", nil, function(minp, maxp, blockseed) mcl_mapgen_core.register_generator("chorus_grow", nil, function(minp, maxp, blockseed)
local gennotify = minetest.get_mapgen_object("gennotify") local gennotify = minetest.get_mapgen_object("gennotify")
--local poslist = {} --local poslist = {}
local pr = PseudoRandom(blockseed + 14) pr = PseudoRandom(blockseed + 14)
for _, pos in ipairs(gennotify["decoration#"..deco_id_chorus_plant] or {}) do for _, pos in ipairs(gennotify["decoration#"..deco_id_chorus_plant] or {}) do
local x, y, z = pos.x, pos.y, pos.z local x, y, z = pos.x, pos.y, pos.z
if x < -2 or x > 2 or z < -2 or z > 2 then if x < -2 or x > 2 or z < -2 or z > 2 then