Clean up grass block group stuff

This commit is contained in:
Wuzzy 2017-11-15 20:27:29 +01:00
parent 54ae1190d6
commit 8db574d30e
4 changed files with 76 additions and 72 deletions

View File

@ -645,7 +645,7 @@ local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_setting("seed")
minetest.register_abm({ minetest.register_abm({
label = "Grass Block and Mycelium spread", label = "Grass Block and Mycelium spread",
nodenames = {"mcl_core:dirt"}, nodenames = {"mcl_core:dirt"},
neighbors = {"air", "group:grass_block", "mcl_core:mycelium"}, neighbors = {"air", "group:grass_block_no_snow", "mcl_core:mycelium"},
interval = 30, interval = 30,
chance = 20, chance = 20,
catch_up = false, catch_up = false,
@ -1202,6 +1202,10 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti
def._doc_items_usagehelp = nil def._doc_items_usagehelp = nil
def._doc_items_create_entry = false def._doc_items_create_entry = false
def.groups.not_in_creative_inventory = 1 def.groups.not_in_creative_inventory = 1
if def.groups.grass_block == 1 then
def.groups.grass_block_no_snow = nil
def.groups.grass_block_snow = 1
end
-- Enderman must never take this because this block is supposed to be always buried below snow. -- Enderman must never take this because this block is supposed to be always buried below snow.
def.groups.enderman_takable = nil def.groups.enderman_takable = nil

View File

@ -303,7 +303,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
is_ground_content = true, is_ground_content = true,
stack_max = 64, stack_max = 64,
groups = {handy=1,shovely=1, grass_block=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1}, groups = {handy=1,shovely=1, grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1},
drop = 'mcl_core:dirt', drop = 'mcl_core:dirt',
sounds = mcl_sounds.node_sound_dirt_defaults({ sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4}, footstep = {name="default_grass_footstep", gain=0.4},
@ -327,7 +327,7 @@ minetest.register_node("mcl_core:dirt_with_dry_grass", {
tiles = {"default_dry_grass.png", "default_dirt.png", "default_dirt.png^default_dry_grass_side.png"}, tiles = {"default_dry_grass.png", "default_dirt.png", "default_dirt.png^default_dry_grass_side.png"},
is_ground_content = true, is_ground_content = true,
stack_max = 64, stack_max = 64,
groups = {handy=1,shovely=1, grass_block=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1, not_in_creative_inventory=1}, groups = {handy=1,shovely=1, grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1, not_in_creative_inventory=1},
drop = 'mcl_core:dirt', drop = 'mcl_core:dirt',
sounds = mcl_sounds.node_sound_dirt_defaults({ sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4}, footstep = {name="default_grass_footstep", gain=0.4},

View File

@ -1604,15 +1604,15 @@ local function register_grass_decoration(grasstype, offset, scale, biomes)
local place_on, seed, node local place_on, seed, node
if grasstype == "fern" then if grasstype == "fern" then
node = "mcl_flowers:fern" node = "mcl_flowers:fern"
place_on = {"group:grass_block", "mcl_core:podzol"} place_on = {"group:grass_block_no_snow", "mcl_core:podzol"}
seed = 333 seed = 333
elseif grasstype == "tallgrass" then elseif grasstype == "tallgrass" then
node = "mcl_flowers:tallgrass" node = "mcl_flowers:tallgrass"
place_on = {"group:grass_block"} place_on = {"group:grass_block_no_snow"}
seed = 420 seed = 420
elseif grasstype == "tallgrass_dry" then elseif grasstype == "tallgrass_dry" then
node = "mcl_flowers:tallgrass_dry" node = "mcl_flowers:tallgrass_dry"
place_on = {"group:grass_block"} place_on = {"group:grass_block_no_snow"}
seed = 420 seed = 420
end end
local noise = { local noise = {
@ -1639,7 +1639,7 @@ local function register_decorations()
-- Large ice spike -- Large ice spike
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"}, place_on = {"mcl_core:snowblock", "mcl_core:snow", "group:grass_block_snow"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.00040, offset = 0.00040,
@ -1660,7 +1660,7 @@ local function register_decorations()
-- Small ice spike -- Small ice spike
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"}, place_on = {"mcl_core:snowblock", "mcl_core:snow", "group:grass_block_snow"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.005, offset = 0.005,
@ -1683,7 +1683,7 @@ local function register_decorations()
for i=1, 2 do for i=1, 2 do
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.00075, offset = 0.00075,
@ -1703,7 +1703,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"}, place_on = {"group:grass_block", "mcl_core:dirt", },
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = -0.0004, offset = -0.0004,
@ -1724,7 +1724,7 @@ local function register_decorations()
-- Small “classic” oak (many biomes) -- Small “classic” oak (many biomes)
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.025, offset = 0.025,
@ -1743,7 +1743,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.01, offset = 0.01,
@ -1762,7 +1762,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"}, place_on = {"group:grass_block", "mcl_core:dirt", },
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.0, offset = 0.0,
@ -1782,7 +1782,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow", "mcl_core:dirt"}, place_on = {"group:grass_block", "mcl_core:dirt"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.006, offset = 0.006,
@ -1821,7 +1821,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"}, place_on = {"group:grass_block", "mcl_core:dirt", },
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.0, offset = 0.0,
@ -1840,7 +1840,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
fill_ratio = 0.004, fill_ratio = 0.004,
biomes = {"Jungle", "JungleM"}, biomes = {"Jungle", "JungleM"},
@ -1852,7 +1852,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
fill_ratio = 0.0004, fill_ratio = 0.0004,
biomes = {"JungleEdge", "JungleEdgeM", "Savanna"}, biomes = {"JungleEdge", "JungleEdgeM", "Savanna"},
@ -1867,7 +1867,7 @@ local function register_decorations()
-- Rare balloon oak -- Rare balloon oak
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.002083, offset = 0.002083,
@ -1887,7 +1887,7 @@ local function register_decorations()
-- Swamp oak -- Swamp oak
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.0055, offset = 0.0055,
@ -1911,7 +1911,7 @@ local function register_decorations()
for i=1, 2 do for i=1, 2 do
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
fill_ratio = 0.00125, fill_ratio = 0.00125,
biomes = {"Jungle"}, biomes = {"Jungle"},
@ -1923,7 +1923,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
fill_ratio = 0.004, fill_ratio = 0.004,
biomes = {"JungleM"}, biomes = {"JungleM"},
@ -1938,7 +1938,7 @@ local function register_decorations()
-- Common jungle tree -- Common jungle tree
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
fill_ratio = 0.045, fill_ratio = 0.045,
biomes = {"Jungle"}, biomes = {"Jungle"},
@ -1950,7 +1950,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
fill_ratio = 0.0045, fill_ratio = 0.0045,
biomes = {"JungleEdge", "JungleEdgeM"}, biomes = {"JungleEdge", "JungleEdgeM"},
@ -1963,7 +1963,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
fill_ratio = 0.09, fill_ratio = 0.09,
biomes = {"JungleM"}, biomes = {"JungleM"},
@ -1981,7 +1981,7 @@ local function register_decorations()
end end
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol"}, place_on = {"group:grass_block", "mcl_core:dirt", "mcl_core:podzol"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = offset, offset = offset,
@ -2034,7 +2034,7 @@ local function register_decorations()
-- Small lollipop spruce -- Small lollipop spruce
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"}, place_on = {"group:grass_block", "mcl_core:podzol"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.004, offset = 0.004,
@ -2054,7 +2054,7 @@ local function register_decorations()
-- Matchstick spruce: Very few leaves, tall trunk -- Matchstick spruce: Very few leaves, tall trunk
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"}, place_on = {"group:grass_block", "mcl_core:podzol"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = -0.025, offset = -0.025,
@ -2074,7 +2074,7 @@ local function register_decorations()
-- Rare spruce in Ice Plains -- Rare spruce in Ice Plains
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"}, place_on = {"group:grass_block"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = -0.00075, offset = -0.00075,
@ -2110,7 +2110,7 @@ local function register_decorations()
-- Birch -- Birch
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.03, offset = 0.03,
@ -2128,7 +2128,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.03, offset = 0.03,
@ -2147,7 +2147,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.000333, offset = 0.000333,
@ -2167,7 +2167,7 @@ local function register_decorations()
-- Dark Oak -- Dark Oak
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.05, offset = 0.05,
@ -2196,7 +2196,7 @@ local function register_decorations()
-- Huge Brown Mushroom -- Huge Brown Mushroom
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" }, place_on = { "group:grass_block_no_snow", "mcl_core:dirt" },
sidelen = 80, sidelen = 80,
fill_ratio = ratio_mushroom_huge, fill_ratio = ratio_mushroom_huge,
biomes = { "RoofedForest" }, biomes = { "RoofedForest" },
@ -2208,7 +2208,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" }, place_on = { "group:grass_block_no_snow", "mcl_core:dirt" },
sidelen = 80, sidelen = 80,
fill_ratio = ratio_mushroom_giant, fill_ratio = ratio_mushroom_giant,
biomes = { "RoofedForest" }, biomes = { "RoofedForest" },
@ -2247,7 +2247,7 @@ local function register_decorations()
-- Huge Red Mushroom -- Huge Red Mushroom
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" }, place_on = { "group:grass_block_no_snow", "mcl_core:dirt" },
sidelen = 80, sidelen = 80,
fill_ratio = ratio_mushroom_huge, fill_ratio = ratio_mushroom_huge,
biomes = { "RoofedForest" }, biomes = { "RoofedForest" },
@ -2259,7 +2259,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" }, place_on = { "group:grass_block_no_snow", "mcl_core:dirt" },
sidelen = 80, sidelen = 80,
fill_ratio = ratio_mushroom_giant, fill_ratio = ratio_mushroom_giant,
biomes = { "RoofedForest" }, biomes = { "RoofedForest" },
@ -2359,7 +2359,7 @@ local function register_decorations()
-- Sugar canes -- Sugar canes
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block", "group:sand", "mcl_core:podzol", "mcl_core:reeds"}, place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block_no_snow", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = -0.3, offset = -0.3,
@ -2379,7 +2379,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block", "group:sand", "mcl_core:podzol", "mcl_core:reeds"}, place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block_no_snow", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.0, offset = 0.0,
@ -2426,7 +2426,7 @@ local function register_decorations()
replacements = { replacements = {
[tallgrass] = bottom, [tallgrass] = bottom,
}, },
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = offset, offset = offset,
@ -2461,7 +2461,7 @@ local function register_decorations()
replacements = { replacements = {
["mcl_flowers:fern"] = "mcl_flowers:double_fern" ["mcl_flowers:fern"] = "mcl_flowers:double_fern"
}, },
place_on = {"group:grass_block", "mcl_core:podzol"}, place_on = {"group:grass_block_no_snow", "mcl_core:podzol"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = offset, offset = offset,
@ -2508,7 +2508,7 @@ local function register_decorations()
{ name = "mcl_flowers:"..name.."_top", param1=255, }, { name = "mcl_flowers:"..name.."_top", param1=255, },
}, },
}, },
place_on = {"group:grass_block", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
@ -2536,7 +2536,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.0196, offset = 0.0196,
@ -2554,7 +2554,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.05, offset = 0.05,
@ -2572,7 +2572,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.0085, offset = 0.0085,
@ -2595,7 +2595,7 @@ local function register_decorations()
if generate_fallen_logs then if generate_fallen_logs then
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:coarse_dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:podzol", "mcl_core:coarse_dirt"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.00018, offset = 0.00018,
@ -2628,7 +2628,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:coarse_dirt"}, place_on = {"group:grass_block", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:coarse_dirt"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.00018, offset = 0.00018,
@ -2661,7 +2661,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.0, offset = 0.0,
@ -2694,7 +2694,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
fill_ratio = 0.005, fill_ratio = 0.005,
biomes = {"Jungle", "JungleM"}, biomes = {"Jungle", "JungleM"},
@ -2720,7 +2720,7 @@ local function register_decorations()
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.00018, offset = 0.00018,
@ -2794,7 +2794,7 @@ local function register_decorations()
-- Melon -- Melon
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = -0.01, offset = -0.01,
@ -2811,7 +2811,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.0, offset = 0.0,
@ -2828,7 +2828,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = -0.005, offset = -0.005,
@ -2847,7 +2847,7 @@ local function register_decorations()
-- Lots of melons in Jungle Edge M -- Lots of melons in Jungle Edge M
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_core:dirt_with_grass"}, place_on = {"group:grass_block_no_snow"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = 0.013, offset = 0.013,
@ -2873,7 +2873,7 @@ local function register_decorations()
{ name = "mcl_farming:pumpkin_face", param1=255, }, { name = "mcl_farming:pumpkin_face", param1=255, },
}, },
}, },
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = -0.016, offset = -0.016,
@ -2931,7 +2931,7 @@ local function register_decorations()
-- Place tall grass on snow in Ice Plains and Extreme Hills+ -- Place tall grass on snow in Ice Plains and Extreme Hills+
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"}, place_on = {"group:grass_block"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = -0.08, offset = -0.08,
@ -2954,7 +2954,7 @@ local function register_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"}, place_on = {"group:grass_block"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.0, offset = 0.0,
@ -3050,7 +3050,7 @@ local function register_decorations()
-- Mushrooms next to trees -- Mushrooms next to trees
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0, offset = 0,
@ -3070,7 +3070,7 @@ local function register_decorations()
-- More mushrooms in Swampland -- More mushrooms in Swampland
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.05, offset = 0.05,
@ -3095,7 +3095,7 @@ local function register_decorations()
if biomes then if biomes then
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.0008, offset = 0.0008,
@ -3114,7 +3114,7 @@ local function register_decorations()
if is_in_flower_forest then if is_in_flower_forest then
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block", "mcl_core:dirt"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 80, sidelen = 80,
noise_params= { noise_params= {
offset = 0.0008*40, offset = 0.0008*40,

View File

@ -688,7 +688,7 @@ local function register_mgv6_decorations()
-- Sugar canes -- Sugar canes
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block", "group:sand", "mcl_core:podzol", "mcl_core:reeds"}, place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block_no_snow", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = -0.3, offset = -0.3,
@ -721,7 +721,7 @@ local function register_mgv6_decorations()
replacements = { replacements = {
["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass" ["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass"
}, },
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 8, sidelen = 8,
noise_params = { noise_params = {
offset = -0.0025, offset = -0.0025,
@ -752,7 +752,7 @@ local function register_mgv6_decorations()
-- v6 hack: This makes sure large ferns only appear in jungles -- v6 hack: This makes sure large ferns only appear in jungles
spawn_by = { "mcl_core:jungletree", "mcl_flowers:fern" }, spawn_by = { "mcl_core:jungletree", "mcl_flowers:fern" },
num_spawn_by = 1, num_spawn_by = 1,
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
@ -779,7 +779,7 @@ local function register_mgv6_decorations()
{ name = "mcl_flowers:"..name.."_top", param1=255, }, { name = "mcl_flowers:"..name.."_top", param1=255, },
}, },
}, },
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
@ -837,7 +837,7 @@ local function register_mgv6_decorations()
{ name = "mcl_farming:pumpkin_face" }, { name = "mcl_farming:pumpkin_face" },
}, },
}, },
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = -0.008, offset = -0.008,
@ -855,7 +855,7 @@ local function register_mgv6_decorations()
-- Tall grass -- Tall grass
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 8, sidelen = 8,
noise_params = { noise_params = {
offset = 0.01, offset = 0.01,
@ -871,7 +871,7 @@ local function register_mgv6_decorations()
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 8, sidelen = 8,
noise_params = { noise_params = {
offset = 0.04, offset = 0.04,
@ -888,7 +888,7 @@ local function register_mgv6_decorations()
-- Add a small amount of tall grass everywhere to avoid areas completely empty devoid of tall grass -- Add a small amount of tall grass everywhere to avoid areas completely empty devoid of tall grass
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 8, sidelen = 8,
fill_ratio = 0.004, fill_ratio = 0.004,
y_min = 1, y_min = 1,
@ -902,7 +902,7 @@ local function register_mgv6_decorations()
-- Mushrooms next to trees -- Mushrooms next to trees
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.04, offset = 0.04,
@ -947,7 +947,7 @@ local function register_mgv6_decorations()
end end
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = offset, offset = offset,
@ -1167,7 +1167,7 @@ local function generate_structures(minp, maxp, seed, biomemap)
end end
-- Igloos -- Igloos
elseif not chunk_has_igloo and (nn == "mcl_core:snowblock" or nn == "mcl_core:snow" or (minetest.get_item_group(nn, "grass_block") == 1 and minetest.get_item_group(nn, "snowed") == 1)) then elseif not chunk_has_igloo and (nn == "mcl_core:snowblock" or nn == "mcl_core:snow" or (minetest.get_item_group(nn, "grass_block_snow") == 1)) then
if math.random(1, 4400) == 1 then if math.random(1, 4400) == 1 then
-- Check surface -- Check surface
local floor = {x=p.x+9, y=p.y-1, z=p.z+9} local floor = {x=p.x+9, y=p.y-1, z=p.z+9}
@ -1778,7 +1778,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
-- Clear snowy grass blocks without snow above to ensure consistency. -- Clear snowy grass blocks without snow above to ensure consistency.
-- Solidify floating sand to sandstone (both colors). -- Solidify floating sand to sandstone (both colors).
else else
local nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_dry_grass_snow", "mcl_core:sand", "mcl_core:redsand"}) local nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:dirt_with_grass_snow", "mcl_core:sand", "mcl_core:redsand"})
for n=1, #nodes do for n=1, #nodes do
local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z) local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z)
local p_pos_above = area:index(nodes[n].x, nodes[n].y+1, nodes[n].z) local p_pos_above = area:index(nodes[n].x, nodes[n].y+1, nodes[n].z)