From cbed7e4f04a9ba32961c09a104d3c53fbfdaa9a7 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Sun, 16 Jun 2024 19:47:38 -0300 Subject: [PATCH] Amethyst migration --- mods/ITEMS/mcl_amethyst/init.lua | 11 ----------- mods/MAPGEN/mcl_structures/geode.lua | 14 +++++++------- mods/blocks/natural/mineral.lua | 14 ++++++++++++++ textures/mcl_amethyst_amethyst_block.png | Bin 200 -> 0 bytes textures/mcl_amethyst_amethyst_shard.png | Bin 162 -> 0 bytes 5 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 textures/mcl_amethyst_amethyst_block.png delete mode 100644 textures/mcl_amethyst_amethyst_shard.png diff --git a/mods/ITEMS/mcl_amethyst/init.lua b/mods/ITEMS/mcl_amethyst/init.lua index c135b08fd..3438b887a 100644 --- a/mods/ITEMS/mcl_amethyst/init.lua +++ b/mods/ITEMS/mcl_amethyst/init.lua @@ -5,17 +5,6 @@ local sounds = mcl_sounds.node_sound_glass_defaults({ dug = {name = "mcl_amethyst_amethyst_break", gain = 0.44}, }) --- Amethyst block -minetest.register_node("mcl_amethyst:amethyst_block",{ - description = S("Block of Amethyst"), - tiles = {"mcl_amethyst_amethyst_block.png"}, - groups = {pickaxey = 1, building_block = 1}, - sounds = sounds, - is_ground_content = true, - _mcl_hardness = 1.5, - _mcl_blast_resistance = 1.5, -}) - minetest.register_node("mcl_amethyst:budding_amethyst_block",{ description = S("Budding Amethyst"), tiles = {"mcl_amethyst_budding_amethyst.png"}, diff --git a/mods/MAPGEN/mcl_structures/geode.lua b/mods/MAPGEN/mcl_structures/geode.lua index 9676e7ba1..da725da9b 100644 --- a/mods/MAPGEN/mcl_structures/geode.lua +++ b/mods/MAPGEN/mcl_structures/geode.lua @@ -34,23 +34,23 @@ local function makegeode(pos,def,pr) --if not nn[1] then return end for i=1,pr:next(1, math.max(2, #nn - math.ceil(#nn/5) )) do - set_node_no_bedrock(nn[i],{name="mcl_amethyst:amethyst_block"}) + set_node_no_bedrock(nn[i],{name="blocks:amethyst_block"}) end - for k,v in pairs(minetest.find_nodes_in_area(p1,p2,{"mcl_amethyst:amethyst_block"})) do + for k,v in pairs(minetest.find_nodes_in_area(p1,p2,{"blocks:amethyst_block"})) do local all_amethyst = true for kk,vv in pairs(adjacents) do local pp = vector.add(v,vv) local an = minetest.get_node(pp) - if an.name ~= "mcl_amethyst:amethyst_block" then + if an.name ~= "blocks:amethyst_block" then if minetest.get_item_group(an.name,"material_stone") > 0 then set_node_no_bedrock(pp,{name="blocks:calcite"}) table.insert(calcite,pp) if pr:next(1,5) == 1 then - set_node_no_bedrock(v,{name="mcl_amethyst:budding_amethyst_block"}) + set_node_no_bedrock(v,{name="blocks:budding_amethyst"}) end all_amethyst = false - elseif an.name ~= "mcl_amethyst:amethyst_block" and an.name ~= "air" and an.name ~= "mcl_amethyst:budding_amethyst_block" then + elseif an.name ~= "blocks:amethyst_block" and an.name ~= "air" and an.name ~= "blocks:budding_amethyst" then all_amethyst = false end end @@ -60,11 +60,11 @@ local function makegeode(pos,def,pr) for _,v in pairs(calcite) do for _,vv in pairs(minetest.find_nodes_in_area(vector.offset(v,-1,-1,-1),vector.offset(v,1,1,1),{"group:material_stone"})) do - set_node_no_bedrock(vv,{name="mcl_blackstone:basalt_smooth"}) + set_node_no_bedrock(vv,{name="blocks:basalt"}) end end - for k,v in pairs(minetest.find_nodes_in_area_under_air(p1,p2,{"mcl_amethyst:amethyst_block","mcl_amethyst:budding_amethyst_block"})) do + for k,v in pairs(minetest.find_nodes_in_area_under_air(p1,p2,{"blocks:amethyst_block","blocks:budding_amethyst"})) do local r = pr:next(1,50) if r < 10 then set_node_no_bedrock(vector.offset(v,0,1,0),{name="mcl_amethyst:amethyst_cluster",param2=1}) diff --git a/mods/blocks/natural/mineral.lua b/mods/blocks/natural/mineral.lua index 360a76d25..063562549 100644 --- a/mods/blocks/natural/mineral.lua +++ b/mods/blocks/natural/mineral.lua @@ -15,6 +15,20 @@ local common_defs = { } } +local amethyst_blocks = { + ["budding_amethyst"] = { + _mcl_blast_resistance = 1.5, + _mcl_hardness = 1.5, + drop = "", + groups = {natural_blocks = 1}, + sounds = mcl_sounds.node_sound_glass_defaults() + } +} + +for identifier, definitions in pairs(amethyst_blocks) do + voxelibre.register_block(identifier, definitions) +end + local overworld_ores = { ["coal"] = { drop = "items:coal", diff --git a/textures/mcl_amethyst_amethyst_block.png b/textures/mcl_amethyst_amethyst_block.png deleted file mode 100644 index 3b21001fde6a442c7868aa4bfdef76e7406a39f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VWO;+wKGM(NZwsBR>(PMM& z-`n@$@rk}gK-of17sn6|S=NIG1rICmupDqUX-N37IGA~x$-n0lnVOEj+duWqqI(^l zg*^GGbCLqIO7C%9mCJqRWIIV9{=vRCnl=xX{ffQoaHW0zq807?Yg3t(Z+2^6TC{n|=mpIfJLGpUXO@geCw{zEddx diff --git a/textures/mcl_amethyst_amethyst_shard.png b/textures/mcl_amethyst_amethyst_shard.png deleted file mode 100644 index ac7d83447ad156568a10d7d63bd25ecbd94255ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa2=EDU1=7jNokgb8o7|T6hizO{ zbM)Ap`}g*J*ra;#2T+c&B*-tA!Qt7BG$6;q)5S4_V`g%Kg6Nd#&Kch>lyE4U>hSn% z-nDF3qoiV@B4+~QwCBupHY`<8QL?nP_FnGH9xvX