From 15b5d8917a552684e07baf0846719955ad71aa31 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 1 Mar 2017 01:16:52 +0100 Subject: [PATCH] Move small mushrooms to mcl_mushrooms --- mods/ENTITIES/mobs_mc/enderman.lua | 2 +- mods/HUD/mcl_craftguide/init.lua | 2 +- mods/ITEMS/mcl_farming/init.lua | 3 - mods/ITEMS/mcl_flowerpots/nodes.lua | 4 +- mods/ITEMS/mcl_mushrooms/huge.lua | 75 +++++++++++++++++ mods/ITEMS/mcl_mushrooms/init.lua | 79 ++---------------- .../mushrooms.lua => mcl_mushrooms/small.lua} | 12 +-- .../textures/farming_mushroom_brown.png | Bin .../textures/farming_mushroom_red.png | Bin .../textures/farming_mushroom_stew.png | Bin mods/ITEMS/mcl_potions/init.lua | 2 +- mods/MISC/mcl_wip/init.lua | 4 +- 12 files changed, 94 insertions(+), 89 deletions(-) create mode 100644 mods/ITEMS/mcl_mushrooms/huge.lua rename mods/ITEMS/{mcl_farming/mushrooms.lua => mcl_mushrooms/small.lua} (81%) rename mods/ITEMS/{mcl_farming => mcl_mushrooms}/textures/farming_mushroom_brown.png (100%) rename mods/ITEMS/{mcl_farming => mcl_mushrooms}/textures/farming_mushroom_red.png (100%) rename mods/ITEMS/{mcl_farming => mcl_mushrooms}/textures/farming_mushroom_stew.png (100%) diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index d90cc3f5d4..25c25f5ac6 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -54,7 +54,7 @@ mobs:register_mob("mobs_mc:enderman", { view_range = 16, attack_type = "dogfight", replace_rate = 1, - replace_what = {"mcl_flowers:allium", "mcl_flowers:azure_bluet", "mcl_flowers:blue_orchid", "mcl_flowers:dandelion", "mcl_flowers:tulip_orange", "mcl_flowers:tulip_red", "mcl_flowers:tulip_pink", "mcl_flowers:tulip_white", "mcl_flowers:oxeye_daisy", "mcl_flowers:poppy", "mcl_core:cactus", "mcl_core:clay", "mcl_core:coarse_dirt", "mcl_core:dirt", "mcl_core:dirt_with_grass", "mcl_core:gravel", "mcl_farming:melon", "mcl_farming:pumpkin_face", "mcl_core:mycelium", "mcl_core:podzol", "mcl_farming:mushroom_red", "mcl_farming:mushroom_brown", "mcl_core:redsand", "mcl_core:sand", "mcl_tnt:tnt", "mcl_nether:netherrack"}, + replace_what = {"mcl_flowers:allium", "mcl_flowers:azure_bluet", "mcl_flowers:blue_orchid", "mcl_flowers:dandelion", "mcl_flowers:tulip_orange", "mcl_flowers:tulip_red", "mcl_flowers:tulip_pink", "mcl_flowers:tulip_white", "mcl_flowers:oxeye_daisy", "mcl_flowers:poppy", "mcl_core:cactus", "mcl_core:clay", "mcl_core:coarse_dirt", "mcl_core:dirt", "mcl_core:dirt_with_grass", "mcl_core:gravel", "mcl_farming:melon", "mcl_farming:pumpkin_face", "mcl_core:mycelium", "mcl_core:podzol", "mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown", "mcl_core:redsand", "mcl_core:sand", "mcl_tnt:tnt", "mcl_nether:netherrack"}, replace_with = "air", replace_offset = -1, diff --git a/mods/HUD/mcl_craftguide/init.lua b/mods/HUD/mcl_craftguide/init.lua index 08841a697c..abf6f3ad8e 100644 --- a/mods/HUD/mcl_craftguide/init.lua +++ b/mods/HUD/mcl_craftguide/init.lua @@ -41,7 +41,7 @@ local group_stereotypes = { dye = "mcl_dye:white", water_bucket = "bucket:bucket_water", flower = "mcl_flowers:dandelion", - mushroom = "mcl_farming:mushroom_brown", + mushroom = "mcl_mushrooms:mushroom_brown", wood_slab = "stairs:slab_wood", wood_stairs = "stairs:stairs_wood", coal = "mcl_core:coal_lump", diff --git a/mods/ITEMS/mcl_farming/init.lua b/mods/ITEMS/mcl_farming/init.lua index 77f489a8ce..ec993b0181 100644 --- a/mods/ITEMS/mcl_farming/init.lua +++ b/mods/ITEMS/mcl_farming/init.lua @@ -88,9 +88,6 @@ dofile(minetest.get_modpath("mcl_farming").."/carrots.lua") -- ========= POTATOES ========= dofile(minetest.get_modpath("mcl_farming").."/potatoes.lua") --- ========= MUSHROOMS ========= -dofile(minetest.get_modpath("mcl_farming").."/mushrooms.lua") - -- ========= BEETROOT ========= dofile(minetest.get_modpath("mcl_farming").."/beetroot.lua") diff --git a/mods/ITEMS/mcl_flowerpots/nodes.lua b/mods/ITEMS/mcl_flowerpots/nodes.lua index 148d2ae8d1..2bfb3af383 100644 --- a/mods/ITEMS/mcl_flowerpots/nodes.lua +++ b/mods/ITEMS/mcl_flowerpots/nodes.lua @@ -10,8 +10,8 @@ local flowers = { {"tulip_white", "mcl_flowers:tulip_white", "White Tulip Flower Pot"}, {"tulip_orange", "mcl_flowers:tulip_orange", "Orange Tulip Flower Pot"}, {"oxeye_daisy", "mcl_flowers:oxeye_daisy", "Oxeye Daisy Flower Pot"}, - {"mushroom_brown", "mcl_farming:mushroom_brown", "Brown Mushroom Flower Pot"}, - {"mushroom_red", "mcl_farming:mushroom_red", "Red Mushroom Flower Pot"}, + {"mushroom_brown", "mcl_mushrooms:mushroom_brown", "Brown Mushroom Flower Pot"}, + {"mushroom_red", "mcl_mushrooms:mushroom_red", "Red Mushroom Flower Pot"}, {"sapling", "mcl_core:sapling", "Oak Sapling Flower Pot"}, {"acaciasapling", "mcl_core:acaciasapling", "Acacia Sapling Flower Pot"}, {"junglesapling", "mcl_core:junglesapling", "Jungle Sapling Flower Pot"}, diff --git a/mods/ITEMS/mcl_mushrooms/huge.lua b/mods/ITEMS/mcl_mushrooms/huge.lua new file mode 100644 index 0000000000..961ee6f0d7 --- /dev/null +++ b/mods/ITEMS/mcl_mushrooms/huge.lua @@ -0,0 +1,75 @@ +local template = { + groups = {handy=1,axey=1, huge_mushroom = 1, building_block = 1 }, + sounds = mcl_sounds.node_sound_wood_defaults(), + is_ground_content = true, + _mcl_blast_resistance = 1, + _mcl_hardness = 0.2, +} + +local red = table.copy(template) +red.drop = { + items = { + { items = {'mcl_mushrooms:mushroom_red 1'}, rarity = 2 }, + { items = {'mcl_mushrooms:mushroom_red 1'}, rarity = 2 }, + } +} + +local brown= table.copy(template) +brown.drop = { + items = { + { items = {'mcl_mushrooms:mushroom_brown 1'}, rarity = 2 }, + { items = {'mcl_mushrooms:mushroom_brown 1'}, rarity = 2 }, + } +} + +local register_mushroom = function(color, template, d_cap_top, d_cap_side, d_cap_corner, d_stem, d_pores, d_cap_all, d_stem_all) + + -- DV (Minecraft dava value) 14: Cap texture on all sides + local full = table.copy(template) + full.description = d_cap_all + full.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png" } + minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_full", full) + + -- DV 0: Pores on all sides + local pores_full = table.copy(template) + pores_full.description = d_pores + pores_full.tiles = { "mcl_mushrooms_mushroom_block_inside.png" } + minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_pores_full", pores_full) + + -- DV 15: Stem texture on all sides + local stem_full = table.copy(template) + stem_full.description = d_stem_all + stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" } + minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem_full", stem_full) + + -- DV 10: Stem + local stem = table.copy(template) + stem.description = d_stem + stem.tiles = { "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_stem.png" } + minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem", stem) + + -- DV 1, DV 3, DV 7, DV 9: Cap corner. Cap texture on top and two sides in a corner formation + local cap_corner = table.copy(template) + cap_corner.description = d_cap_corner + cap_corner.paramtype2 = "facedir" + cap_corner.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" } + minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_corner", cap_corner) + + -- DV 5: Cap texture on top + local cap_top = table.copy(template) + cap_top.description = d_cap_top + cap_top.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png" } + minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_top", cap_top) + + -- DV 2, DV 4, DV 6, DV 8: Cap texture on top and one side + local cap_side = table.copy(template) + cap_side.description = d_cap_side + cap_side.paramtype2 = "facedir" + cap_side.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" } + minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_side", cap_side) + +end + +register_mushroom("red", red, "Huge Red Mushroom Cap Top", "Huge Red Mushroom Cap Side", "Huge Red Mushroom Cap Corner", "Huge Red Mushroom Stem", "Huge Red Mushroom Pores", "Huge Red Mushroom All-Faces Cap", "Huge Red Mushroom All-Faces Stem") + +register_mushroom("brown", brown, "Huge Brown Mushroom Cap Top", "Huge Brown Mushroom Cap Side", "Huge Brown Mushroom Cap Corner", "Huge Brown Mushroom Stem", "Huge Brown Mushroom Pores", "Huge Brown Mushroom All-Faces Cap", "Huge Brown Mushroom All-Faces Stem") diff --git a/mods/ITEMS/mcl_mushrooms/init.lua b/mods/ITEMS/mcl_mushrooms/init.lua index 0981f234b7..1360eabe7c 100644 --- a/mods/ITEMS/mcl_mushrooms/init.lua +++ b/mods/ITEMS/mcl_mushrooms/init.lua @@ -1,75 +1,6 @@ -local template = { - groups = {handy=1,axey=1, huge_mushroom = 1, building_block = 1 }, - sounds = mcl_sounds.node_sound_wood_defaults(), - is_ground_content = true, - _mcl_blast_resistance = 1, - _mcl_hardness = 0.2, -} +dofile(minetest.get_modpath("mcl_mushrooms").."/small.lua") +dofile(minetest.get_modpath("mcl_mushrooms").."/huge.lua") -local red = table.copy(template) -red.drop = { - items = { - { items = {'mcl_farming:mushroom_red 1'}, rarity = 2 }, - { items = {'mcl_farming:mushroom_red 1'}, rarity = 2 }, - } -} - -local brown= table.copy(template) -brown.drop = { - items = { - { items = {'mcl_farming:mushroom_brown 1'}, rarity = 2 }, - { items = {'mcl_farming:mushroom_brown 1'}, rarity = 2 }, - } -} - -local register_mushroom = function(color, template, d_cap_top, d_cap_side, d_cap_corner, d_stem, d_pores, d_cap_all, d_stem_all) - - -- DV (Minecraft dava value) 14: Cap texture on all sides - local full = table.copy(template) - full.description = d_cap_all - full.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png" } - minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_full", full) - - -- DV 0: Pores on all sides - local pores_full = table.copy(template) - pores_full.description = d_pores - pores_full.tiles = { "mcl_mushrooms_mushroom_block_inside.png" } - minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_pores_full", pores_full) - - -- DV 15: Stem texture on all sides - local stem_full = table.copy(template) - stem_full.description = d_stem_all - stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" } - minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem_full", stem_full) - - -- DV 10: Stem - local stem = table.copy(template) - stem.description = d_stem - stem.tiles = { "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_stem.png" } - minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem", stem) - - -- DV 1, DV 3, DV 7, DV 9: Cap corner. Cap texture on top and two sides in a corner formation - local cap_corner = table.copy(template) - cap_corner.description = d_cap_corner - cap_corner.paramtype2 = "facedir" - cap_corner.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" } - minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_corner", cap_corner) - - -- DV 5: Cap texture on top - local cap_top = table.copy(template) - cap_top.description = d_cap_top - cap_top.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png" } - minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_top", cap_top) - - -- DV 2, DV 4, DV 6, DV 8: Cap texture on top and one side - local cap_side = table.copy(template) - cap_side.description = d_cap_side - cap_side.paramtype2 = "facedir" - cap_side.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" } - minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_side", cap_side) - -end - -register_mushroom("red", red, "Huge Red Mushroom Cap Top", "Huge Red Mushroom Cap Side", "Huge Red Mushroom Cap Corner", "Huge Red Mushroom Stem", "Huge Red Mushroom Pores", "Huge Red Mushroom All-Faces Cap", "Huge Red Mushroom All-Faces Stem") - -register_mushroom("brown", brown, "Huge Brown Mushroom Cap Top", "Huge Brown Mushroom Cap Side", "Huge Brown Mushroom Cap Corner", "Huge Brown Mushroom Stem", "Huge Brown Mushroom Pores", "Huge Brown Mushroom All-Faces Cap", "Huge Brown Mushroom All-Faces Stem") +-- Aliases for old MCL2 versions +minetest.register_alias("mcl_farming:mushroom_red", "mcl_mushrooms:mushroom_red") +minetest.register_alias("mcl_farming:mushroom_brown", "mcl_mushrooms:mushroom_brown") diff --git a/mods/ITEMS/mcl_farming/mushrooms.lua b/mods/ITEMS/mcl_mushrooms/small.lua similarity index 81% rename from mods/ITEMS/mcl_farming/mushrooms.lua rename to mods/ITEMS/mcl_mushrooms/small.lua index 93c846a7ef..9be30336af 100644 --- a/mods/ITEMS/mcl_farming/mushrooms.lua +++ b/mods/ITEMS/mcl_mushrooms/small.lua @@ -1,4 +1,4 @@ -minetest.register_node("mcl_farming:mushroom_brown", { +minetest.register_node("mcl_mushrooms:mushroom_brown", { description = "Brown Mushroom", drawtype = "plantlike", tiles = { "farming_mushroom_brown.png" }, @@ -17,7 +17,7 @@ minetest.register_node("mcl_farming:mushroom_brown", { _mcl_blast_resistance = 0, }) -minetest.register_node("mcl_farming:mushroom_red", { +minetest.register_node("mcl_mushrooms:mushroom_red", { description = "Red Mushroom", drawtype = "plantlike", tiles = { "farming_mushroom_red.png" }, @@ -35,7 +35,7 @@ minetest.register_node("mcl_farming:mushroom_red", { _mcl_blast_resistance = 0, }) -minetest.register_craftitem("mcl_farming:mushroom_stew", { +minetest.register_craftitem("mcl_mushrooms:mushroom_stew", { description = "Mushroom Stew", inventory_image = "farming_mushroom_stew.png", on_place = minetest.item_eat(6, "mcl_core:bowl"), @@ -46,6 +46,8 @@ minetest.register_craftitem("mcl_farming:mushroom_stew", { minetest.register_craft({ type = "shapeless", - output = "mcl_farming:mushroom_stew", - recipe = {'mcl_core:bowl', 'mcl_farming:mushroom_brown', 'mcl_farming:mushroom_red'} + output = "mcl_mushrooms:mushroom_stew", + recipe = {'mcl_core:bowl', 'mcl_mushrooms:mushroom_brown', 'mcl_mushrooms:mushroom_red'} }) + + diff --git a/mods/ITEMS/mcl_farming/textures/farming_mushroom_brown.png b/mods/ITEMS/mcl_mushrooms/textures/farming_mushroom_brown.png similarity index 100% rename from mods/ITEMS/mcl_farming/textures/farming_mushroom_brown.png rename to mods/ITEMS/mcl_mushrooms/textures/farming_mushroom_brown.png diff --git a/mods/ITEMS/mcl_farming/textures/farming_mushroom_red.png b/mods/ITEMS/mcl_mushrooms/textures/farming_mushroom_red.png similarity index 100% rename from mods/ITEMS/mcl_farming/textures/farming_mushroom_red.png rename to mods/ITEMS/mcl_mushrooms/textures/farming_mushroom_red.png diff --git a/mods/ITEMS/mcl_farming/textures/farming_mushroom_stew.png b/mods/ITEMS/mcl_mushrooms/textures/farming_mushroom_stew.png similarity index 100% rename from mods/ITEMS/mcl_farming/textures/farming_mushroom_stew.png rename to mods/ITEMS/mcl_mushrooms/textures/farming_mushroom_stew.png diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index 7784b9ff80..a89da65928 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -9,7 +9,7 @@ minetest.register_craftitem("mcl_potions:fermented_spider_eye", { minetest.register_craft({ type = "shapeless", output = "mcl_potions:fermented_spider_eye", - recipe = { "mcl_farming:mushroom_brown", "mcl_core:sugar", "mcl_mobitems:spider_eye" }, + recipe = { "mcl_mushrooms:mushroom_brown", "mcl_core:sugar", "mcl_mobitems:spider_eye" }, }) minetest.register_craftitem("mcl_potions:glass_bottle", { diff --git a/mods/MISC/mcl_wip/init.lua b/mods/MISC/mcl_wip/init.lua index 28687ad9fc..559a73be79 100644 --- a/mods/MISC/mcl_wip/init.lua +++ b/mods/MISC/mcl_wip/init.lua @@ -27,8 +27,8 @@ local wip_items = { "mcl_mobitems:spider_eye", "mcl_minecarts:golden_rail", "mcl_sponges:sponge", - "mcl_farming:mushroom_red", - "mcl_farming:mushroom_brown", + "mcl_mushrooms:mushroom_red", + "mcl_mushrooms:mushroom_brown", "gemalde:node_1", "mcl_observers:observer", "mcl_farming:potato_item_poison",