From a9d95dea231e39245f33a1f90c835c9543fcab44 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 16 Nov 2017 03:13:19 +0100 Subject: [PATCH] Use hardware coloring for tallgrass and friends --- mods/CORE/mcl_util/init.lua | 18 +- mods/ENTITIES/mobs_mc_gameconfig/init.lua | 1 - mods/ITEMS/mcl_core/nodes_base.lua | 2 + .../textures/mcl_core_palette_grass.png | Bin 0 -> 93 bytes mods/ITEMS/mcl_dye/init.lua | 33 +-- mods/ITEMS/mcl_flowers/init.lua | 190 +++++++----------- .../mcl_flowers_double_plant_fern_bottom.png | Bin 192 -> 348 bytes ...l_flowers_double_plant_fern_bottom_dry.png | Bin 192 -> 0 bytes .../mcl_flowers_double_plant_fern_inv.png | Bin 0 -> 178 bytes .../mcl_flowers_double_plant_fern_top.png | Bin 178 -> 324 bytes .../mcl_flowers_double_plant_fern_top_dry.png | Bin 178 -> 0 bytes .../mcl_flowers_double_plant_grass_bottom.png | Bin 224 -> 412 bytes ..._flowers_double_plant_grass_bottom_dry.png | Bin 224 -> 0 bytes .../mcl_flowers_double_plant_grass_inv.png | Bin 0 -> 166 bytes .../mcl_flowers_double_plant_grass_top.png | Bin 166 -> 315 bytes ...mcl_flowers_double_plant_grass_top_dry.png | Bin 166 -> 0 bytes .../mcl_flowers/textures/mcl_flowers_fern.png | Bin 202 -> 353 bytes ..._fern_dry.png => mcl_flowers_fern_inv.png} | Bin 202 -> 202 bytes .../textures/mcl_flowers_tallgrass.png | Bin 196 -> 323 bytes ..._dry.png => mcl_flowers_tallgrass_inv.png} | Bin 196 -> 196 bytes .../minetest-3d_armor/wieldview/transform.lua | 2 - mods/MAPGEN/mcl_biomes/init.lua | 40 ++-- tools/Texture_Conversion_Table.csv | 6 + tools/Texture_Converter.py | 18 +- 24 files changed, 113 insertions(+), 197 deletions(-) create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_palette_grass.png delete mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom_dry.png create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_inv.png delete mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top_dry.png delete mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_bottom_dry.png create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_inv.png delete mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_top_dry.png rename mods/ITEMS/mcl_flowers/textures/{mcl_flowers_fern_dry.png => mcl_flowers_fern_inv.png} (67%) rename mods/ITEMS/mcl_flowers/textures/{mcl_flowers_tallgrass_dry.png => mcl_flowers_tallgrass_inv.png} (58%) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index f371d55f48..650af8863f 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -447,20 +447,10 @@ function mcl_util.generate_on_place_plant_function(condition) end -- Check placement rules - local result = condition(place_pos, node, itemstack) - if result == true or type(result) == "string" then - local itemstack_place - if type(result) == "string" then - -- Let's pretend we place a different item - itemstack_place = ItemStack(itemstack) - itemstack_place:set_name(result) - else - itemstack_place = itemstack - end - local idef = itemstack_place:get_definition() - local new_itemstack, success = minetest.item_place_node(itemstack_place, placer, pointed_thing) - -- Restore old itemstack name - new_itemstack:set_name(itemstack:get_name()) + local result, param2 = condition(place_pos, node, itemstack) + if result == true then + local idef = itemstack:get_definition() + local new_itemstack, success = minetest.item_place_node(itemstack, placer, pointed_thing, param2) if success then if idef.sounds and idef.sounds.place then diff --git a/mods/ENTITIES/mobs_mc_gameconfig/init.lua b/mods/ENTITIES/mobs_mc_gameconfig/init.lua index f953eb884d..7b2d346bbb 100644 --- a/mods/ENTITIES/mobs_mc_gameconfig/init.lua +++ b/mods/ENTITIES/mobs_mc_gameconfig/init.lua @@ -152,7 +152,6 @@ mobs_mc.override.replace = { { "mcl_core:dirt_with_grass", "mcl_core:dirt", -1 }, { "mcl_core:dirt_with_dry_grass", "mcl_core:dirt", -1 }, { "mcl_flowers:tallgrass", "air", 0 }, - { "mcl_flowers:tallgrass_dry", "air", 0 }, }, -- Silverfish populate stone, etc. with monster eggs silverfish = { diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 757986f8e7..d686516ae2 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -316,6 +316,7 @@ minetest.register_node("mcl_core:dirt_with_grass", { return mcl_core.on_snowable_construct(pos) end, _mcl_snowed = "mcl_core:dirt_with_grass_snow", + _mcl_grass_palette_index = 0, _mcl_blast_resistance = 3, _mcl_hardness = 0.6, }) @@ -334,6 +335,7 @@ minetest.register_node("mcl_core:dirt_with_dry_grass", { }), 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, }) diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_palette_grass.png b/mods/ITEMS/mcl_core/textures/mcl_core_palette_grass.png new file mode 100644 index 0000000000000000000000000000000000000000..2c465917a88e088e894e3e049ebc6b436d442b84 GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|#64XcLp07O pYgkOL`{yQhSVMw!aYG{`L+}&k?UQebUI!{+@O1TaS?83{1OSc(7vcZ_ literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_dye/init.lua b/mods/ITEMS/mcl_dye/init.lua index 16583eb798..c69befce62 100644 --- a/mods/ITEMS/mcl_dye/init.lua +++ b/mods/ITEMS/mcl_dye/init.lua @@ -220,16 +220,13 @@ mcl_dye.apply_bone_meal = function(pointed_thing) n = minetest.get_node(pos) local n2 = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}) - if n.name ~= "" and n.name == "air" and (minetest.get_item_group(n2.name, "grass_block") == 1) and (minetest.get_item_group(n2.name, "snowed") == 0) then + if n.name ~= "" and n.name == "air" and (minetest.get_item_group(n2.name, "grass_block_no_snow") == 1) then -- Randomly generate flowers, tall grass or nothing if math.random(1,100) <= 90 then -- 90% tall grass, 10% flower if math.random(1,100) <= 90 then - if n2.name == "mcl_core:dirt_with_dry_grass" then - minetest.add_node(pos, {name="mcl_flowers:tallgrass_dry"}) - else - minetest.add_node(pos, {name="mcl_flowers:tallgrass"}) - end + local col = minetest.registered_nodes[n2.name]._mcl_grass_palette_index + minetest.add_node(pos, {name="mcl_flowers:tallgrass", param2=col}) else if n2.name == "mcl_core:dirt_with_dry_grass" then minetest.add_node(pos, {name=flowers_table_dry[math.random(1, #flowers_table_dry)]}) @@ -262,16 +259,8 @@ mcl_dye.apply_bone_meal = function(pointed_thing) local toppos = { x=pos.x, y=pos.y+1, z=pos.z } local topnode = minetest.get_node(toppos) if minetest.registered_nodes[topnode.name].buildable_to then - minetest.set_node(pos, { name = "mcl_flowers:double_grass" }) - minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top" }) - return true - end - elseif n.name == "mcl_flowers:tallgrass_dry" then - local toppos = { x=pos.x, y=pos.y+1, z=pos.z } - local topnode = minetest.get_node(toppos) - if minetest.registered_nodes[topnode.name].buildable_to then - minetest.set_node(pos, { name = "mcl_flowers:double_grass_dry" }) - minetest.set_node(toppos, { name = "mcl_flowers:double_grass_dry_top" }) + minetest.set_node(pos, { name = "mcl_flowers:double_grass", param2 = n.param2 }) + minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top", param2 = n.param2 }) return true end @@ -280,16 +269,8 @@ mcl_dye.apply_bone_meal = function(pointed_thing) local toppos = { x=pos.x, y=pos.y+1, z=pos.z } local topnode = minetest.get_node(toppos) if minetest.registered_nodes[topnode.name].buildable_to then - minetest.set_node(pos, { name = "mcl_flowers:double_fern" }) - minetest.set_node(toppos, { name = "mcl_flowers:double_fern_top" }) - return true - end - elseif n.name == "mcl_flowers:fern_dry" then - local toppos = { x=pos.x, y=pos.y+1, z=pos.z } - local topnode = minetest.get_node(toppos) - if minetest.registered_nodes[topnode.name].buildable_to then - minetest.set_node(pos, { name = "mcl_flowers:double_fern_dry" }) - minetest.set_node(toppos, { name = "mcl_flowers:double_fern_dry_top" }) + minetest.set_node(pos, { name = "mcl_flowers:double_fern", param2 = n.param2 }) + minetest.set_node(toppos, { name = "mcl_flowers:double_fern_top", param2 = n.param2 }) return true end end diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 89c2d66629..8c793f1660 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -12,10 +12,10 @@ local on_place_flower = mcl_util.generate_on_place_plant_function(function(pos, local soil_node = minetest.get_node_or_nil(below) if not soil_node then return false end - local dry = minetest.registered_nodes[itemstack:get_name()]._mcl_dry_override - local replace - if dry and (soil_node.name == "mcl_core:dirt_with_dry_grass" or soil_node.name == "mcl_core:dirt_with_dry_grass_snow") then - replace = dry + local has_palette = minetest.registered_nodes[itemstack:get_name()].palette ~= nil + local colorize = 0 + if has_palette and (soil_node.name == "mcl_core:dirt_with_dry_grass" or soil_node.name == "mcl_core:dirt_with_dry_grass_snow") then + colorize = 1 end --[[ Placement requirements: @@ -31,10 +31,7 @@ local on_place_flower = mcl_util.generate_on_place_plant_function(function(pos, end local is_flower = minetest.get_item_group(itemstack:get_name(), "flower") == 1 local ok = (soil_node.name == "mcl_core:dirt" or minetest.get_item_group(soil_node.name, "grass_block") == 1 or (not is_flower and (soil_node.name == "mcl_core:coarse_dirt" or soil_node.name == "mcl_core:podzol" or soil_node.name == "mcl_core:podzol_snow"))) and light_ok - if ok and replace then - return replace - end - return ok + return ok, colorize end) local function add_simple_flower(name, desc, image, simple_selection_box) @@ -84,100 +81,61 @@ local wheat_seed_drop = { } } --- Tall Grass and Fern -for i=1,2 do - -- CHECKME: How does tall grass behave when pushed by a piston? - local tgf_groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,place_flowerlike=2,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1} +-- CHECKME: How does tall grass behave when pushed by a piston? - local id, idf, longdesc, longdesc_fern, create_entry, shears_drop, shears_drop_fern - if i==1 then - id = "tallgrass" - idf = "fern" - longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high." - longdesc_fern = "Ferns are small plants which occour naturally in grasslands. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high." - hidden = false - shears_drop = true - shears_drop_fern = true - else - id = "tallgrass_dry" - idf = "fern_dry" - tgf_groups.not_in_creative_inventory = 1 - create_entry = false - shears_drop = {"mcl_flowers:tallgrass"} - shears_drop_fern = {"mcl_flowers:fern"} - end +--- Tall Grass --- +local def_tallgrass = { + description = "Tall Grass", + drawtype = "plantlike", + _doc_items_longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.", + _doc_items_usagehelp = plant_usage_help, + _doc_items_hidden = false, + waving = 1, + tiles = {"mcl_flowers_tallgrass.png"}, + inventory_image = "mcl_flowers_tallgrass_inv.png", + wield_image = "mcl_flowers_tallgrass_inv.png", + selection_box = { + type = "fixed", + fixed = {{ -6/16, -8/16, -6/16, 6/16, 4/16, 6/16 }}, + }, + paramtype = "light", + paramtype2 = "color", + palette = "mcl_core_palette_grass.png", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + is_ground_content = true, + groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,place_flowerlike=2,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1}, + sounds = mcl_sounds.node_sound_leaves_defaults(), + drop = wheat_seed_drop, + _mcl_shears_drop = true, + node_placement_prediction = "", + on_place = on_place_flower, + _mcl_blast_resistance = 0, + _mcl_hardness = 0, +} +minetest.register_node("mcl_flowers:tallgrass", def_tallgrass) - --- Tall Grass --- - minetest.register_node("mcl_flowers:"..id, { - description = "Tall Grass", - drawtype = "plantlike", - _doc_items_longdesc = longdesc, - _doc_items_usagehelp = plant_usage_help, - _doc_items_hidden = hidden, - _doc_items_create_entry = create_entry, - waving = 1, - tiles = {"mcl_flowers_"..id..".png"}, - inventory_image = "mcl_flowers_"..id..".png", - wield_image = "mcl_flowers_"..id..".png", - selection_box = { - type = "fixed", - fixed = {{ -6/16, -8/16, -6/16, 6/16, 4/16, 6/16 }}, - }, - paramtype = "light", - sunlight_propagates = true, - walkable = false, - buildable_to = true, - is_ground_content = true, - groups = tgf_groups, - sounds = mcl_sounds.node_sound_leaves_defaults(), - drop = wheat_seed_drop, - _mcl_shears_drop = shears_drop, - _mcl_dry_override = "mcl_flowers:tallgrass_dry", - node_placement_prediction = "", - on_place = on_place_flower, - _mcl_blast_resistance = 0, - _mcl_hardness = 0, - }) +--- Fern --- +-- The fern is very similar to tall grass, so we can copy a lot from it. +local def_fern = table.copy(def_tallgrass) +def_fern.description = "Fern" +def_fern._doc_items_longdesc = "Ferns are small plants which occour naturally in grasslands. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high." +def_fern.tiles = { "mcl_flowers_fern.png" } +def_fern.inventory_image = "mcl_flowers_fern_inv.png" +def_fern.wield_image = "mcl_flowers_fern_inv.png" +def_fern.selection_box = { + type = "fixed", + fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 }, +} - --- Fern --- - minetest.register_node("mcl_flowers:"..idf, { - description = "Fern", - _doc_items_longdesc = longdesc_fern, - _doc_items_usagehelp = plant_usage_help, - _doc_items_create_entry = create_entry, - _doc_items_hidden = hidden, - drawtype = "plantlike", - waving = 1, - tiles = { "mcl_flowers_"..idf..".png" }, - inventory_image = "mcl_flowers_"..idf..".png", - wield_image = "mcl_flowers_"..idf..".png", - sunlight_propagates = true, - paramtype = "light", - walkable = false, - stack_max = 64, - groups = tgf_groups, - buildable_to = true, - sounds = mcl_sounds.node_sound_leaves_defaults(), - node_placement_prediction = "", - on_place = on_place_flower, - drop = wheat_seed_drop, - _mcl_shears_drop = shears_drop_fern, - _mcl_dry_override = "mcl_flowers:fern_dry", - selection_box = { - type = "fixed", - fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 }, - }, - }) -end +minetest.register_node("mcl_flowers:fern", def_fern) -doc.add_entry_alias("nodes", "mcl_flowers:tallgrass", "nodes", "mcl_flowers:tallgrass_dry") -doc.add_entry_alias("nodes", "mcl_flowers:fern", "nodes", "mcl_flowers:fern_dry") - -local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_img, selbox_radius, selbox_top_height, drop, shears_drop, is_flower, dry_override) +local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_img, selbox_radius, selbox_top_height, drop, shears_drop, is_flower, grass_color) if not inv_img then inv_img = top_img end - local flowergroup, place_flowerlike, usagehelp, noncreative, create_entry + local flowergroup, place_flowerlike, usagehelp, noncreative, create_entry, paramtype2, palette if is_flower == nil then is_flower = true end @@ -187,6 +145,10 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im else place_flowerlike = 2 end + if grass_color then + paramtype2 = "color" + palette = "mcl_core_palette_grass.png" + end if longdesc == nil then noncreative = 1 create_entry = false @@ -210,11 +172,12 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im wield_image = inv_img, sunlight_propagates = true, paramtype = "light", + paramtype2 = paramtype2, + palette = palette, walkable = false, buildable_to = true, drop = drop_bottom, _mcl_shears_drop = shears_drop, - _mcl_dry_override = dry_override, node_placement_prediction = "", selection_box = { type = "fixed", @@ -271,14 +234,14 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im -- * Only with light level >= 8 -- * Only if two enough space if (floorname == "mcl_core:dirt" or minetest.get_item_group(floorname, "grass_block") == 1 or (not is_flower and (floorname == "mcl_core:coarse_dirt" or floorname == "mcl_core:podzol" or floorname == "mcl_core:podzol_snow"))) and bottom_buildable and top_buildable and light_ok then - local dry_override = minetest.registered_nodes[itemstring]._mcl_dry_override - if dry_override and (floorname == "mcl_core:dirt_with_dry_grass" or floorname == "mcl_core:dirt_with_dry_grass_snow") then - itemstring = dry_override + local param2 + if grass_color and (floorname == "mcl_core:dirt_with_dry_grass" or floorname == "mcl_core:dirt_with_dry_grass_snow") then + param2 = 1 end -- Success! We can now place the flower minetest.sound_play(minetest.registered_nodes[itemstring].sounds.place, {pos = bottom, gain=1}) - minetest.set_node(bottom, {name=itemstring}) - minetest.set_node(top, {name=itemstring.."_top"}) + minetest.set_node(bottom, {name=itemstring, param2=param2}) + minetest.set_node(top, {name=itemstring.."_top", param2=param2}) if not minetest.settings:get_bool("creative_mode") then itemstack:take_item() end @@ -305,6 +268,8 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im tiles = { top_img }, sunlight_propagates = true, paramtype = "light", + paramtype2 = paramtype2, + palette = palette, walkable = false, buildable_to = true, selection_box = { @@ -339,26 +304,11 @@ add_large_plant("lilac", "Lilac", "A lilac is a large plant which occupies two b -- TODO: Make the sunflower face East. Requires a mesh for the top node. add_large_plant("sunflower", "Sunflower", "A sunflower is a large plant which occupies two blocks. It is mainly used in dye production.", "mcl_flowers_double_plant_sunflower_bottom.png", "mcl_flowers_double_plant_sunflower_top.png^mcl_flowers_double_plant_sunflower_front.png", "mcl_flowers_double_plant_sunflower_front.png", 6/16, 6/16) -for i=1, 2 do - local longdesc_grass, longdesc_fern, dry, dry_override_grass, dry_override_fern - if i==1 then - longdesc_grass = "Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds." - longdesc_fern = "Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds." - dry = "" - dry_override_grass = "mcl_flowers:double_grass_dry" - dry_override_fern = "mcl_flowers:double_fern_dry" - else - -- ID/texture name modifier - dry = "_dry" - end - add_large_plant("double_grass"..dry, "Double Tallgrass", longdesc_grass, "mcl_flowers_double_plant_grass_bottom"..dry..".png", "mcl_flowers_double_plant_grass_top"..dry..".png", nil, 6/16, 4/16, wheat_seed_drop, {"mcl_flowers:tallgrass 2"}, false, dry_override_grass) - add_large_plant("double_fern"..dry, "Large Fern", longdesc_fern, "mcl_flowers_double_plant_fern_bottom"..dry..".png", "mcl_flowers_double_plant_fern_top"..dry..".png", nil, 5/16, 5/16, wheat_seed_drop, {"mcl_flowers:fern 2"}, false, dry_override_fern) -end +local longdesc_grass = "Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds." +local longdesc_fern = "Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds." -doc.add_entry_alias("nodes", "mcl_flowers:double_grass", "nodes", "mcl_flowers:double_grass_dry") -doc.add_entry_alias("nodes", "mcl_flowers:double_grass", "nodes", "mcl_flowers:double_grass_dry_top") -doc.add_entry_alias("nodes", "mcl_flowers:double_fern", "nodes", "mcl_flowers:double_fern_dry") -doc.add_entry_alias("nodes", "mcl_flowers:double_fern", "nodes", "mcl_flowers:double_fern_dry_top") +add_large_plant("double_grass", "Double Tallgrass", longdesc_grass, "mcl_flowers_double_plant_grass_bottom.png", "mcl_flowers_double_plant_grass_top.png", "mcl_flowers_double_plant_grass_inv.png", 6/16, 4/16, wheat_seed_drop, {"mcl_flowers:tallgrass 2"}, false, true) +add_large_plant("double_fern", "Large Fern", longdesc_fern, "mcl_flowers_double_plant_fern_bottom.png", "mcl_flowers_double_plant_fern_top.png", "mcl_flowers_double_plant_fern_inv.png", 5/16, 5/16, wheat_seed_drop, {"mcl_flowers:fern 2"}, false, true) minetest.register_abm({ label = "Pop out flowers", diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom.png index c63d4dbf9b6ef02e03ee85f1ff39815a20f4b63e..baf21de3491d8ceaac755907540f1725054fc0b8 100644 GIT binary patch delta 333 zcmV-T0kZzU0o($R7=H)`0000V^Z#K0000DMK}|sb0I`n?{9y$E000SaNLh0L01FKO z01FKP?FYat00007bV*G`2i*t|3nCP=AjGo(000%LTpY zyD}tEgC#3UzU}^>G=ZFRSsn9kpW$V>uZ&U+0v@k-hUfWIgvaSn0*YV@1YB>=62M9b z0gxJd&SAF`wJDK@s5@!GQbPg}Gpj;jNc)fx`X$m4;|xQups+ZuK`Ly$0^Izn0%)^! zfoRx6y@Wg~JVwN4)(CE<)(wD&72=l&sk!zGzlR#Z&73#Q4sX@(VHg+*!001Hc^vu= fV*5YF0#f<_AZAHW#4nU800000NkvXXu0mjf;3|9* delta 176 zcmcb^bbxV!L_G^L0|Ud`yN`l^lxToYh%1oRbyP7=uyk$rHVe`>@Y1x-cgX5l4N|~Z z666=m;PC858jus|>Eakt!I;dz;e5QRw#17b5*F$P?1^x_F9mY5*P Y@WzS9F_Cv&G0+wUPgg&ebxsLQ0OYbZvH$=8 diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom_dry.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom_dry.png deleted file mode 100644 index f65a1bf00ac03c8ebe8412e7483041d396770d48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=7K;s%fd#^}W8yVTKWY zTDhf8(xsZ(Kncc@AirP+hi5m^fSgEA7srqa#$*O2M^#pV)Hebr7}!o~F4W0XP+Y2V zJwaKZ+0!%Bms4lC)QTqzfvOUx7%s9dl)Mt+6nRJJK$ooZfm@PuM5cx)Oj;Nao4JZH j;A*26Pe8H61WATBPCSl@yz7dAmN0m_`njxgN@xNABwaS{ diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_inv.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_inv.png new file mode 100644 index 0000000000000000000000000000000000000000..c44d03d34473502f0e3cc17e68c5b71664a720f0 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VW1=7~}4(17#WQ}v?g&dWFbiWcWMO7f@Dg!d$fFvVEY7$gD%IJYb;E>>N&&hInZoSK Ub(0KE15IY|boFyt=akR{04*~wlK=n! literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top.png index c44d03d34473502f0e3cc17e68c5b71664a720f0..6ae47a1b0e869f58cebaee087ad4cd98f8679ebe 100644 GIT binary patch delta 309 zcmV-50m}Ze0mK537=H)`0000V^Z#K0000DMK}|sb0I`n?{9y$E000SaNLh0L01FHN z01FHOKR_bL00007bV*G`2i*t|3nCD-O#rF@000s+w^J|E1x??o7?EP?lLkN&jTFKhNwjtYe)kiUSFyhW00000NkvXX Hu0mjf-2Hc= delta 162 zcmX@Yw25(oL_G^L0|Ud`yN`l^lu&?Ah%1n`&UY|Rurv$OcWw7J@Y1w_!@p{cj^3jp~vYz+`d84N>D8WN;d2G=rzB KpUXO@geCy^cP~)@ diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top_dry.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top_dry.png deleted file mode 100644 index 2b64566e7fbd61e45e6f6eb6507b4f667a7453ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VW1=6{tPHCyu$zg`|y}l8C zT6s6L=Kw_+OM?7@862M7NCR^GJY5_^Dj1U$SXvTz5)Dp1IQ}v?g&dWFbiWcWMO7f@Dg!d$fFvVEY7$gD%IJYb;E>>N&&hInZoSK Ub(0KE15IY|boFyt=akR{0Jz;Ss{jB1 diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_bottom.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_bottom.png index a1b97146fa2d6c1b2ac8dfac5ea8186c0c41ab55..568e3de65475acd84c821b8d892024ade0eb4b3e 100644 GIT binary patch delta 398 zcmV;90dfA|0h|Mn7=H)`0000V^Z#K0000DMK}|sb0I`n?{9y$E000SaNLh0L01FQQ z01FQRlKBIr00007bV*G`2i*t{4LAz*^*C?<000fHQ7 zK9S@A2e||(mMmlNJ;t!)oR^>DB`Y|zFQ~Q2-%@q9pUGsTMcSbIN&+X7f zBM_suEo)~0L>zGxxu%&7$x}*|gae2oiy{m$bvSteunB-dMC2R_Kpe+$RJ;J9DZ*UG zJ;XMd0%Erj;D7a5YY%`pFOdh0H(<{ZvHk`vFE#?qBbsn{T zec4fn$Q&`|SN7Wj7=<$c0-E@k^DjMMk&t#MBH;crL^1ts9v)hF9Fg!00000Ne4wvM6N<$f?}+kod5s; delta 208 zcmbQk{D5(SL_G^L0|Ud`yN`l^lyrbkh%1n`&UY|Ru(a|}ajbW@57IIV(${rVG4Rsd zJS!5UjIkuhFPOpM*^M+Hr`XfQF{FY~^_U^oAqRoBi~5siR2|{|qj99HIZHR|7pt%R zv84V*$IA{rI=J|tR>B+|9;2A5Nb5s2N2h<|TORKDsZrCpxqAD`jRp2hUnWI2wJd2B z{kKB0;M!)9S9vC@ZrVQ7dHZ8he>;HEj3q&S!3+-1ZlnP@#hxyXAr*|O#|*g+IS8~})So<~>InBA zjU#2vS-M%jSbgn}CG{^lUUu-&!Nmu)66Wae7{ydYS|6%8I{h2p^6*cMn$FGD+gENZ zuxI)*DY~g;Nvr6;6_N$lHjBKmdK II;Vst0Ng4xg8%>k literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_top.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_top.png index ddfff3bddd69da96ca269f502bcb573d2852ed4c..2d10b6585bec934623c23a34636d040b8566d84d 100644 GIT binary patch delta 300 zcmZ3+xSMH$L_G%^0|SHn=l_X7iY49A*O7r?V?XzwL{=c5v%n*=n1O*?0E8LWD(@`? z3bL1Y`ns~;<>2Qv7yQBTHW(-*QQ{g=5}cn_Ql40p%21G)nOCBhms+A=qGzCIn%ZiV z3RJVq)5S5w!vAf*BVUt&fNQm{4a1y<85`;gQe$=)sI2?SB_sIzRL#m<)>NJ& v(JH(PRMl_XD)nMiJN@Cl58F0&i|>s6S(mnU=j^Kjx|zY#)z4*}Q$iB}S$J>= delta 150 zcmdnZw2X0rL_G^L0|Ud`yN`l^lxToYh%1n`57M&EcW|tCxAIUiPp~u#(hr>Qcp6ZG zu_VYZn8D%MjWm!dPZ!6K3dY`J8wDKMl7pM3eb&j;CG8=73_{B6H*;d$u!9SRPM z9^cwvrWG=W_p_pvhfq>FW51?j;5&PP__(zu%qmR$f*w6Uvlu*G{an^LB{Ts5rt35y diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_top_dry.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_top_dry.png deleted file mode 100644 index c708e44b1051d1e125f278a30026acb29c5990a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=6Kq+PS4p<*lCC-l}P- z*2!Up=XlQv10@(sg8YIR9G=}s19I#=T^vIy7<-Rx6m&2UVYu*p^5y3~A7p=RXmXwN zxBbF}=b`6!C^#&7d~1W5R>&OQ&x%$aLP_b2{hE$}@9YKQVZ0pS9W7=H)`0000V^Z#K0000DMK}|sb0I`n?{9y$E000SaNLh0L01mwX z01mwYNBfYi0000PbVXQnQ*UN;cVTj60B~VxZgehgWpp4kE-)@JGD8Gw>;M1&-bqA3 zR5(wikh==PKoCXuyAM6j^5u&}Y#U+@#xoPUu!jAji&ip%Ug?wLta zDP@#W(=?-0rT(iy!1?m%LcJ$BAn#^90YJ5$^b$9yD5~cSx@Yg{cDUY;0lT*9F{@!xuEHSkPg-C}RNw^WvZdtAaWfF)=p>uL{ao jB^2Nr5tS7Y#lg(Lafg@3X@W=*&^`uFS3j3^P6-W|E@mBicu9nZ&f0-=#UY<$s zv-08_)_%WxlK6S`cif#X+Vrtx$Fx1|{ERw`ipP0WzFiS$*yH4|$IFzVtx%Dvzopr E07-LlP5=M^ delta 180 zcmX@ibcAt&L_G^L0|Ud`yN`l^lxToYh-<;QbnAQvvmkxPdUx{#OI=45124@|F^*+G z1&k#@e!&b5&u*jvIkBEDjv*C{$qIZNMh2P4a+qOxt7lrOb+D^ygrAm_nBlpJPE7#2tO~~f diff --git a/mods/ITEMS/minetest-3d_armor/wieldview/transform.lua b/mods/ITEMS/minetest-3d_armor/wieldview/transform.lua index 8d91905612..26cfd62816 100644 --- a/mods/ITEMS/minetest-3d_armor/wieldview/transform.lua +++ b/mods/ITEMS/minetest-3d_armor/wieldview/transform.lua @@ -21,9 +21,7 @@ wieldview.transform = { ["mcl_flowers:blue_orchid"]="R270", ["mcl_flowers:oxeye_daisy"]="R270", ["mcl_flowers:fern"]="R270", - ["mcl_flowers:fern_dry"]="R270", ["mcl_flowers:tallgrass"]="R270", - ["mcl_flowers:tallgrass_dry"]="R270", ["mcl_buckets:bucket_empty"]="R270", ["mcl_buckets:bucket_water"]="R270", ["mcl_buckets:bucket_lava"]="R270", diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 433b77fcf1..67721984d5 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1600,7 +1600,7 @@ end -- All mapgens except mgv6 -- Template to register a grass or fern decoration -local function register_grass_decoration(grasstype, offset, scale, biomes) +local function register_grass_decoration(grasstype, offset, scale, biomes, param2) local place_on, seed, node if grasstype == "fern" then node = "mcl_flowers:fern" @@ -1610,10 +1610,6 @@ local function register_grass_decoration(grasstype, offset, scale, biomes) node = "mcl_flowers:tallgrass" place_on = {"group:grass_block_no_snow"} seed = 420 - elseif grasstype == "tallgrass_dry" then - node = "mcl_flowers:tallgrass_dry" - place_on = {"group:grass_block_no_snow"} - seed = 420 end local noise = { offset = offset, @@ -1632,6 +1628,7 @@ local function register_grass_decoration(grasstype, offset, scale, biomes) y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = node, + param2 = param2, }) end @@ -2399,19 +2396,10 @@ local function register_decorations() num_spawn_by = 1, }) - -- Doubletall grass - local register_doubletall_grass = function(offset, scale, biomes, is_dry) + local dry_index = minetest.registered_nodes["mcl_core:dirt_with_dry_grass"]._mcl_grass_palette_index - local bottom, top, tallgrass - if is_dry then - bottom = "mcl_flowers:double_grass_dry" - top = "mcl_flowers:double_grass_dry_top" - tallgrass = "mcl_flowers:tallgrass_dry" - else - bottom = "mcl_flowers:double_grass" - top = "mcl_flowers:double_grass_top" - tallgrass = "mcl_flowers:tallgrass" - end + -- Doubletall grass + local register_doubletall_grass = function(offset, scale, biomes, param2) minetest.register_decoration({ deco_type = "schematic", @@ -2419,12 +2407,12 @@ local function register_decorations() size = { x=1, y=3, z=1 }, data = { { name = "air", prob = 0 }, - { name = bottom, param1=255, }, - { name = top, param1=255, }, + { name = "mcl_flowers:double_grass", param1=255, param2=param2 }, + { name = "mcl_flowers:double_grass_top", param1=255, param2=param2 }, }, }, replacements = { - [tallgrass] = bottom, + ["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass", }, place_on = {"group:grass_block_no_snow"}, sidelen = 16, @@ -2444,7 +2432,7 @@ local function register_decorations() register_doubletall_grass(-0.01, 0.03, {"Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest"}) register_doubletall_grass(-0.002, 0.03, {"Plains", "SunflowerPlains"}) - register_doubletall_grass(-0.0005, -0.03, {"Savanna", "SavannaM"}, true) + register_doubletall_grass(-0.0005, -0.03, {"Savanna", "SavannaM"}, dry_index) -- Large ferns local register_double_fern = function(offset, scale, biomes) @@ -2900,16 +2888,16 @@ local function register_decorations() register_grass_decoration("tallgrass", 0, 0.06, grass_forest) register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest) register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest) - register_grass_decoration("tallgrass_dry", -0.03, 0.09, grass_mpf) - register_grass_decoration("tallgrass_dry", -0.015, 0.075, grass_mpf) - register_grass_decoration("tallgrass_dry", 0, 0.06, grass_mpf) - register_grass_decoration("tallgrass_dry", 0.01, 0.045, grass_mpf) + register_grass_decoration("tallgrass", -0.03, 0.09, grass_mpf, dry_index) + register_grass_decoration("tallgrass", -0.015, 0.075, grass_mpf, dry_index) + register_grass_decoration("tallgrass", 0, 0.06, grass_mpf, dry_index) + register_grass_decoration("tallgrass", 0.01, 0.045, grass_mpf, dry_index) register_grass_decoration("tallgrass", 0.01, 0.05, grass_forest) register_grass_decoration("tallgrass", 0.03, 0.03, grass_plains) register_grass_decoration("tallgrass", 0.05, 0.01, grass_plains) register_grass_decoration("tallgrass", 0.07, -0.01, grass_plains) register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains) - register_grass_decoration("tallgrass_dry", 0.18, -0.03, grass_savanna) + register_grass_decoration("tallgrass", 0.18, -0.03, grass_savanna, dry_index) register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse) local fern_minimal = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga" } diff --git a/tools/Texture_Conversion_Table.csv b/tools/Texture_Conversion_Table.csv index 6777e3e0a0..9fa128bb35 100644 --- a/tools/Texture_Conversion_Table.csv +++ b/tools/Texture_Conversion_Table.csv @@ -383,6 +383,12 @@ Source path,Source file,Target path,Target file,xs,ys,xl,yl,xt,yt /assets/minecraft/textures/blocks,double_plant_sunflower_top.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_double_plant_sunflower_top.png,,,,,, /assets/minecraft/textures/blocks,double_plant_syringa_bottom.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_double_plant_syringa_bottom.png,,,,,, /assets/minecraft/textures/blocks,double_plant_syringa_top.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_double_plant_syringa_top.png,,,,,, +/assets/minecraft/textures/blocks,double_plant_grass_bottom.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_double_plant_grass_bottom.png,,,,,, +/assets/minecraft/textures/blocks,double_plant_grass_top.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_double_plant_grass_top.png,,,,,, +/assets/minecraft/textures/blocks,double_plant_fern_bottom.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_double_plant_fern_bottom.png,,,,,, +/assets/minecraft/textures/blocks,double_plant_fern_top.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_double_plant_fern_top.png,,,,,, +/assets/minecraft/textures/blocks,tallgrass.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_tallgrass.png,,,,,, +/assets/minecraft/textures/blocks,fern.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_fern.png,,,,,, /assets/minecraft/textures/blocks,flower_oxeye_daisy.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_oxeye_daisy.png,,,,,, /assets/minecraft/textures/blocks,flower_rose.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_poppy.png,,,,,, /assets/minecraft/textures/blocks,flower_tulip_pink.png,/mods/ITEMS/mcl_flowers/textures,mcl_flowers_tulip_pink.png,,,,,, diff --git a/tools/Texture_Converter.py b/tools/Texture_Converter.py index 5e8cc8f4b0..2896092f7d 100755 --- a/tools/Texture_Converter.py +++ b/tools/Texture_Converter.py @@ -146,18 +146,20 @@ def convert_textures(): # Vines convert_alphatex(FOLIAG, tex_dir+"/blocks/vine.png", "16+32", str(PXSIZE), target_dir("/mods/ITEMS/mcl_core/textures")+"/mcl_core_vine.png") - # Tall grass, fern + # Tall grass, fern (inventory images) + col = "49+172" # Plains grass color + convert_alphatex(GRASS, tex_dir+"/blocks/tallgrass.png", col, str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_tallgrass_inv.png") + convert_alphatex(GRASS, tex_dir+"/blocks/fern.png", col, str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_fern_inv.png") + convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_fern_top.png", col, str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_fern_inv.png") + convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_grass_top.png", col, str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_grass_inv.png") + + # TODO: Convert grass palette + offset = [ - [ "49+172", "", "grass" ], # Default + [ "49+172", "", "grass" ], # Default grass: Plains [ "0+255", "_dry", "dry_grass" ], # Dry grass: Savanna, Mesa Plateau F, Nether, … ] for o in offset: - convert_alphatex(GRASS, tex_dir+"/blocks/tallgrass.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_tallgrass"+o[1]+".png") - convert_alphatex(GRASS, tex_dir+"/blocks/fern.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_fern"+o[1]+".png") - convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_fern_bottom.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_fern_bottom"+o[1]+".png") - convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_fern_top.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_fern_top"+o[1]+".png") - convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_grass_bottom.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_grass_bottom"+o[1]+".png") - convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_grass_top.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_grass_top"+o[1]+".png") os.system("convert "+GRASS+" -crop 1x1+"+o[0]+" -depth 8 -resize "+str(PXSIZE)+"x"+str(PXSIZE)+" "+tempfile1.name) os.system("composite -compose Multiply "+tempfile1.name+" "+tex_dir+"/blocks/grass_top.png "+target_dir("/mods/ITEMS/mcl_core/textures")+"/default_"+o[2]+".png")