Merge pull request 'Biome Colour Palette Fixes' (#3203) from simplified_palette_index into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3203
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
This commit is contained in:
ancientmarinerdev 2023-01-24 00:21:12 +00:00
commit 02ee8b757d
5 changed files with 137 additions and 120 deletions

@ -809,7 +809,7 @@ function mcl_core.get_grass_palette_index(pos)
local biome_name = minetest.get_biome_name(biome)
local reg_biome = minetest.registered_biomes[biome_name]
if reg_biome then
index = reg_biome._mcl_palette_index
index = reg_biome._mcl_grass_palette_index
end
end
return index
@ -939,7 +939,7 @@ minetest.register_lbm({
else
node.name = "mcl_core:dirt_with_grass"
end
node.param2 = reg_biome._mcl_palette_index
node.param2 = reg_biome._mcl_grass_palette_index
-- Fall back to savanna palette index
if not node.param2 then
node.param2 = SAVANNA_INDEX

@ -373,7 +373,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
overlay_tiles = {"mcl_core_grass_block_top.png", "", {name="mcl_core_grass_block_side_overlay.png", tileable_vertical=false}},
palette = "mcl_core_palette_grass.png",
palette_index = 0,
color = "#8EB971",
color = "#7CBD6B",
is_ground_content = true,
stack_max = 64,
groups = {

@ -19,7 +19,7 @@ local get_palette_color_from_pos = function(pos)
local biome_name = minetest.get_biome_name(biome)
local reg_biome = minetest.registered_biomes[biome_name]
if reg_biome then
index = reg_biome._mcl_palette_index
index = reg_biome._mcl_grass_palette_index
end
end
return index

@ -41,7 +41,7 @@ local function register_classic_superflat_biome()
humidity_point = 50,
heat_point = 50,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -160,7 +160,7 @@ local end_skycolor = "#000000"
humidity_point = 24,
heat_point = -5,
_mcl_biome_type = "snowy",
_mcl_palette_index = 2,
_mcl_grass_palette_index = 2,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -178,7 +178,7 @@ local end_skycolor = "#000000"
humidity_point = 24,
heat_point = -5,
_mcl_biome_type = "snowy",
_mcl_palette_index = 2,
_mcl_grass_palette_index = 2,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -198,7 +198,7 @@ local end_skycolor = "#000000"
humidity_point = 58,
heat_point = 8,
_mcl_biome_type = "snowy",
_mcl_palette_index = 3,
_mcl_grass_palette_index = 3,
_mcl_skycolor = "#839EFF",
_mcl_fogcolor = overworld_fogcolor
})
@ -220,7 +220,7 @@ local end_skycolor = "#000000"
humidity_point = 58,
heat_point = 8,
_mcl_biome_type = "snowy",
_mcl_palette_index = 3,
_mcl_grass_palette_index = 3,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -240,7 +240,7 @@ local end_skycolor = "#000000"
humidity_point = 58,
heat_point = 8,
_mcl_biome_type = "snowy",
_mcl_palette_index = 3,
_mcl_grass_palette_index = 3,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -258,7 +258,7 @@ local end_skycolor = "#000000"
heat_point = 8,
vertical_blend = 1,
_mcl_biome_type = "snowy",
_mcl_palette_index = 3,
_mcl_grass_palette_index = 3,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -277,7 +277,7 @@ local end_skycolor = "#000000"
humidity_point = 76,
heat_point = 10,
_mcl_biome_type = "cold",
_mcl_palette_index = 4,
_mcl_grass_palette_index = 4,
_mcl_skycolor = "#7CA3FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -294,7 +294,7 @@ local end_skycolor = "#000000"
humidity_point = 76,
heat_point = 10,
_mcl_biome_type = "cold",
_mcl_palette_index = 4,
_mcl_grass_palette_index = 4,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -313,7 +313,7 @@ local end_skycolor = "#000000"
humidity_point = 100,
heat_point = 8,
_mcl_biome_type = "cold",
_mcl_palette_index = 5,
_mcl_grass_palette_index = 5,
_mcl_skycolor = "#7DA3FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -330,7 +330,7 @@ local end_skycolor = "#000000"
humidity_point = 100,
heat_point = 8,
_mcl_biome_type = "cold",
_mcl_palette_index = 5,
_mcl_grass_palette_index = 5,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -350,7 +350,7 @@ local end_skycolor = "#000000"
humidity_point = 10,
heat_point = 45,
_mcl_biome_type = "cold",
_mcl_palette_index = 6,
_mcl_grass_palette_index = 6,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -368,7 +368,7 @@ local end_skycolor = "#000000"
humidity_point = 10,
heat_point = 45,
_mcl_biome_type = "cold",
_mcl_palette_index = 6,
_mcl_grass_palette_index = 6,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -386,7 +386,7 @@ local end_skycolor = "#000000"
humidity_point = 10,
heat_point = 45,
_mcl_biome_type = "cold",
_mcl_palette_index = 6,
_mcl_grass_palette_index = 6,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -406,7 +406,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 25,
_mcl_biome_type = "cold",
_mcl_palette_index = 7,
_mcl_grass_palette_index = 7,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -423,7 +423,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 25,
_mcl_biome_type = "cold",
_mcl_palette_index = 7,
_mcl_grass_palette_index = 7,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -445,7 +445,7 @@ local end_skycolor = "#000000"
heat_point = 25,
vertical_blend = 6,
_mcl_biome_type = "cold",
_mcl_palette_index = 8,
_mcl_grass_palette_index = 8,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -465,7 +465,7 @@ local end_skycolor = "#000000"
humidity_point = 24,
heat_point = 25,
_mcl_biome_type = "cold",
_mcl_palette_index = 8,
_mcl_grass_palette_index = 8,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -482,7 +482,7 @@ local end_skycolor = "#000000"
humidity_point = 24,
heat_point = 25,
_mcl_biome_type = "cold",
_mcl_palette_index = 8,
_mcl_grass_palette_index = 8,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -499,7 +499,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 8,
_mcl_biome_type = "cold",
_mcl_palette_index = 9,
_mcl_grass_palette_index = 9,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -516,7 +516,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 8,
_mcl_biome_type = "cold",
_mcl_palette_index = 9,
_mcl_grass_palette_index = 9,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -539,7 +539,7 @@ local end_skycolor = "#000000"
humidity_point = 24,
heat_point = 8,
_mcl_biome_type = "snowy",
_mcl_palette_index = 10,
_mcl_grass_palette_index = 10,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -556,7 +556,7 @@ local end_skycolor = "#000000"
humidity_point = 24,
heat_point = 8,
_mcl_biome_type = "snowy",
_mcl_palette_index = 10,
_mcl_grass_palette_index = 10,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -575,7 +575,7 @@ local end_skycolor = "#000000"
humidity_point = 39,
heat_point = 58,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -592,7 +592,7 @@ local end_skycolor = "#000000"
humidity_point = 39,
heat_point = 58,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -609,7 +609,7 @@ local end_skycolor = "#000000"
humidity_point = 39,
heat_point = 58,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -628,7 +628,7 @@ local end_skycolor = "#000000"
humidity_point = 28,
heat_point = 45,
_mcl_biome_type = "medium",
_mcl_palette_index = 11,
_mcl_grass_palette_index = 11,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -645,7 +645,7 @@ local end_skycolor = "#000000"
humidity_point = 28,
heat_point = 45,
_mcl_biome_type = "medium",
_mcl_palette_index = 11,
_mcl_grass_palette_index = 11,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -664,7 +664,7 @@ local end_skycolor = "#000000"
humidity_point = 58,
heat_point = 22,
_mcl_biome_type = "cold",
_mcl_palette_index = 12,
_mcl_grass_palette_index = 12,
_mcl_skycolor = "#7DA3FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -681,7 +681,7 @@ local end_skycolor = "#000000"
humidity_point = 58,
heat_point = 22,
_mcl_biome_type = "cold",
_mcl_palette_index = 12,
_mcl_grass_palette_index = 12,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -698,7 +698,7 @@ local end_skycolor = "#000000"
humidity_point = 58,
heat_point = 22,
_mcl_biome_type = "cold",
_mcl_palette_index = 12,
_mcl_grass_palette_index = 12,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -717,7 +717,7 @@ local end_skycolor = "#000000"
humidity_point = 61,
heat_point = 45,
_mcl_biome_type = "medium",
_mcl_palette_index = 13,
_mcl_grass_palette_index = 13,
_mcl_skycolor = "#79A6FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -734,7 +734,7 @@ local end_skycolor = "#000000"
humidity_point = 61,
heat_point = 45,
_mcl_biome_type = "medium",
_mcl_palette_index = 13,
_mcl_grass_palette_index = 13,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -751,7 +751,7 @@ local end_skycolor = "#000000"
humidity_point = 61,
heat_point = 45,
_mcl_biome_type = "medium",
_mcl_palette_index = 13,
_mcl_grass_palette_index = 13,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -770,7 +770,7 @@ local end_skycolor = "#000000"
humidity_point = 44,
heat_point = 32,
_mcl_biome_type = "medium",
_mcl_palette_index = 14,
_mcl_grass_palette_index = 14,
_mcl_skycolor = "#79A6FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -787,7 +787,7 @@ local end_skycolor = "#000000"
humidity_point = 44,
heat_point = 32,
_mcl_biome_type = "medium",
_mcl_palette_index = 14,
_mcl_grass_palette_index = 14,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -804,7 +804,7 @@ local end_skycolor = "#000000"
humidity_point = 44,
heat_point = 32,
_mcl_biome_type = "medium",
_mcl_palette_index = 14,
_mcl_grass_palette_index = 14,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -823,7 +823,7 @@ local end_skycolor = "#000000"
humidity_point = 78,
heat_point = 31,
_mcl_biome_type = "medium",
_mcl_palette_index = 15,
_mcl_grass_palette_index = 15,
_mcl_skycolor = "#7AA5FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -840,7 +840,7 @@ local end_skycolor = "#000000"
humidity_point = 78,
heat_point = 31,
_mcl_biome_type = "medium",
_mcl_palette_index = 15,
_mcl_grass_palette_index = 15,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -859,7 +859,7 @@ local end_skycolor = "#000000"
humidity_point = 77,
heat_point = 27,
_mcl_biome_type = "medium",
_mcl_palette_index = 16,
_mcl_grass_palette_index = 16,
_mcl_skycolor = "#7AA5FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -876,7 +876,7 @@ local end_skycolor = "#000000"
humidity_point = 77,
heat_point = 27,
_mcl_biome_type = "medium",
_mcl_palette_index = 16,
_mcl_grass_palette_index = 16,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -896,7 +896,7 @@ local end_skycolor = "#000000"
humidity_point = 26,
heat_point = 94,
_mcl_biome_type = "hot",
_mcl_palette_index = 17,
_mcl_grass_palette_index = 17,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -913,7 +913,7 @@ local end_skycolor = "#000000"
humidity_point = 26,
heat_point = 94,
_mcl_biome_type = "hot",
_mcl_palette_index = 17,
_mcl_grass_palette_index = 17,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -932,7 +932,7 @@ local end_skycolor = "#000000"
humidity_point = 94,
heat_point = 27,
_mcl_biome_type = "medium",
_mcl_palette_index = 18,
_mcl_grass_palette_index = 18,
_mcl_skycolor = "#79A6FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -949,7 +949,7 @@ local end_skycolor = "#000000"
humidity_point = 94,
heat_point = 27,
_mcl_biome_type = "medium",
_mcl_palette_index = 18,
_mcl_grass_palette_index = 18,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -969,7 +969,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 100,
_mcl_biome_type = "hot",
_mcl_palette_index = 19,
_mcl_grass_palette_index = 19,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -988,7 +988,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 100,
_mcl_biome_type = "hot",
_mcl_palette_index = 19,
_mcl_grass_palette_index = 19,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1006,7 +1006,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 100,
_mcl_biome_type = "hot",
_mcl_palette_index = 19,
_mcl_grass_palette_index = 19,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1025,7 +1025,7 @@ local end_skycolor = "#000000"
humidity_point = -5,
heat_point = 100,
_mcl_biome_type = "hot",
_mcl_palette_index = 20,
_mcl_grass_palette_index = 20,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1043,7 +1043,7 @@ local end_skycolor = "#000000"
humidity_point = -5,
heat_point = 100,
_mcl_biome_type = "hot",
_mcl_palette_index = 20,
_mcl_grass_palette_index = 20,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1061,7 +1061,7 @@ local end_skycolor = "#000000"
humidity_point = -5,
heat_point = 100,
_mcl_biome_type = "hot",
_mcl_palette_index = 20,
_mcl_grass_palette_index = 20,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1082,7 +1082,7 @@ local end_skycolor = "#000000"
heat_point = 60,
vertical_blend = 0, -- we want a sharp transition
_mcl_biome_type = "hot",
_mcl_palette_index = 21,
_mcl_grass_palette_index = 21,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1103,7 +1103,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 60,
_mcl_biome_type = "hot",
_mcl_palette_index = 21,
_mcl_grass_palette_index = 21,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1121,7 +1121,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 60,
_mcl_biome_type = "hot",
_mcl_palette_index = 21,
_mcl_grass_palette_index = 21,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1139,7 +1139,7 @@ local end_skycolor = "#000000"
humidity_point = 0,
heat_point = 60,
_mcl_biome_type = "hot",
_mcl_palette_index = 21,
_mcl_grass_palette_index = 21,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1162,7 +1162,7 @@ local end_skycolor = "#000000"
heat_point = 60,
vertical_blend = 5,
_mcl_biome_type = "hot",
_mcl_palette_index = 22,
_mcl_grass_palette_index = 22,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1181,7 +1181,7 @@ local end_skycolor = "#000000"
humidity_point = -5,
heat_point = 60,
_mcl_biome_type = "hot",
_mcl_palette_index = 22,
_mcl_grass_palette_index = 22,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1201,7 +1201,7 @@ local end_skycolor = "#000000"
heat_point = 60,
vertical_blend = 4,
_mcl_biome_type = "hot",
_mcl_palette_index = 22,
_mcl_grass_palette_index = 22,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1219,7 +1219,7 @@ local end_skycolor = "#000000"
humidity_point = -5,
heat_point = 60,
_mcl_biome_type = "hot",
_mcl_palette_index = 22,
_mcl_grass_palette_index = 22,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1239,7 +1239,7 @@ local end_skycolor = "#000000"
humidity_point = 36,
heat_point = 79,
_mcl_biome_type = "hot",
_mcl_palette_index = 1,
_mcl_grass_palette_index = 1,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1256,7 +1256,7 @@ local end_skycolor = "#000000"
humidity_point = 36,
heat_point = 79,
_mcl_biome_type = "hot",
_mcl_palette_index = 1,
_mcl_grass_palette_index = 1,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1273,7 +1273,7 @@ local end_skycolor = "#000000"
humidity_point = 36,
heat_point = 79,
_mcl_biome_type = "hot",
_mcl_palette_index = 1,
_mcl_grass_palette_index = 1,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1294,7 +1294,7 @@ local end_skycolor = "#000000"
humidity_point = 48,
heat_point = 100,
_mcl_biome_type = "hot",
_mcl_palette_index = 23,
_mcl_grass_palette_index = 23,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1311,7 +1311,7 @@ local end_skycolor = "#000000"
humidity_point = 48,
heat_point = 100,
_mcl_biome_type = "hot",
_mcl_palette_index = 23,
_mcl_grass_palette_index = 23,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1330,7 +1330,7 @@ local end_skycolor = "#000000"
humidity_point = 88,
heat_point = 81,
_mcl_biome_type = "medium",
_mcl_palette_index = 24,
_mcl_grass_palette_index = 24,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1347,7 +1347,7 @@ local end_skycolor = "#000000"
humidity_point = 88,
heat_point = 81,
_mcl_biome_type = "medium",
_mcl_palette_index = 24,
_mcl_grass_palette_index = 24,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1365,7 +1365,7 @@ local end_skycolor = "#000000"
humidity_point = 88,
heat_point = 81,
_mcl_biome_type = "medium",
_mcl_palette_index = 24,
_mcl_grass_palette_index = 24,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1385,7 +1385,7 @@ local end_skycolor = "#000000"
humidity_point = 92,
heat_point = 81,
_mcl_biome_type = "medium",
_mcl_palette_index = 25,
_mcl_grass_palette_index = 25,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1402,7 +1402,7 @@ local end_skycolor = "#000000"
humidity_point = 92,
heat_point = 81,
_mcl_biome_type = "medium",
_mcl_palette_index = 25,
_mcl_grass_palette_index = 25,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1420,7 +1420,7 @@ local end_skycolor = "#000000"
humidity_point = 92,
heat_point = 81,
_mcl_biome_type = "medium",
_mcl_palette_index = 25,
_mcl_grass_palette_index = 25,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1439,7 +1439,7 @@ local end_skycolor = "#000000"
humidity_point = 88,
heat_point = 76,
_mcl_biome_type = "medium",
_mcl_palette_index = 26,
_mcl_grass_palette_index = 26,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1456,7 +1456,7 @@ local end_skycolor = "#000000"
humidity_point = 88,
heat_point = 76,
_mcl_biome_type = "medium",
_mcl_palette_index = 26,
_mcl_grass_palette_index = 26,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1478,7 +1478,7 @@ local end_skycolor = "#000000"
humidity_point = 90,
heat_point = 79,
_mcl_biome_type = "medium",
_mcl_palette_index = 27,
_mcl_grass_palette_index = 27,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1495,7 +1495,7 @@ local end_skycolor = "#000000"
humidity_point = 90,
heat_point = 79,
_mcl_biome_type = "medium",
_mcl_palette_index = 27,
_mcl_grass_palette_index = 27,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1515,7 +1515,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 94,
_mcl_biome_type = "hot",
_mcl_palette_index = 27,
_mcl_grass_palette_index = 27,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1532,7 +1532,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 94,
_mcl_biome_type = "hot",
_mcl_palette_index = 27,
_mcl_grass_palette_index = 27,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1550,7 +1550,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 94,
_mcl_biome_type = "hot",
_mcl_palette_index = 27,
_mcl_grass_palette_index = 27,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1569,7 +1569,7 @@ local end_skycolor = "#000000"
humidity_point = 90,
heat_point = 50,
_mcl_biome_type = "medium",
_mcl_palette_index = 28,
_mcl_grass_palette_index = 28,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1586,7 +1586,7 @@ local end_skycolor = "#000000"
humidity_point = 90,
heat_point = 50,
_mcl_biome_type = "medium",
_mcl_palette_index = 28,
_mcl_grass_palette_index = 28,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1604,7 +1604,7 @@ local end_skycolor = "#000000"
humidity_point = 90,
heat_point = 50,
_mcl_biome_type = "medium",
_mcl_palette_index = 28,
_mcl_grass_palette_index = 28,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1626,7 +1626,7 @@ local end_skycolor = "#000000"
humidity_point = 106,
heat_point = 50,
_mcl_biome_type = "medium",
_mcl_palette_index = 29,
_mcl_grass_palette_index = 29,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1644,7 +1644,7 @@ local end_skycolor = "#000000"
humidity_point = 106,
heat_point = 50,
_mcl_biome_type = "medium",
_mcl_palette_index = 29,
_mcl_grass_palette_index = 29,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1661,7 +1661,7 @@ local end_skycolor = "#000000"
humidity_point = 106,
heat_point = 50,
_mcl_biome_type = "medium",
_mcl_palette_index = 29,
_mcl_grass_palette_index = 29,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1681,7 +1681,7 @@ local end_skycolor = "#000000"
humidity_point = 90,
heat_point = 95,
_mcl_biome_type = "medium",
_mcl_palette_index = 24,
_mcl_grass_palette_index = 24,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1698,7 +1698,7 @@ local end_skycolor = "#000000"
humidity_point = 90,
heat_point = 95,
_mcl_biome_type = "medium",
_mcl_palette_index = 24,
_mcl_grass_palette_index = 24,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1716,7 +1716,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 90,
_mcl_biome_type = "medium",
_mcl_palette_index = 24,
_mcl_grass_palette_index = 24,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1736,7 +1736,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 95,
_mcl_biome_type = "medium",
_mcl_palette_index = 25,
_mcl_grass_palette_index = 25,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1753,7 +1753,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 90,
_mcl_biome_type = "medium",
_mcl_palette_index = 25,
_mcl_grass_palette_index = 25,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1771,7 +1771,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 95,
_mcl_biome_type = "medium",
_mcl_palette_index = 25,
_mcl_grass_palette_index = 25,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1790,7 +1790,7 @@ local end_skycolor = "#000000"
humidity_point = 92,
heat_point = 90,
_mcl_biome_type = "medium",
_mcl_palette_index = 26,
_mcl_grass_palette_index = 26,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1807,7 +1807,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 88,
_mcl_biome_type = "medium",
_mcl_palette_index = 26,
_mcl_grass_palette_index = 26,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1829,7 +1829,7 @@ local end_skycolor = "#000000"
humidity_point = 95,
heat_point = 95,
_mcl_biome_type = "medium",
_mcl_palette_index = 27,
_mcl_grass_palette_index = 27,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
})
@ -1846,7 +1846,7 @@ local end_skycolor = "#000000"
humidity_point = 97,
heat_point = 90,
_mcl_biome_type = "medium",
_mcl_palette_index = 27,
_mcl_grass_palette_index = 27,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1870,7 +1870,7 @@ local end_skycolor = "#000000"
depth_riverbed = 2,
vertical_blend = 5,
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index,
_mcl_grass_palette_index = minetest.registered_biomes[biome]._mcl_grass_palette_index,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
})
@ -1884,7 +1884,7 @@ local end_skycolor = "#000000"
y_min = mcl_vars.mg_overworld_min,
y_max = DEEP_OCEAN_MIN - 1,
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index,
_mcl_grass_palette_index = minetest.registered_biomes[biome]._mcl_grass_palette_index,
_mcl_skycolor = minetest.registered_biomes[biome]._mcl_skycolor,
_mcl_fogcolor = minetest.registered_biomes[biome]._mcl_fogcolor,
})
@ -1939,7 +1939,7 @@ local function register_dimension_biomes()
heat_point = 100,
humidity_point = 0,
_mcl_biome_type = "hot",
_mcl_palette_index = 17,
_mcl_grass_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#330808"
})
@ -1970,7 +1970,7 @@ local function register_dimension_biomes()
heat_point = 77,
humidity_point = 33,
_mcl_biome_type = "hot",
_mcl_palette_index = 17,
_mcl_grass_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#1B4745"
})
@ -2021,7 +2021,7 @@ local function register_dimension_biomes()
heat_point = 60,
humidity_point = 47,
_mcl_biome_type = "hot",
_mcl_palette_index = 17,
_mcl_grass_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#330303"
})
@ -2050,7 +2050,7 @@ local function register_dimension_biomes()
heat_point = 37,
humidity_point = 70,
_mcl_biome_type = "hot",
_mcl_palette_index = 17,
_mcl_grass_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#1A051A"
})
@ -2079,7 +2079,7 @@ local function register_dimension_biomes()
heat_point = 27,
humidity_point = 80,
_mcl_biome_type = "hot",
_mcl_palette_index = 17,
_mcl_grass_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#685F70"
})
@ -2133,7 +2133,7 @@ local function register_dimension_biomes()
humidity_point = 1000,
vertical_blend = 16,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
})
@ -2150,7 +2150,7 @@ local function register_dimension_biomes()
humidity_point = 1000,
vertical_blend = 16,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
})
@ -2167,7 +2167,7 @@ local function register_dimension_biomes()
humidity_point = 1000,
vertical_blend = 16,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
})
@ -2184,7 +2184,7 @@ local function register_dimension_biomes()
humidity_point = 1000,
vertical_blend = 16,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
})
@ -2201,7 +2201,7 @@ local function register_dimension_biomes()
humidity_point = 1000,
vertical_blend = 16,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
})
@ -2221,7 +2221,7 @@ local function register_dimension_biomes()
max_pos = {x = 1250, y = mcl_vars.mg_end_min + 512, z = 1250},
min_pos = {x = -1250, y = mcl_vars.mg_end_min, z = -1250},
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
})
@ -2239,7 +2239,7 @@ local function register_dimension_biomes()
humidity_point = 50,
vertical_blend = 16,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
_mcl_grass_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
})
@ -3050,7 +3050,7 @@ local function register_grass_decoration(grasstype, offset, scale, biomes)
persist = 0.6
}
for b = 1, #biomes do
local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index
local param2 = minetest.registered_biomes[biomes[b]]._mcl_grass_palette_index
minetest.register_decoration({
deco_type = "simple",
place_on = place_on,
@ -4395,7 +4395,7 @@ local function register_decorations()
local function register_doubletall_grass(offset, scale, biomes)
for b = 1, #biomes do
local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index
local param2 = minetest.registered_biomes[biomes[b]]._mcl_grass_palette_index
minetest.register_decoration({
deco_type = "schematic",
schematic = {
@ -4430,7 +4430,7 @@ local function register_decorations()
-- Large ferns
local function register_double_fern(offset, scale, biomes)
for b = 1, #biomes do
local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index
local param2 = minetest.registered_biomes[biomes[b]]._mcl_grass_palette_index
minetest.register_decoration({
deco_type = "schematic",
schematic = {
@ -5034,7 +5034,7 @@ local function register_decorations()
size = {x = 1, y = 2, z = 1},
data = {
{name = "mcl_core:dirt_with_grass", force_place = true, },
{name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_palette_index},
{name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_grass_palette_index},
},
},
})
@ -5057,7 +5057,7 @@ local function register_decorations()
size = {x = 1, y = 2, z = 1},
data = {
{name = "mcl_core:dirt_with_grass", force_place = true, },
{name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_palette_index},
{name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_grass_palette_index},
},
},
})

@ -280,8 +280,8 @@ local function set_palette(minp,maxp,data2,area,biomemap,nodes)
local bn = minetest.get_biome_name(biomemap[b_pos])
if bn then
local biome = minetest.registered_biomes[bn]
if biome and biome._mcl_biome_type then
data2[p_pos] = biome._mcl_palette_index
if biome and biome._mcl_biome_type and biome._mcl_grass_palette_index then
data2[p_pos] = biome._mcl_grass_palette_index
lvm_used = true
end
end
@ -349,8 +349,8 @@ local function block_fixes(vm, data, data2, emin, emax, area, minp, maxp, blocks
local lvm_used = false
local pr = PseudoRandom(blockseed)
if minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min then
-- Set param2 (=color) of sugar cane and grass
lvm_used = set_palette(minp,maxp,data2,area,biomemap,{"mcl_core:reeds","mcl_core:dirt_with_grass"})
-- Set param2 (=color) of nodes which use the grass colour palette.
lvm_used = set_palette(minp,maxp,data2,area,biomemap,{"mcl_core:dirt_with_grass", "mcl_flowers:tallgrass", "mcl_flowers:double_grass", "mcl_flowers:double_grass_top", "mcl_flowers:fern", "mcl_flowers:double_fern", "mcl_flowers:double_fern_top", "mcl_core:reeds", "mcl_core:dirt_with_grass_snow"})
end
return lvm_used
end
@ -417,3 +417,20 @@ mcl_mapgen_core.register_generator("structures",nil, function(minp, maxp, blocks
end
return false, false, false
end, 100, true)
minetest.register_lbm({
label = "Fix grass palette indexes",
name = "mcl_mapgen_core:fix_grass_palette_indexes",
nodenames = {"mcl_core:dirt_with_grass", "mcl_flowers:tallgrass", "mcl_flowers:double_grass", "mcl_flowers:double_grass_top", "mcl_flowers:fern", "mcl_flowers:double_fern", "mcl_flowers:double_fern_top", "mcl_core:reeds", "mcl_core:dirt_with_grass_snow"},
run_at_every_load = true,
action = function(pos, node)
local biome_data = minetest.get_biome_data(pos)
local biome = biome_data.biome
local biome_name = minetest.get_biome_name(biome)
local reg_biome = minetest.registered_biomes[biome_name]
if node.param2 ~= reg_biome._mcl_grass_palette_index then
node.param2 = reg_biome._mcl_grass_palette_index
minetest.set_node(pos, node)
end
end,
})