From f12b931ddb37c5198d61020eefec38151b89061e Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Wed, 5 Apr 2023 14:44:24 -0400 Subject: [PATCH] Add Everness flowers - replacing flowers and grass from MTG default --- LICENSE.txt | 3 + mapgen_bamboo_forest.lua | 82 +++------ mod_support_mcl_aliases.lua | 7 +- nodes.lua | 265 +++++++++++++++++++++++++++ textures/everness_flowers.png | Bin 0 -> 435 bytes textures/everness_flowers_side_x.png | Bin 0 -> 117 bytes textures/everness_flowers_side_z.png | Bin 0 -> 115 bytes 7 files changed, 293 insertions(+), 64 deletions(-) create mode 100644 textures/everness_flowers.png create mode 100644 textures/everness_flowers_side_x.png create mode 100644 textures/everness_flowers_side_z.png diff --git a/LICENSE.txt b/LICENSE.txt index cb77dc3..0ef8416 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -857,6 +857,9 @@ GNU Lesser General Public License v2.1 or later (see included LICENSE file) - everness_coral_forest_deep_ocean_lantern_top.png - everness_coral_bones_block.png - everness_coral_bones_brick.png +- everness_flowers.png +- everness_flowers_side_x.png +- everness_flowers_side_z.png **CC-BY-SA-4.0, Pixel Perfection by XSSheep**, https://minecraft.curseforge.com/projects/pixel-perfection-freshly-updated diff --git a/mapgen_bamboo_forest.lua b/mapgen_bamboo_forest.lua index 61bcf6a..0fe26ff 100644 --- a/mapgen_bamboo_forest.lua +++ b/mapgen_bamboo_forest.lua @@ -149,48 +149,6 @@ if jungle_log_schem then }) end -local function register_grass_decoration(offset, scale, length) - minetest.register_decoration({ - name = 'everness:bamboo_forest_grass_' .. length, - deco_type = 'simple', - place_on = { 'everness:dirt_with_grass_1' }, - sidelen = 16, - noise_params = { - offset = offset, - scale = scale, - spread = { x = 200, y = 200, z = 200 }, - seed = 329, - octaves = 3, - persist = 0.6 - }, - biomes = { 'everness_bamboo_forest' }, - y_max = y_max, - y_min = y_min, - decoration = 'default:grass_' .. length, - }) -end - -local function register_flower(seed, flower_name) - minetest.register_decoration({ - name = 'everness:bamboo_forest_' .. flower_name, - deco_type = 'simple', - place_on = { 'everness:dirt_with_grass_1' }, - sidelen = 16, - noise_params = { - offset = -0.02, - scale = 0.04, - spread = { x = 200, y = 200, z = 200 }, - seed = seed, - octaves = 3, - persist = 0.6 - }, - biomes = { 'everness_bamboo_forest' }, - y_max = y_max, - y_min = y_min, - decoration = 'flowers:' .. flower_name, - }) -end - -- Bush if minetest.get_modpath('default') then @@ -238,24 +196,32 @@ if minetest.get_modpath('default') then }) end --- Grasses - -register_grass_decoration(-0.03, 0.09, 5) -register_grass_decoration(-0.015, 0.075, 4) -register_grass_decoration(0, 0.06, 3) -register_grass_decoration(0.015, 0.045, 2) -register_grass_decoration(0.03, 0.03, 1) - -- Flowers +local function register_flower_decoration(offset, scale, length) + minetest.register_decoration({ + name = 'everness:bamboo_forest_flowers_' .. length, + deco_type = 'simple', + place_on = { 'everness:dirt_with_grass_1' }, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = { x = 200, y = 200, z = 200 }, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = { 'everness_bamboo_forest' }, + y_max = y_max, + y_min = y_min, + decoration = 'everness:flowers_' .. length, + }) +end -register_flower(436, 'rose') -register_flower(19822, 'tulip') -register_flower(1220999, 'dandelion_yellow') -register_flower(800081, 'chrysanthemum_green') -register_flower(36662, 'geranium') -register_flower(1133, 'viola') -register_flower(73133, 'dandelion_white') -register_flower(42, 'tulip_black') +register_flower_decoration(-0.03, 0.09, 4) +register_flower_decoration(-0.015, 0.075, 3) +register_flower_decoration(0, 0.06, 2) +register_flower_decoration(0.015, 0.045, 1) -- -- On Generated diff --git a/mod_support_mcl_aliases.lua b/mod_support_mcl_aliases.lua index 899fe69..8b42579 100644 --- a/mod_support_mcl_aliases.lua +++ b/mod_support_mcl_aliases.lua @@ -108,11 +108,6 @@ minetest.register_alias('default:stone_with_diamond', 'mcl_core:stone_with_diamo minetest.register_alias('default:lava_source', 'mcl_core:lava_source') minetest.register_alias('default:mossycobble', 'mcl_core:mossycobble') minetest.register_alias('default:clay', 'mcl_colorblocks:hardened_clay') -minetest.register_alias('default:grass_1', 'mcl_flowers:tallgrass') -minetest.register_alias('default:grass_2', 'mcl_flowers:tallgrass') -minetest.register_alias('default:grass_3', 'mcl_flowers:tallgrass') -minetest.register_alias('default:grass_4', 'mcl_flowers:tallgrass') -minetest.register_alias('default:grass_5', 'mcl_flowers:tallgrass') minetest.register_alias('default:dry_dirt_with_dry_grass', 'mcl_core:dirt_with_grass') minetest.register_alias('default:dry_dirt', 'mcl_core:coarse_dirt') minetest.register_alias('default:coral_skeleton', 'mcl_core:bone_block') @@ -174,12 +169,12 @@ minetest.register_alias('doors:hidden', 'air') minetest.register_alias('everness:cobweb', 'mcl_core:cobweb') +-- Legacy - was replaced by everness:flowers_* minetest.register_alias('flowers:rose', 'mcl_flowers:wither_rose') minetest.register_alias('flowers:tulip', 'mcl_flowers:tulip_orange') minetest.register_alias('flowers:dandelion_yellow', 'mcl_flowers:dandelion') minetest.register_alias('flowers:geranium', 'mcl_flowers:allium') minetest.register_alias('flowers:viola', 'mcl_flowers:azure_bluet') minetest.register_alias('flowers:tulip_black', 'mcl_flowers:tulip_white') - minetest.register_alias('flowers:dandelion_white', 'mcl_flowers:tulip_pink') minetest.register_alias('flowers:chrysanthemum_green', 'mcl_flowers:tulip_white') diff --git a/nodes.lua b/nodes.lua index 4d3c320..383b178 100644 --- a/nodes.lua +++ b/nodes.lua @@ -4600,6 +4600,271 @@ Everness:register_node('everness:cursed_bush_sapling', { -- Plantlife (non-cubic) -- +Everness:register_node('everness:flowers_1', { + description = S('Flowers'), + short_description = S('Flowers'), + drawtype = 'nodebox', + -- Textures of node; +Y, -Y, +X, -X, +Z, -Z + tiles = { + 'everness_flowers.png', + 'everness_flowers.png^[transformFY', + 'everness_flowers_side_x.png', + 'everness_flowers_side_x.png^[transformFX', + 'everness_flowers_side_z.png^[transformFX', + 'everness_flowers_side_z.png', + }, + use_texture_alpha = 'clip', + inventory_image = 'everness_flowers.png', + wield_image = 'everness_flowers.png', + paramtype = 'light', + paramtype2 = 'facedir', + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = { + -- MTG + snappy = 3, + flora = 1, + bamboo_grass = 1, + -- MCL + handy = 1, + shearsy = 1, + deco_block = 1, + plant = 1, + non_mycelium_plant = 1, + fire_encouragement = 60, + fire_flammability = 100, + dig_by_water = 1, + destroy_by_lava_flow = 1, + compostability = 30, + -- ALL + attached_node = 1, + flammable = 1, + }, + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + sounds = Everness.node_sound_leaves_defaults(), + selection_box = { + type = 'fixed', + fixed = { -8 / 16, -0.5, -8 / 16, 8 / 16, -5 / 16, 8 / 16 }, + }, + node_box = { + type = 'fixed', + fixed = { + { 0, -0.3125, -0.0625, 0.5, -0.3125, 0.5 }, -- 3 small flowers top (A) + { 0.375, -0.5, 0.0625, 0.4375, -0.3125, 0.125 }, -- stem A + { 0.0625, -0.5, 0, 0.125, -0.3125, 0.0625 }, -- stem A + { 0.1875, -0.5, 0.3125, 0.25, -0.3125, 0.375 }, -- stem A + } + }, + on_place = function(itemstack, placer, pointed_thing) + local stack = ItemStack('everness:flowers_' .. math.random(1, 4)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack('everness:flowers_1 ' .. itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +Everness:register_node('everness:flowers_2', { + description = S('Flowers'), + short_description = S('Flowers'), + drawtype = 'nodebox', + -- Textures of node; +Y, -Y, +X, -X, +Z, -Z + tiles = { + 'everness_flowers.png', + 'everness_flowers.png^[transformFY', + 'everness_flowers_side_x.png', + 'everness_flowers_side_x.png^[transformFX', + 'everness_flowers_side_z.png^[transformFX', + 'everness_flowers_side_z.png', + }, + use_texture_alpha = 'clip', + inventory_image = 'everness_flowers.png', + wield_image = 'everness_flowers.png', + paramtype = 'light', + paramtype2 = 'facedir', + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = 'everness:flowers_1', + groups = { + -- MTG + snappy = 3, + flora = 1, + bamboo_grass = 1, + -- MCL + handy = 1, + shearsy = 1, + deco_block = 1, + plant = 1, + non_mycelium_plant = 1, + fire_encouragement = 60, + fire_flammability = 100, + dig_by_water = 1, + destroy_by_lava_flow = 1, + compostability = 30, + -- ALL + attached_node = 1, + flammable = 1, + not_in_creative_inventory = 1, + }, + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + sounds = Everness.node_sound_leaves_defaults(), + selection_box = { + type = 'fixed', + fixed = { -8 / 16, -0.5, -8 / 16, 8 / 16, -5 / 16, 8 / 16 }, + }, + node_box = { + type = 'fixed', + fixed = { + { 0, -0.3125, -0.0625, 0.5, -0.3125, 0.5 }, -- 3 small flowers top (A) + { 0.375, -0.5, 0.0625, 0.4375, -0.3125, 0.125 }, -- stem A + { 0.0625, -0.5, 0, 0.125, -0.3125, 0.0625 }, -- stem A + { 0.1875, -0.5, 0.3125, 0.25, -0.3125, 0.375 }, -- stem A + { -0.5, -0.4375, 0, 0, -0.4375, 0.5 }, -- 1 big flower top (D) + { -0.25, -0.5, 0.1875, -0.1875, -0.4375, 0.25 }, -- stem D + } + } +}) + +Everness:register_node('everness:flowers_3', { + description = S('Flowers'), + short_description = S('Flowers'), + drawtype = 'nodebox', + -- Textures of node; +Y, -Y, +X, -X, +Z, -Z + tiles = { + 'everness_flowers.png', + 'everness_flowers.png^[transformFY', + 'everness_flowers_side_x.png', + 'everness_flowers_side_x.png^[transformFX', + 'everness_flowers_side_z.png^[transformFX', + 'everness_flowers_side_z.png', + }, + use_texture_alpha = 'clip', + inventory_image = 'everness_flowers.png', + wield_image = 'everness_flowers.png', + paramtype = 'light', + paramtype2 = 'facedir', + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = 'everness:flowers_1', + groups = { + -- MTG + snappy = 3, + flora = 1, + bamboo_grass = 1, + -- MCL + handy = 1, + shearsy = 1, + deco_block = 1, + plant = 1, + non_mycelium_plant = 1, + fire_encouragement = 60, + fire_flammability = 100, + dig_by_water = 1, + destroy_by_lava_flow = 1, + compostability = 30, + -- ALL + attached_node = 1, + flammable = 1, + not_in_creative_inventory = 1, + }, + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + sounds = Everness.node_sound_leaves_defaults(), + selection_box = { + type = 'fixed', + fixed = { -8 / 16, -0.5, -8 / 16, 8 / 16, -5 / 16, 8 / 16 }, + }, + node_box = { + type = 'fixed', + fixed = { + { 0, -0.3125, -0.0625, 0.5, -0.3125, 0.5 }, -- 3 small flowers top (A) + { 0.375, -0.5, 0.0625, 0.4375, -0.3125, 0.125 }, -- stem A + { 0.0625, -0.5, 0, 0.125, -0.3125, 0.0625 }, -- stem A + { 0.1875, -0.5, 0.3125, 0.25, -0.3125, 0.375 }, -- stem A + { -0.5, -0.4375, 0, 0, -0.4375, 0.5 }, -- 1 big flower top (D) + { -0.25, -0.5, 0.1875, -0.1875, -0.4375, 0.25 }, -- stem D + { -0.5, -0.375, -0.5, 0, -0.375, 0 }, -- 2 small and 1 medium flowers top (C) + { -0.125, -0.5, -0.1875, -0.0625, -0.375, -0.125 }, -- stem C + { -0.4375, -0.5, -0.25, -0.375, -0.375, -0.1875 }, -- stem C + { -0.3125, -0.5, -0.375, -0.1875, -0.375, -0.375 }, -- stem C + { -0.25, -0.5, -0.4375, -0.25, -0.375, -0.3125 }, -- stem C + } + } +}) + +Everness:register_node('everness:flowers_4', { + description = S('Flowers'), + short_description = S('Flowers'), + drawtype = 'nodebox', + -- Textures of node; +Y, -Y, +X, -X, +Z, -Z + tiles = { + 'everness_flowers.png', + 'everness_flowers.png^[transformFY', + 'everness_flowers_side_x.png', + 'everness_flowers_side_x.png^[transformFX', + 'everness_flowers_side_z.png^[transformFX', + 'everness_flowers_side_z.png', + }, + use_texture_alpha = 'clip', + inventory_image = 'everness_flowers.png', + wield_image = 'everness_flowers.png', + paramtype = 'light', + paramtype2 = 'facedir', + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = 'everness:flowers_1', + groups = { + -- MTG + snappy = 3, + flora = 1, + bamboo_grass = 1, + -- MCL + handy = 1, + shearsy = 1, + deco_block = 1, + plant = 1, + non_mycelium_plant = 1, + fire_encouragement = 60, + fire_flammability = 100, + dig_by_water = 1, + destroy_by_lava_flow = 1, + compostability = 30, + -- ALL + attached_node = 1, + flammable = 1, + not_in_creative_inventory = 1, + }, + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + sounds = Everness.node_sound_leaves_defaults(), + selection_box = { + type = 'fixed', + fixed = { -8 / 16, -0.5, -8 / 16, 8 / 16, -5 / 16, 8 / 16 }, + }, + node_box = { + type = 'fixed', + fixed = { + { 0, -0.3125, -0.0625, 0.5, -0.3125, 0.5 }, -- 3 small flowers top (A) + { 0.375, -0.5, 0.0625, 0.4375, -0.3125, 0.125 }, -- stem A + { 0.0625, -0.5, 0, 0.125, -0.3125, 0.0625 }, -- stem A + { 0.1875, -0.5, 0.3125, 0.25, -0.3125, 0.375 }, -- stem A + { 0, -0.375, -0.5, 0.5, -0.375, -0.0625 }, -- 1 big flower top (B) + { 0.1875, -0.5, -0.3125, 0.25, -0.375, -0.25 }, -- stem B + { -0.5, -0.375, -0.5, 0, -0.375, 0 }, -- 2 small and 1 medium flowers top (C) + { -0.125, -0.5, -0.1875, -0.0625, -0.375, -0.125 }, -- stem C + { -0.4375, -0.5, -0.25, -0.375, -0.375, -0.1875 }, -- stem C + { -0.3125, -0.5, -0.375, -0.1875, -0.375, -0.375 }, -- stem C + { -0.25, -0.5, -0.4375, -0.25, -0.375, -0.3125 }, -- stem C + { -0.5, -0.4375, 0, 0, -0.4375, 0.5 }, -- 1 big flower top (D) + { -0.25, -0.5, 0.1875, -0.1875, -0.4375, 0.25 }, -- stem D + } + } +}) + Everness:register_node('everness:coral_burdock_1', { description = S('Coral Burdock'), short_description = S('Coral Burdock'), diff --git a/textures/everness_flowers.png b/textures/everness_flowers.png new file mode 100644 index 0000000000000000000000000000000000000000..09d2eb34f263e23c042cb935e08270633c417096 GIT binary patch literal 435 zcmV;k0ZjghP)(%E5${F*THK!o+SSow%u-6V`8R#@#sAetB6x!ZS_<)#W zhq}QZJV-{6%371o*|-{V7*A3JF_+3&|E>ms(Bc19m35(VJ6*Qmf9opYn5mCfJ?HLO zHN4&fsU4Nf1!`{Ex{G2!+JMKukK3o4FX$~}0gv|GN`3JVx&Y;z3Gh1|c%2%_%})*7 zrf4agMlZb=9`UgZ4BM}%wMEzA&9H<0(E009tM1Hs{EFFS4mx;HV*<&jEv=G8&|&xj z_m0{;Ar7e5bcx7s5kwPaL9h7-W@v-D4YRgA$g)?Z51O^_o3!lGH9))DN&ll(cboo` zx1Quq3WSXebsBCZ9Ge dlP~~MJ5QBmGdsu3O737iVZq2xFO9 zYXKBzED7=pW^j0RBMrzA_jGX#sbEZAz{DYta3N}gN8`bNhtruE#JpJS@92nx0F^L! My85}Sb4q9e0RA`~^#A|> literal 0 HcmV?d00001 diff --git a/textures/everness_flowers_side_z.png b/textures/everness_flowers_side_z.png new file mode 100644 index 0000000000000000000000000000000000000000..6e3a45a55d008c1109305e5d205a0fbd1f1cd069 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9JOMr-uI>dsmWwmACWN_eEnl1U zLLDg1SQ6wH%;50sMjDVK>gnPb!f`!0VS$XqX9JF19GeUpIT+XvFp9ZM{KW@Uz~JfX K=d#Wzp$P!!c^$X_ literal 0 HcmV?d00001