diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 9eec03d072..0d08c3406c 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -653,9 +653,9 @@ function mcl_core.get_grass_block_type(pos) end end if dry then - return {name="mcl_core:dirt_with_dry_grass"} + return {name="mcl_core:dirt_with_grass", param2=1} else - return {name="mcl_core:dirt_with_grass"} + return {name="mcl_core:dirt_with_grass", param2=0} end end @@ -1232,10 +1232,11 @@ end -- * itemstring_clear: Itemstring of the original “clear” node without snow -- * tiles: Optional custom tiles -- * sounds: Optional custom sounds +-- * clear_colorization: Optional. If true, will clear all paramtype2="color" related node def. fields -- -- The snowable nodes also MUST have _mcl_snowed defined to contain the name -- of the snowed node. -mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds) +mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds, clear_colorization) local def = table.copy(minetest.registered_nodes[itemstring_clear]) local create_doc_alias if def.description then @@ -1270,6 +1271,11 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti else def.tiles = tiles end + if clear_colorization then + def.paramtype2 = nil + def.color = nil + def.overlay_tiles = nil + end if not sounds then def.sounds = mcl_sounds.node_sound_dirt_defaults({ footstep = { name = "pedology_snow_soft_footstep", gain = 0.5 } diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 75df8e5e8b..eb56b37946 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -312,7 +312,12 @@ minetest.register_node("mcl_core:dirt_with_grass", { description = S("Grass Block"), _doc_items_longdesc = S("A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt."), _doc_items_hidden = false, - tiles = {"default_grass.png", "default_dirt.png", {name="default_dirt.png^default_grass_side.png", tileable_vertical=false}}, + paramtype2 = "color", + tiles = {"mcl_core_grass_block_top.png", { name="default_dirt.png", color="white" }}, + 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 = "#5ac557", is_ground_content = true, stack_max = 64, groups = {handy=1,shovely=1,dirt=2,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}, @@ -332,31 +337,7 @@ minetest.register_node("mcl_core:dirt_with_grass", { _mcl_blast_resistance = 3, _mcl_hardness = 0.6, }) -mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass") - --- Grass Block variant for dry biomes -minetest.register_node("mcl_core:dirt_with_dry_grass", { - _doc_items_create_entry = false, - tiles = {"default_dry_grass.png", "default_dirt.png", {name="default_dirt.png^default_dry_grass_side.png", tileable_vertical=false}}, - is_ground_content = true, - stack_max = 64, - groups = {handy=1,shovely=1, dirt=2,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', - sounds = mcl_sounds.node_sound_dirt_defaults({ - footstep = {name="default_grass_footstep", gain=0.4}, - }), - on_construct = mcl_core.on_snowable_construct, - _mcl_snowed = "mcl_core:dirt_with_dry_grass_snow", - _mcl_grass_palette_index = 1, - _mcl_blast_resistance = 3, - _mcl_hardness = 0.6, -}) -mcl_core.register_snowed_node("mcl_core:dirt_with_dry_grass_snow", "mcl_core:dirt_with_dry_grass") - -if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mcl_core:dirt_with_grass", "nodes", "mcl_core:dirt_with_dry_grass") - doc.add_entry_alias("nodes", "mcl_core:dirt_with_grass", "nodes", "mcl_core:dirt_with_dry_grass_snow") -end +mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", nil, nil, true) minetest.register_node("mcl_core:grass_path", { tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"}, diff --git a/mods/ITEMS/mcl_core/textures/default_grass.png b/mods/ITEMS/mcl_core/textures/default_grass.png deleted file mode 100644 index dd57bb1ce1..0000000000 Binary files a/mods/ITEMS/mcl_core/textures/default_grass.png and /dev/null differ diff --git a/mods/ITEMS/mcl_core/textures/default_grass_side.png b/mods/ITEMS/mcl_core/textures/default_grass_side.png deleted file mode 100644 index d3db928d37..0000000000 Binary files a/mods/ITEMS/mcl_core/textures/default_grass_side.png and /dev/null differ diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_grass_block_side_overlay.png b/mods/ITEMS/mcl_core/textures/mcl_core_grass_block_side_overlay.png new file mode 100644 index 0000000000..e4f81d690c Binary files /dev/null and b/mods/ITEMS/mcl_core/textures/mcl_core_grass_block_side_overlay.png differ diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_grass_block_top.png b/mods/ITEMS/mcl_core/textures/mcl_core_grass_block_top.png new file mode 100644 index 0000000000..7a3a22ffce Binary files /dev/null and b/mods/ITEMS/mcl_core/textures/mcl_core_grass_block_top.png differ diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 3727dfcfa7..22331dd079 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -919,7 +919,7 @@ local function register_biomes() -- Strata don't generate here. minetest.register_biome({ name = "MesaPlateauF_grasstop", - node_top = "mcl_core:dirt_with_dry_grass", + node_top = "mcl_core:dirt_with_grass", depth_top = 1, node_filler = "mcl_core:dirt", depth_filler = 1, @@ -985,7 +985,7 @@ local function register_biomes() -- Grass plateau minetest.register_biome({ name = "MesaPlateauFM_grasstop", - node_top = "mcl_core:dirt_with_dry_grass", + node_top = "mcl_core:dirt_with_grass", depth_top = 1, node_filler = "mcl_core:coarse_dirt", depth_filler = 2, @@ -1035,7 +1035,7 @@ local function register_biomes() -- Savanna minetest.register_biome({ name = "Savanna", - node_top = "mcl_core:dirt_with_dry_grass", + node_top = "mcl_core:dirt_with_grass", depth_top = 1, node_filler = "mcl_core:dirt", depth_filler = 2, @@ -1081,7 +1081,7 @@ local function register_biomes() -- Otherwise identical to Savanna minetest.register_biome({ name = "SavannaM", - node_top = "mcl_core:dirt_with_dry_grass", + node_top = "mcl_core:dirt_with_grass", depth_top = 1, node_filler = "mcl_core:coarse_dirt", depth_filler = 3, @@ -1514,7 +1514,7 @@ local function register_biomelike_ores() minetest.register_ore({ ore_type = "sheet", ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, column_height_max = 1, column_midpoint_factor = 0.0, y_min = mcl_vars.mg_overworld_min, @@ -1526,7 +1526,7 @@ local function register_biomelike_ores() minetest.register_ore({ ore_type = "blob", ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, clust_scarcity = 1500, clust_num_ores = 25, clust_size = 7, @@ -1537,7 +1537,7 @@ local function register_biomelike_ores() minetest.register_ore({ ore_type = "sheet", ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, column_height_max = 1, column_midpoint_factor = 0.0, y_min = mcl_vars.mg_overworld_min, @@ -1549,7 +1549,7 @@ local function register_biomelike_ores() minetest.register_ore({ ore_type = "blob", ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, clust_scarcity = 1800, clust_num_ores = 65, clust_size = 15, @@ -2251,7 +2251,7 @@ local function register_decorations() }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, sidelen = 16, noise_params = { offset = 0.015, @@ -2270,7 +2270,7 @@ local function register_decorations() }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, sidelen = 16, noise_params = { offset = 0.008, @@ -2565,7 +2565,7 @@ local function register_decorations() for a=1, 7 do minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt", "mcl_core:coarse_dirt"}, + place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:coarse_dirt"}, sidelen = 16, fill_ratio = 0.0002, biomes = {"Savanna", "SavannaM"}, @@ -2872,7 +2872,7 @@ local function register_decorations() num_spawn_by = 1, }) - local dry_index = minetest.registered_nodes["mcl_core:dirt_with_dry_grass"]._mcl_grass_palette_index + local dry_index = minetest.registered_nodes["mcl_core:dirt_with_grass"]._mcl_grass_palette_index -- Doubletall grass local register_doubletall_grass = function(offset, scale, biomes, param2) @@ -3435,7 +3435,7 @@ local function register_decorations() -- Dead bushes minetest.register_decoration({ deco_type = "simple", - place_on = {"group:sand", "mcl_core:podzol", "mcl_core:dirt", "mcl_core:dirt_with_dry_grass", "mcl_core:coarse_dirt", "group:hardened_clay"}, + place_on = {"group:sand", "mcl_core:podzol", "mcl_core:dirt", "mcl_core:dirt_with_grass", "mcl_core:coarse_dirt", "group:hardened_clay"}, sidelen = 16, noise_params = { offset = 0.0, @@ -3453,7 +3453,7 @@ local function register_decorations() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"group:sand", "mcl_core:dirt", "mcl_core:dirt_with_dry_grass", "mcl_core:coarse_dirt"}, + place_on = {"group:sand", "mcl_core:dirt", "mcl_core:dirt_with_grass", "mcl_core:coarse_dirt"}, sidelen = 16, noise_params = { offset = 0.1,