From 5e2b4f4dc04906ddf6a08893ad2d33f2b92fc2f3 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 15 Mar 2017 05:36:11 +0100 Subject: [PATCH] Spawn melons in jungles --- mods/MAPGEN/mcl_mapgen_core/init.lua | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 508cbc100d..9e8289237e 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -725,9 +725,9 @@ local function register_mgv6_decorations() minetest.register_decoration({ deco_type = "simple", place_on = {"mcl_core:dirt_with_grass"}, - sidelen = 666, + sidelen = 16, noise_params = { - offset = -0.005, + offset = -0.007, scale = 0.00666, spread = {x = 250, y = 250, z = 250}, seed = 666, @@ -739,6 +739,28 @@ local function register_mgv6_decorations() decoration = "mcl_farming:pumpkin_face", }) + -- Melon + minetest.register_decoration({ + deco_type = "simple", + place_on = {"mcl_core:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.002, + scale = 0.006, + spread = {x = 250, y = 250, z = 250}, + seed = 333, + octaves = 3, + persist = 0.6 + }, + -- Small trick to make sure melon spawn in jungles + spawn_by = { "mcl_core:jungletree", "mcl_flowers:fern" }, + num_spawn_by = 1, + y_min = 1, + y_max = 40, + decoration = "mcl_farming:melon", + }) + + end minetest.register_on_generated(function(minp, maxp, seed)