From a03973a80bb590b2c8aa30e50447e5674741b903 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 23 Oct 2022 14:32:33 +0200 Subject: [PATCH 01/39] tweak v7 cavern threshhold for larger nether caves --- mods/MAPGEN/mcl_mapgen_core/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 3cd355b14..e09a86ffe 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -104,6 +104,10 @@ if superflat then minetest.set_mapgen_setting("mgflat_spflags", "nolakes,nohills", true) end +if mg_name == "v7" then + minetest.set_mapgen_setting("mgv7_cavern_threshold", "0.15", true) +end + local mg_flags_str = "" for k,v in pairs(mg_flags) do if v == false then From a91586b2b52bfc1f931f3d7549070704c1c42d01 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 23 Oct 2022 14:33:09 +0200 Subject: [PATCH 02/39] Fix a few nether biomes settings --- mods/MAPGEN/mcl_biomes/init.lua | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index e5f9333be..8da0caa3d 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1578,7 +1578,7 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone"}, + place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_nether:magma"}, sidelen = 16, fill_ratio = 10, biomes = { "SoulsandValley" }, @@ -1628,7 +1628,7 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand"}, + place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:magma","mcl_blackstone:blackstone"}, sidelen = 16, fill_ratio = 10, biomes = { "CrimsonForest" }, @@ -1655,7 +1655,7 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand"}, + place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:magma","mcl_blackstone:blackstone"}, sidelen = 16, fill_ratio = 10, biomes = { "WarpedForest" }, @@ -1681,6 +1681,19 @@ local function register_dimension_biomes() _mcl_palette_index = 17, }) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_blackstone:blackstone","mcl_nether:magma"}, + sidelen = 16, + fill_ratio = 10, + biomes = { "BasaltDelta" }, + y_min = -31000, + y_max = mcl_vars.mg_nether_max, + decoration = "mcl_blackstone:basalt", + flags = "all_floors", + param2 = 0, + }) + minetest.register_ore({ ore_type = "blob", ore = "mcl_blackstone:blackstone", @@ -1703,19 +1716,6 @@ local function register_dimension_biomes() } }) - minetest.register_decoration({ - deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_blackstone:blackstone"}, - sidelen = 16, - fill_ratio = 10, - biomes = { "BasaltDelta" }, - y_min = -31000, - y_max = mcl_vars.mg_nether_max, - decoration = "mcl_blackstone:basalt", - flags = "all_floors", - param2 = 0, - }) - --[[ THE END ]] minetest.register_biome({ name = "End", From d866b61d1c40039bcba27dbd0bbeb3d4fb465c05 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 23 Oct 2022 14:53:35 +0200 Subject: [PATCH 03/39] Add lower cavern threshhold for all mgs that support it --- mods/MAPGEN/mcl_mapgen_core/init.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index e09a86ffe..724c576a9 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -105,7 +105,15 @@ if superflat then end if mg_name == "v7" then - minetest.set_mapgen_setting("mgv7_cavern_threshold", "0.15", true) + minetest.set_mapgen_setting("mgv7_cavern_threshold", "0.20", true) +elseif mg_name == "valleys" then + minetest.set_mapgen_setting("mgvalleys_cavern_threshold", "0.20", true) +elseif mg_name == "carpathian" then + minetest.set_mapgen_setting("mgcarpathian_cavern_threshold", "0.20", true) +elseif mg_name == "v5" then + minetest.set_mapgen_setting("mgv5_cavern_threshold", "0.20", true) +elseif mg_name == "fractal" then + minetest.set_mapgen_setting("mgfractal_cavern_threshold", "0.20", true) end local mg_flags_str = "" From 68039e0fb6e55a8b6e113a8e6520e3f32782607c Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 23 Oct 2022 17:02:54 +0200 Subject: [PATCH 04/39] Fix nether outpost schematic voids (air inside now) --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 18 ++++++------------ .../mcl_nether_fortresses_nether_outpost.mts | Bin 0 -> 1322 bytes .../schematics/nether_outpost.mts | Bin 1392 -> 0 bytes 3 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_outpost.mts delete mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/nether_outpost.mts diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 8a5d97244..996560783 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -3,27 +3,21 @@ local modpath = minetest.get_modpath(modname) mcl_structures.register_structure("nether_outpost",{ place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil"}, - noise_params = { - offset = 0, - scale = 0.00022, - spread = {x = 250, y = 250, z = 250}, - seed = 333, - octaves = 1, - persist = 0.0001, - flags = "absvalue", - }, + fill_ratio = 0.001, + chunk_probability = 600, flags = "all_floors", biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest","BasaltDelta"}, - sidelen = 15, + sidelen = 24, solid_ground = true, make_foundation = true, y_min = mcl_vars.mg_lava_nether_max - 1, y_max = mcl_vars.mg_nether_max - 30, - filenames = { modpath.."/schematics/nether_outpost.mts" }, + filenames = { modpath.."/schematics/mcl_nether_fortresses_nether_outpost.mts" }, y_offset = 0, after_place = function(pos) local sp = minetest.find_nodes_in_area(pos,vector.offset(pos,0,20,0),{"mcl_mobspawners:spawner"}) if not sp[1] then return end - mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 3, -1) + table.shuffle(sp) + mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) end }) diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_outpost.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_outpost.mts new file mode 100644 index 0000000000000000000000000000000000000000..4fa3f19353ea65f06fe9ce68780e0c5fe179624e GIT binary patch literal 1322 zcmeYb3HD`RVc=yDWZl|cq13Jb%W#3WQbC?Sk4 z8=sP2nv|1@VsLSODbTpYyc7lrBIKvkthL@=RQT}a^5 z^);TSmrOX=9U8B`QL%Y$XmV0Z=y8L~(Gw2LOZc|we{W>!y8H6x-h5$aWoF*V^l>zL z|7HeHXw^LB(=`G<{~DIt7Iz1y-JBL_ow4Iw;>PT?2Q5z6nJ-hBIY}n?)Cu0LcdHGR zdn&K|;%E}o)o%KEIFcbl&ah*4l3gR)_4oW)`Y9I;X7;SuyZ-$jKXJv+eV5B-9oUwB zawn7FPE)n|g5$xze{GN9m|VQm`P|d!bAmiu*NYav2@7C+e&^<;(wQdDi$tugpYJd` zF!jP~uKj1YDyJQpQ2fol^|a;kM`0&6J&n0Bhr9CJ)J+$j%WP5qbnD#CrA2)Ao8QjS zX1jIlZ@UOH_Z!2sbBTHX=6v3Np0nv>V z@*%9hWuwAG&MimzBJQ7OSC572 zEeqsQ;Jcr3rOm{yEW1O-CiBS@-&4ozlA@pd5k1rXyf3EwjH}d6F7Br4ESXE&dfaE6 r2wld{!5QVXLhGF&%SF+(Gs6E(Z`yT@>)4q+MpyWMePf=wHOBw|{+l}l literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/nether_outpost.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/nether_outpost.mts deleted file mode 100644 index 7fba741bffc627745bed98dad8e688552a64664e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1392 zcmeYb3HD`RVc=!pXW*?z1q@OQ%!!#r49dC5Iq}6MKxVNOn2OI!Ey+kNicc!aOwNwa zFD*$eVvxnFh(QV@U7nbeQ*2d~ngY=e(Qe2f4w8ciSs|N@N0TWYITMIm(o*x1Q;Sgy zj0cMm@=s=79?(Cy9c;uPjpSgUZ%~4RK?F%MJtx1sxFkO>l|cq13Jb%W#3WQbC?Sk4 z8=sP2nv|1@VsLSODbTpYyc7lrBK~+0%0(SVRt3OD2NMC(u5HtQDDkgGDw1qO3F!0&IX696*wqL@{5u) z@Wh!##hkYhy^|Iz@bq2T{cdgC_U*S{-Mjqh)p0E^j?SiAr|w9#@jYz*BP7FBaKTB- zVP^b(aoM6Kp}GnGio@bK(=Qb}iM%vC@mN>mL91ijnLql9r!M_j!1`e77bC%ylfGTi z`4oL8c+t7nJ3CHDH-~83$WB;4WBQS8ljgJ;oHLqheR4+J*%+y!)QQ@=pJ#0n@G9Oc z5jbz&z3`(7tDLW<{qqoGxU{%Q=F18B2cEOucb*QM$s085&4tg;K7770WhJ}kt>4T! zr#FgawS=VjZ~dfF^gQ=fPhK#0sFQBU{RLu&K3`K7m+qZcpj#slna{trmFsEawI&m` z9fC7Y`~8_#p3k?{LEGZ#?hDTsn7v)Wx>M|(^sO?}-v4?I-&t>e-n}7Q_kp?a+E%Lx zV&S(-6BzG4zRq;)+SNm!zBeUJ@N${^6sv6@bpW-C$^`1J# z7eA#}a;wg#Ot<+ui*|jJy??I0Rm1x;``U$T|GS@>x`plb7jfgD9ej+DhPRY+j6O1K zRdKU+OFp7iQk|0K=D&qoiZ=o%V7+9vM3U?Gj9$seFFKE9W}IP?TAN;QMWBD$%ZyC^ zlZUQs+VE@|Yutow!D4qdF52emnY^i?p3$2pX@gRSyVxDADXitGAN1DnPd)x4@<6=W z>Z*U6oI7^EQQIs~{ae`W)?*?2lP(_JdnX<^eZ^$){L?PGCm2qge4=u)_1(OL+qL%6 zIng_+zc9S}{ZrtAW@2vlvGc_XCES-^Y*9PP;KyKdnR#ARfA@K3yGRcsh21(|W>tH) zy^xQrF#F3NxnX{5?B)vzZl0?jy|}Wq!t12d Date: Sun, 23 Oct 2022 22:14:52 +0200 Subject: [PATCH 05/39] Add nether bulwark --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 86 +++++++++++++++++- .../mcl_nether_fortresses_nether_bulwark.mts | Bin 0 -> 2895 bytes 2 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark.mts diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 996560783..a250b7fbd 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -1,10 +1,12 @@ local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) local modpath = minetest.get_modpath(modname) +local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) mcl_structures.register_structure("nether_outpost",{ - place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil"}, - fill_ratio = 0.001, - chunk_probability = 600, + place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, + fill_ratio = 0.01, + chunk_probability = 900, flags = "all_floors", biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest","BasaltDelta"}, sidelen = 24, @@ -21,3 +23,81 @@ mcl_structures.register_structure("nether_outpost",{ mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) end }) +mcl_structures.register_structure("nether_bulwark",{ + place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, + fill_ratio = 0.01, + chunk_probability = 600, + flags = "all_floors", + biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest"}, + sidelen = 32, + solid_ground = true, + make_foundation = true, + y_min = mcl_vars.mg_lava_nether_max - 1, + y_max = mcl_vars.mg_nether_max - 30, + filenames = { + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark.mts" + }, + y_offset = 0, + construct_nodes = {"group:wall"}, + after_place = function(pos,def,pr) + if not peaceful then + local p1 = vector.offset(pos,-10,0,-10) + local p2 = vector.offset(pos,10,24,10) + local sp = minetest.find_nodes_in_area_under_air(p1,p2,{"mcl_blackstone:blackstone_brick_polished"}) + if sp and #sp > 0 then + for i=1,5 do + local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) + if pos then + minetest.add_entity(pos,"mobs_mc:piglin") + end + end + local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) + if pos then + minetest.add_entity(pos,"mobs_mc:piglin_brute") + end + end + end + end, + loot = { + ["mcl_chests:chest_small" ] ={ + { + stacks_min = 1, + stacks_max = 2, + items = { + --{ itemstring = "FIXME:spectral_arrow", weight = 1, amount_min = 10, amount_max=28 }, + { itemstring = "mcl_blackstone:blackstone_gilded", weight = 1, amount_min = 8, amount_max=12 }, + { itemstring = "mcl_core:iron_ingot", weight = 1, amount_min = 4, amount_max=9 }, + { itemstring = "mcl_core:gold_ingot", weight = 1, amount_min = 4, amount_max=9 }, + { itemstring = "mcl_core:crying_obsidian", weight = 1, amount_min = 3, amount_max=8 }, + { itemstring = "mcl_bows:crossbow", weight = 1, func = function(stack, pr) + mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) + end }, + { itemstring = "mcl_core:goldblock", weight = 1, }, + { itemstring = "mcl_tools:sword_gold", weight = 1, }, + { itemstring = "mcl_tools:axe_gold", weight = 1, func = function(stack, pr)mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:helmet_gold", weight = 1, func = function(stack, pr)mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:chestplate_gold", weight = 1, func = function(stack, pr)mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:leggings_gold", weight = 1, func = function(stack, pr)mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:boots_gold", weight = 1, func = function(stack, pr)mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + } + }, + { + stacks_min = 2, + stacks_max = 4, + items = { + { itemstring = "mcl_bows:arrow", weight = 4, amount_min = 5, amount_max=17 }, + { itemstring = "mcl_mobitems:string", weight = 4, amount_min = 1, amount_max=6 }, + { itemstring = "mcl_core:iron_nugget", weight = 1, amount_min = 2, amount_max = 6 }, + { itemstring = "mcl_core:gold_nugget", weight = 1, amount_min = 2, amount_max = 6 }, + { itemstring = "mcl_mobitems:leather", weight = 1, amount_min = 1, amount_max = 3 }, + } + }, + { + stacks_min = 1, + stacks_max = 1, + items = { + { itemstring = "mcl_compass:lodestone" }, + } + }} + }, +}) diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark.mts new file mode 100644 index 0000000000000000000000000000000000000000..edf8608d4296fec6771b77c5faafab4084f9066e GIT binary patch literal 2895 zcmb7@dmz($AIH~Cic+*tA)#53+ljWBbxw6ES{9Y+#GaYO*d_b9&Dzw_RYgwgAhJhd z84g`sqUMpBat)PRk`^mFGa6gW?4jp$lEZnPXa9Wn`~KeF&*$}if4)ETUQaY=E(i=V z0D+@s_<`1f=HQ4lkTDrg!upbM_#hyJN+G}jYA6XCLZ#sYu;Dlo31mC*9tati0`Skv zBr(>PM#KkUk5WlQAb{Y9rG|zOXrOif`w5WQWGxBjJGuCmvLMSTh+k=^0Q_IDL<(gb z)_O9)gv-eU_y8h6AdMUQ6UB5wPQp>feNx8rn8@mnCoG;oBoQh8Al+{y_y8P{0)kHN zGR5Y%8G_bNNWVISfBlR7E6(x>F+P9*gaGi*3l<TmHQ!xzW!} z&=J~NLJ`XmistzS(bm-uk1sM99I->T$6P|49Q8K6-evDV&U>=er?kebI}LDr1r=&y zQ-j|PRyG{k0k;ekCD8U)?Q$;c+U_RAxu!$VEid&A@tLFqvqQTRfBC@(oo3a3^xU(1 zo`U|T2$f8;`_kBR*vdY(-LkgJyJ71yo)ZlnHyUT|@Q%lMUe0HS0yntQgLR+S9$dQz zg`TOUBK^(78Se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Uw_SL$^5; zFMCw>h8OgvUbf0sjJ%?2nr%=aP%9tRIJzGJl8n2C_-4$wLR zSefjcA?t!(o4XN(N`Rc&8xd(bT5_RktLdOyJh7&vu_#;dlUBhduCC3^9`UWD<>#N$ z7wi*MoF7c)K+FOPxMdrf&~+`ti+y9Y@L*-Jj*S Zyw52&^Wt%nm%jiH^ygKoHI^y_{{|qKPXzz~ literal 0 HcmV?d00001 From f76e0628e42b5962de4fb1f6e52d63969cf6d7bc Mon Sep 17 00:00:00 2001 From: cora Date: Mon, 24 Oct 2022 07:07:56 +0200 Subject: [PATCH 06/39] initial daughter structure support --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 4 +- ...r_fortresses_nether_bulwark_interior_1.mts | Bin 0 -> 408 bytes mods/MAPGEN/mcl_structures/api.lua | 50 +++++++++++++++--- 3 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index a250b7fbd..4375089ee 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -19,7 +19,6 @@ mcl_structures.register_structure("nether_outpost",{ after_place = function(pos) local sp = minetest.find_nodes_in_area(pos,vector.offset(pos,0,20,0),{"mcl_mobspawners:spawner"}) if not sp[1] then return end - table.shuffle(sp) mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) end }) @@ -37,6 +36,9 @@ mcl_structures.register_structure("nether_bulwark",{ filenames = { modpath.."/schematics/mcl_nether_fortresses_nether_bulwark.mts" }, + daughters = { + [modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts"] = vector.new(5,0,5), + }, y_offset = 0, construct_nodes = {"group:wall"}, after_place = function(pos,def,pr) diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts new file mode 100644 index 0000000000000000000000000000000000000000..a4fb24f282751b590b02c38a98e9682df2ef686d GIT binary patch literal 408 zcmeYb3HD`RVc=vCWZd_jIrW^qPp z3IlUuW)XunZso}tnZ>C&sVN8@GU$pEixYE7;)`?h^Gh-q#6Ysi8L7o3#a3VnD3O?x z!ypb4Psz_ODz?fj%FhEc@v(#FQGWjJn_ccrd+QUoJvz8Q*u;NL z`}z0#beim>_uA}ge_Z(Klvd}1^KSb7uk_TWTCYAaX>a#6u8X#FHb(V7vsqbOJaNkM oeNF}E-8dAVNH4Nib@F+5x%+-$*2aIq9t=gt7u;a{7_@OA00%0pfB*mh literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 6611d17f4..d1be83015 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -1,5 +1,11 @@ mcl_structures.registered_structures = {} - +local rotations = { + "0", + "90", + "180", + "270" +} +local place_queue = {} local disabled_structures = minetest.settings:get("mcl_disabled_structures") if disabled_structures then disabled_structures = disabled_structures:split(",") else disabled_structures = {} end @@ -206,7 +212,19 @@ local function foundation(ground_p1,ground_p2,pos,sidelen) minetest.bulk_set_node(stone,{name=node_stone}) end -function mcl_structures.place_structure(pos, def, pr, blockseed,rot) +local function process_queue() + if #place_queue < 1 then return end + local s = table.remove(place_queue) + mcl_structures.place_schematic(s.pos, s.file, s.rot, nil, true, "place_center_x,place_center_z",function(s) + if s.after_place then + s.after_place(s.pos,s.def,s.pr) + end + end,s.pr) + minetest.after(0.5,process_queue) +end + + +function mcl_structures.place_structure(pos, def, pr, blockseed) if not def then return end if not rot then rot = "random" end local log_enabled = logging and not def.terrain_feature @@ -244,13 +262,31 @@ function mcl_structures.place_structure(pos, def, pr, blockseed,rot) local r = pr:next(1,#def.filenames) local file = def.filenames[r] if file then + local rot = rotations[pr:next(1,#rotations)] local ap = function(pos,def,pr,blockseed) end - if def.after_place then ap = def.after_place end - mcl_structures.place_schematic(pp, file, rot, def.replacements, true, "place_center_x,place_center_z",function(p1, p2, size, rotation) - if def.loot then generate_loot(pp,def,pr,blockseed) end - if def.construct_nodes then construct_nodes(pp,def,pr,blockseed) end - return ap(pp,def,pr,blockseed,p1,p2,size,rotation) + if def.daughters then + for fn,p in pairs(def.daughters) do + local p = vector.add(pp,p) + ap = function(pos,def,pr,blockseed) + mcl_structures.place_schematic(pos, fn, rot, nil, true, "place_center_x,place_center_z",function() + if def.loot then generate_loot(pp,def,pr,blockseed) end + if def.construct_nodes then construct_nodes(pp,def,pr,blockseed) end + if def.after_place then + def.after_place(pos,def,pr) + end + --ap(pos,def,pr,blockseed) + end,pr) + end + end + elseif def.after_place then ap = def.after_place + end + mcl_structures.place_schematic(pp, file, rot, def.replacements, true, "place_center_x,place_center_z",function(p1, p2, size, rotation) + if not def.daughters then + if def.loot then generate_loot(pp,def,pr,blockseed) end + if def.construct_nodes then construct_nodes(pp,def,pr,blockseed) end + return ap(pp,def,pr,blockseed,p1,p2,size,rotation) + end end,pr) if log_enabled then minetest.log("action","[mcl_structures] "..def.name.." placed at "..minetest.pos_to_string(pp)) From 302b18833a0a1a439c88f2ca397eb1b3ad968ad1 Mon Sep 17 00:00:00 2001 From: cora Date: Wed, 26 Oct 2022 04:05:24 +0200 Subject: [PATCH 07/39] Add variable interior for nether bulwark --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 11 +++++++++-- ...ther_fortresses_nether_bulwark_interior_2.mts | Bin 0 -> 1170 bytes ...ther_fortresses_nether_bulwark_interior_3.mts | Bin 0 -> 757 bytes ...ther_fortresses_nether_bulwark_interior_4.mts | Bin 0 -> 882 bytes mods/MAPGEN/mcl_structures/api.lua | 7 +++---- 5 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_2.mts create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_3.mts create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_4.mts diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 4375089ee..57d9dbd8d 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -36,8 +36,15 @@ mcl_structures.register_structure("nether_bulwark",{ filenames = { modpath.."/schematics/mcl_nether_fortresses_nether_bulwark.mts" }, - daughters = { - [modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts"] = vector.new(5,0,5), + daughters = {{ + files = { + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_2.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_3.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_4.mts", + }, + pos = vector.new(5,0,5), + }, }, y_offset = 0, construct_nodes = {"group:wall"}, diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_2.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_2.mts new file mode 100644 index 0000000000000000000000000000000000000000..b73a5a59045f9c7b369c900114c32336099b7f1f GIT binary patch literal 1170 zcmeYb3HD`RVc=vCX5g&H1PlTU8o9|i@ku#}$=Ssv`FW{U2xfdzQD$;>d_jIrW^qPp z3IlUuW)XuZy7I*0#GDcaEs$_=2~b6`6_`RY65Sk0bR*!FGsvJzflZGu&dtv+$zae% zmxXJLPtM3JPR&V8LAX{I*+n^tNw^&pUy@(Iph>iH1~HJ*V)4Gl+x4Qu6bGL7iEYp9f~f zC&e3LmnZ>Bs36-5iX`N~fW>dcoVQ`OgIWxDcyDv-togO*@$+A=FJb|l%=V8TD zu*}on&q>o^i(+5O^gm(8mU4ThU1L0J5mq@<&FLqPX-7{ylD z-LD+pRlIld(G?Rke@(x-C!jRCcgwpu?iu}> z)M6*KgX$r!-y?2F>fE{3s2!AYisLD-Pw@QojL@GGYP@Qlk8NuE^!xU@mD%r{tNbrk z^KjS(TsBxx=5#2phgm7}|B^zVxxywalRO<(aIMfk+x=eP_pEL1uLN&u|F+w*toTiD z_OXk>O3AJ%zM1R$Tp}9$EIoqY>Q~X!TKHY4u!LP5Bv-(u^ z;*zVufBXvXF`Z|c`Cw_8VlVU6#r=*eMY5Lu{Bm3~oB85_?!P~76zKT9zwb4Vaa(n1 z7)O@Vd4|NlD>n;&d63RI&$VJR*F;HCyA`gFnoBK%6#d`ryS)5;%=Ql1H%|B54}4B^ zT9!YLKf0#r?jx=jtUn)d9Md$8s(g8Q)3aoT^Q$FRJ74X;>}UOU%jJKoP3uzrhSf*C z_nmU1nz?!cZ?F26>-Uu}CF-`-t4eLXR@r|0bzbY=+^y|vezUIDEztkvzb0>+eBW#( wlZ>u%&-cC(R}SCa$Z+bv;kMPUmZpDX{_Vi?_d!eD6_e|C`#%fsm*Z3h01bHx#{d8T literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_3.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_3.mts new file mode 100644 index 0000000000000000000000000000000000000000..0a4c054254075f04b8392e100db5364b6e180251 GIT binary patch literal 757 zcmeYb3HD`RVc=vCX5g&H1Pt5^8o9|i@ku#}$=Ssv`FW{U2xfdzQD$;>d_jIrW^qPp z3IlUuW)XuJNO^KbYH>-i6_|=I&P~k8VbI2HOmaqMacWL#3c@5Abj69qi8&=elk)RR zG8iP$W#Nuv5Ji^)Yh=&@2^W_D-B)Y{rjR^@?h7e2Bl1#9GE$4;)AMsu7=%D_$@xX8 zRv>OtPJVJWg9<*gVPR7-=WRrGaf<>^49k}5@Bi-o`#LmRh4HZDyTJ5QY3JBaOj@I8 z!7fs;`r^(siyhN+%DfkwE<1Q+^6{&WCK`WckZb(AWYtBJ`iTBI>+Q!Ll&{+m`~OzP zGtL>$I8tKDyl+`N^soKaz`razd!3r>p_eM3(s@v(BNAB<(1R86pE*cbk1x$y*I{w{u{Y9?*#gD*IPfz3~s7e zQ|&Xi{rc7F`%LH8t>){0yYrU$$;CErS51zl literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_4.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_4.mts new file mode 100644 index 0000000000000000000000000000000000000000..d7e23f0278fb2b5b1765efc93ef726f9efa49c7a GIT binary patch literal 882 zcmeYb3HD`RVc=vCX5g&H1Pr_k8o9|i@ku#}$=Ssv`FW{U2xfdzQD$;>d_jIrW^qPp z3WFq0l?=>@nMDlRIOXG$Gct=)b5c_fhRL8SPApE$DTy!6&Cf5%U=RYyCg&HWTBYab zq$K6!CucK=V$}f=1}n`;EK7_}%gHa#%u8nwftvspF3vA4N={`E1B+&)7MB!TC4(rS zg^4*i4B{a1l>GdnVyn!e{5&u-J}KT1yF>|4LItFwxCH3$Vk%Z-({>sS3DAXGC_NJxjmZ@%>_VW#uST-(PEi3PCcXfrQQFy$}s+rPD zkEs6K6=;=RBJ=#=qn6^QD|GpLAMZJ~z2=w{?<)4B!yFE7Or6ZGb1qi7)yw>yIQ#FU zv-ZKI>GPI)J^m7?``E+3B;v-S6O~^kWO#HIR4F{ZHEXqrA9twU@h$4Vt@!lygZ93yhi>hkUe#@~Oy%~swW}vR$?^;pS{AhB+SQVCzixAV{=0Qo)z^Ph zvOeq(Jn?f!jOmhfR#M9%icfCYw(gIf%F>U!Rt-e#L!7^JtF Hzr0fbh$EME literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index d1be83015..efbe3ccb1 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -266,16 +266,15 @@ function mcl_structures.place_structure(pos, def, pr, blockseed) local ap = function(pos,def,pr,blockseed) end if def.daughters then - for fn,p in pairs(def.daughters) do - local p = vector.add(pp,p) + for _,d in pairs(def.daughters) do + local p = vector.add(pp,d.pos) ap = function(pos,def,pr,blockseed) - mcl_structures.place_schematic(pos, fn, rot, nil, true, "place_center_x,place_center_z",function() + mcl_structures.place_schematic(pos, d.files[pr:next(1,#d.files)], rot, nil, true, "place_center_x,place_center_z",function() if def.loot then generate_loot(pp,def,pr,blockseed) end if def.construct_nodes then construct_nodes(pp,def,pr,blockseed) end if def.after_place then def.after_place(pos,def,pr) end - --ap(pos,def,pr,blockseed) end,pr) end end From 98dad0b191244b4dddedfc638a50f09869f5c88f Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 27 Oct 2022 19:34:58 +0200 Subject: [PATCH 08/39] Generate netherrack under the bedrock ceiling this is a somewhat ugly hack that uses minetest.generate_decorations which generates decorations regardless of biome so additional steps had to be taken to ensure no other decorations "spill over" due to this. --- mods/CORE/mcl_init/init.lua | 1 + mods/MAPGEN/mcl_biomes/init.lua | 33 +++++++++++++++++++++------- mods/MAPGEN/mcl_mapgen_core/api.lua | 10 ++++++--- mods/MAPGEN/mcl_mapgen_core/init.lua | 7 ++++-- 4 files changed, 38 insertions(+), 13 deletions(-) diff --git a/mods/CORE/mcl_init/init.lua b/mods/CORE/mcl_init/init.lua index 6773949b7..3acce957f 100644 --- a/mods/CORE/mcl_init/init.lua +++ b/mods/CORE/mcl_init/init.lua @@ -138,6 +138,7 @@ mcl_vars.mg_nether_min = -29067 -- Carefully chosen to be at a mapchunk border mcl_vars.mg_nether_max = mcl_vars.mg_nether_min + 128 mcl_vars.mg_bedrock_nether_bottom_min = mcl_vars.mg_nether_min mcl_vars.mg_bedrock_nether_top_max = mcl_vars.mg_nether_max +mcl_vars.mg_nether_deco_max = mcl_vars.mg_nether_max -11 -- this is so ceiling decorations don't spill into other biomes as bedrock generation calls minetest.generate_decorations to put netherrack under the bedrock if not superflat then mcl_vars.mg_bedrock_nether_bottom_max = mcl_vars.mg_bedrock_nether_bottom_min + 4 mcl_vars.mg_bedrock_nether_top_min = mcl_vars.mg_bedrock_nether_top_max - 4 diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 8da0caa3d..789c4cc81 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1531,6 +1531,23 @@ local function register_dimension_biomes() --[[ REALMS ]] --[[ THE NETHER ]] + -- the following decoration is a hack to cover exposed bedrock in netherrack - be careful not to put any ceiling decorations in a way that would apply to this (they would get generated regardless of biome) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"mcl_core:bedrock"}, + sidelen = 16, + fill_ratio = 10, + biomes = { "Nether" }, + y_min = mcl_vars.mg_lava_nether_max, + y_max = mcl_vars.mg_nether_max + 15, + height = 6, + max_height = 10, + decoration = "mcl_nether:netherrack", + flags = "all_ceilings", + param2 = 0, + }) + + minetest.register_biome({ name = "Nether", node_filler = "mcl_nether:netherrack", @@ -1554,7 +1571,7 @@ local function register_dimension_biomes() fill_ratio = 10, biomes = { "Nether" }, y_min = -31000, - y_max = mcl_vars.mg_nether_max, + y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_nether:netherrack", flags = "all_floors", param2 = 0, @@ -1583,7 +1600,7 @@ local function register_dimension_biomes() fill_ratio = 10, biomes = { "SoulsandValley" }, y_min = -31000, - y_max = mcl_vars.mg_nether_max, + y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_blackstone:soul_soil", flags = "all_floors, all_ceilings", param2 = 0, @@ -1598,7 +1615,7 @@ local function register_dimension_biomes() clust_size = 15, biomes = { "SoulsandValley" }, y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max + 80, + y_max = mcl_vars.mg_nether_deco_max, noise_params = { offset = 0, scale = 1, @@ -1633,7 +1650,7 @@ local function register_dimension_biomes() fill_ratio = 10, biomes = { "CrimsonForest" }, y_min = -31000, - y_max = mcl_vars.mg_nether_max, + y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_crimson:crimson_nylium", flags = "all_floors", param2 = 0, @@ -1660,7 +1677,7 @@ local function register_dimension_biomes() fill_ratio = 10, biomes = { "WarpedForest" }, y_min = -31000, - y_max = mcl_vars.mg_nether_max, + y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_crimson:warped_nylium", flags = "all_floors", param2 = 0, @@ -1688,7 +1705,7 @@ local function register_dimension_biomes() fill_ratio = 10, biomes = { "BasaltDelta" }, y_min = -31000, - y_max = mcl_vars.mg_nether_max, + y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_blackstone:basalt", flags = "all_floors", param2 = 0, @@ -1703,7 +1720,7 @@ local function register_dimension_biomes() clust_size = 20, biomes = { "BasaltDelta" }, y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max + 80, + y_max = mcl_vars.mg_nether_deco_max, noise_params = { offset = 0, scale = 1, @@ -4903,7 +4920,7 @@ local function register_dimension_decorations() fill_ratio = 0.063, biomes = {"CrimsonForest"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max -5, + y_max = mcl_vars.mg_nether_deco_max, flags = "all_ceilings", height = 2, height_max = 8, diff --git a/mods/MAPGEN/mcl_mapgen_core/api.lua b/mods/MAPGEN/mcl_mapgen_core/api.lua index 7e05afe12..356950851 100644 --- a/mods/MAPGEN/mcl_mapgen_core/api.lua +++ b/mods/MAPGEN/mcl_mapgen_core/api.lua @@ -15,7 +15,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed) local t1 = os.clock() local p1, p2 = {x=minp.x, y=minp.y, z=minp.z}, {x=maxp.x, y=maxp.y, z=maxp.z} if lvm > 0 then - local lvm_used, shadow, deco_used = false, false, false + local lvm_used, shadow, deco_used, deco_table = false, false, false, false local lb2 = {} -- param2 local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") local e1, e2 = {x=emin.x, y=emin.y, z=emin.z}, {x=emax.x, y=emax.y, z=emax.z} @@ -35,7 +35,9 @@ minetest.register_on_generated(function(minp, maxp, blockseed) if shadow0 then shadow = true end - if deco then + if deco and type(deco) == "table" then + deco_table = deco + elseif deco then deco_used = true end end @@ -47,7 +49,9 @@ minetest.register_on_generated(function(minp, maxp, blockseed) if param2 > 0 then vm:set_param2_data(data2) end - if deco_used then + if deco_table then + minetest.generate_decorations(vm,vector.new(minp.x,deco_table.min,minp.z),vector.new(maxp.x,deco_table.max,maxp.z)) + elseif deco_used then minetest.generate_decorations(vm) end vm:calc_lighting(p1, p2, shadow) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 724c576a9..ba1f053c9 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -325,8 +325,11 @@ local function world_structure(vm, data, data2, emin, emax, area, minp, maxp, bl lvm_used = set_layers(data, area, c_nether_lava, c_air, mcl_vars.mg_nether_min, mcl_vars.mg_lava_nether_max, minp, maxp, lvm_used, pr) end end - - return lvm_used, lvm_used + local deco = false + if minp.y > mcl_vars.mg_nether_deco_max - 64 and maxp.y < mcl_vars.mg_nether_max + 128 then + deco = {min=mcl_vars.mg_nether_deco_max,max=mcl_vars.mg_nether_max} + end + return lvm_used, lvm_used, deco end local function block_fixes(vm, data, data2, emin, emax, area, minp, maxp, blockseed) From 768345a91c3ebd038ef90fff60177117be34b9cd Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 27 Oct 2022 19:52:32 +0200 Subject: [PATCH 09/39] Fix top node and magma patches in nether wastes --- mods/MAPGEN/mcl_biomes/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 789c4cc81..f9318b59b 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1552,6 +1552,7 @@ local function register_dimension_biomes() name = "Nether", node_filler = "mcl_nether:netherrack", node_stone = "mcl_nether:netherrack", + node_top = "mcl_nether:netherrack", node_water = "air", node_river_water = "air", node_cave_liquid = "air", @@ -1566,7 +1567,7 @@ local function register_dimension_biomes() minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand"}, + place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:glowstone","mcl_nether:magma"}, sidelen = 16, fill_ratio = 10, biomes = { "Nether" }, From 4ad1abde1479ecfd60ffcee07ec69eda8a4cdd55 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 27 Oct 2022 23:00:15 +0200 Subject: [PATCH 10/39] Fix basalt pillar artifacts above the nether roof --- mods/MAPGEN/mcl_biomes/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index f9318b59b..d0f30d6c4 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -5018,6 +5018,7 @@ local function register_dimension_decorations() }, biomes = {"BasaltDelta"}, y_min = mcl_vars.mg_lava_nether_max + 1, + y_max = mcl_vars.mg_nether_deco_max - 50, flags = "all_floors, all ceilings", }) minetest.register_decoration({ @@ -5038,6 +5039,7 @@ local function register_dimension_decorations() }, biomes = {"BasaltDelta"}, y_min = mcl_vars.mg_lava_nether_max + 1, + y_max = mcl_vars.mg_nether_deco_max - 15, flags = "all_floors, all ceilings", }) minetest.register_decoration({ From 62f353d54f7a34aef76fad338ca151b81ceb0a52 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 28 Oct 2022 00:07:23 +0200 Subject: [PATCH 11/39] Spawn hoglins in stable bullwarks --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 57d9dbd8d..3595719ad 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -22,13 +22,26 @@ mcl_structures.register_structure("nether_outpost",{ mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) end }) + +local function spawn_mobs(mob,spawnon,p1,p2,pr,n) + n = n or 1 + local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) + if sp and #sp > 0 then + for i=1,n do + local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) + if pos then + minetest.add_entity(pos,mob) + end + end + end +end mcl_structures.register_structure("nether_bulwark",{ place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, fill_ratio = 0.01, chunk_probability = 600, flags = "all_floors", biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest"}, - sidelen = 32, + sidelen = 36, solid_ground = true, make_foundation = true, y_min = mcl_vars.mg_lava_nether_max - 1, @@ -50,21 +63,11 @@ mcl_structures.register_structure("nether_bulwark",{ construct_nodes = {"group:wall"}, after_place = function(pos,def,pr) if not peaceful then - local p1 = vector.offset(pos,-10,0,-10) - local p2 = vector.offset(pos,10,24,10) - local sp = minetest.find_nodes_in_area_under_air(p1,p2,{"mcl_blackstone:blackstone_brick_polished"}) - if sp and #sp > 0 then - for i=1,5 do - local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) - if pos then - minetest.add_entity(pos,"mobs_mc:piglin") - end - end - local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) - if pos then - minetest.add_entity(pos,"mobs_mc:piglin_brute") - end - end + local p1 = vector.offset(pos,-14,0,-14) + local p2 = vector.offset(pos,14,24,14) + spawn_mobs("mobs_mc:piglin",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr,5) + spawn_mobs("mobs_mc:piglin_brute",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr) + spawn_mobs("mobs_mc:hoglin",{"mcl_blackstone:nether_gold"},p1,p2,pr,4) end end, loot = { From 6bc12ec5ecca4177d583a23cfbda32516f609406 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 28 Oct 2022 01:02:48 +0200 Subject: [PATCH 12/39] mcl_structures Check if file exists before placing schematics --- mods/MAPGEN/mcl_biomes/init.lua | 1 - mods/MAPGEN/mcl_structures/api.lua | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index d0f30d6c4..b292b44a1 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1537,7 +1537,6 @@ local function register_dimension_biomes() place_on = {"mcl_core:bedrock"}, sidelen = 16, fill_ratio = 10, - biomes = { "Nether" }, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_max + 15, height = 6, diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index efbe3ccb1..719beebd8 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -32,6 +32,9 @@ local function ecb_place(blockpos, action, calls_remaining, param) end function mcl_structures.place_schematic(pos, schematic, rotation, replacements, force_placement, flags, after_placement_callback, pr, callback_param) + if not mcl_util.file_exists(schematic) then + minetest.log("warning","[mcl_structures] schematic file "..schematic.." does not exist.") + return end local s = loadstring(minetest.serialize_schematic(schematic, "lua", {lua_use_comments = false, lua_num_indent_spaces = 0}) .. " return schematic")() if s and s.size then local x, z = s.size.x, s.size.z From 8aedd6a76105a58bd02817ff6affcefdbc9a2300 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 28 Oct 2022 02:46:06 +0200 Subject: [PATCH 13/39] add nether bridge fragment --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 57 ++++++++++++------ .../mcl_nether_fortresses_nether_bridge_1.mts | Bin 0 -> 799 bytes 2 files changed, 39 insertions(+), 18 deletions(-) create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_1.mts diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 3595719ad..035aa788c 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -3,6 +3,21 @@ local S = minetest.get_translator(modname) local modpath = minetest.get_modpath(modname) local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) + +local function spawn_mobs(mob,spawnon,p1,p2,pr,n) + if peaceful then return end + n = n or 1 + local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) + if sp and #sp > 0 then + for i=1,n do + local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) + if pos then + minetest.add_entity(pos,mob) + end + end + end +end + mcl_structures.register_structure("nether_outpost",{ place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, fill_ratio = 0.01, @@ -23,18 +38,26 @@ mcl_structures.register_structure("nether_outpost",{ end }) -local function spawn_mobs(mob,spawnon,p1,p2,pr,n) - n = n or 1 - local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) - if sp and #sp > 0 then - for i=1,n do - local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) - if pos then - minetest.add_entity(pos,mob) - end - end +mcl_structures.register_structure("nether_bridge",{ + place_on = {"mcl_nether:nether_lava_source"}, + fill_ratio = 0.01, + chunk_probability = 100, + flags = "all_floors liquid_surface", + --biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest","BasaltDelta"}, + sidelen = 38, + solid_ground = false, + make_foundation = false, + y_min = mcl_vars.mg_lava_nether_max - 5, + y_max = mcl_vars.mg_lava_nether_max + 5, + filenames = { modpath.."/schematics/mcl_nether_fortresses_nether_bridge_1.mts" }, + y_offset = 0, + after_place = function(pos,def,pr) + local p1 = vector.offset(pos,-14,0,-14) + local p2 = vector.offset(pos,14,24,14) + spawn_mobs("mobs_mc:witherskeleton",{"mcl_blackstone:blackstone_chiseled_polished"},p1,p2,pr,5) end -end +}) + mcl_structures.register_structure("nether_bulwark",{ place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, fill_ratio = 0.01, @@ -62,13 +85,11 @@ mcl_structures.register_structure("nether_bulwark",{ y_offset = 0, construct_nodes = {"group:wall"}, after_place = function(pos,def,pr) - if not peaceful then - local p1 = vector.offset(pos,-14,0,-14) - local p2 = vector.offset(pos,14,24,14) - spawn_mobs("mobs_mc:piglin",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr,5) - spawn_mobs("mobs_mc:piglin_brute",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr) - spawn_mobs("mobs_mc:hoglin",{"mcl_blackstone:nether_gold"},p1,p2,pr,4) - end + local p1 = vector.offset(pos,-14,0,-14) + local p2 = vector.offset(pos,14,24,14) + spawn_mobs("mobs_mc:piglin",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr,5) + spawn_mobs("mobs_mc:piglin_brute",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr) + spawn_mobs("mobs_mc:hoglin",{"mcl_blackstone:nether_gold"},p1,p2,pr,4) end, loot = { ["mcl_chests:chest_small" ] ={ diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_1.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_1.mts new file mode 100644 index 0000000000000000000000000000000000000000..366d4f3e783e162c9067dfdb8c55d8c33dc6d5b5 GIT binary patch literal 799 zcmeYb3HD`RVc=#EVo<5a01TWA%!!#r46?b&Iq}6MKxVNOn2OI!Ey+kNicc!aOwMKy z2T4OjtWYGRktB*zQ&4qjgCvu35|guwOY-wltq{!k2ldG#fG z&gbIquPt^`U#l{QEb4-PPm$+R`1j{+V&Y{pEtaHfvKpbpN^WyVbfcX@3WQVF+i^)d%j3;@;_NEFzE;2bKwK(o&D`nndxGsguXmM-+P_1BQ`AuQ(uG~~1P!@m zFMX)m&hnmbx)kH35APd2mR#Gr`)EzbnOi${@4xT#Wbw0;+1tPUQ4*~=A7l0BpOclh z>9x#xVqP1{_gmbbEzf`q1pF^`B`eGiiE>!ImKOxvLw#)n|4MI__14LfuDT+e z-4?M;@b9lXj)%Q=m+f2ecnV9=i5bkEQq^Lg^UfB2J-0J- Date: Fri, 28 Oct 2022 00:44:06 +0000 Subject: [PATCH 14/39] Warped Fungus redo. Changed the colors and added in the old drips because they look pretty cool on it. Wanted it to match the surrounding color scheme more than the green and orange one. texture license: full usage under the standard MineClone2 texture license. Created by Michieal, based off of the Minecraft Warped Fungus. --- .../textures/farming_warped_fungus.png | Bin 172 -> 958 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/ITEMS/mcl_crimson/textures/farming_warped_fungus.png b/mods/ITEMS/mcl_crimson/textures/farming_warped_fungus.png index 5b465b6d19bc7968fdde59d78f16954fba229f9c..4fda7c4cb8efeab3ca1f45dec13c31331512d04a 100644 GIT binary patch delta 937 zcmV;a16KU30lo*2BYy#IX+uL$X=7sm04R}lkvmHRK@^2Q6UA2~g%%#vAM8+X?exp`A!c$pqnvGx6PSoG=DQ zKh?mA2G-M7R(MQ!IGZWzwezT(c#PcQg47|IK5Syl5ynq~A{%5V5R{se%$oZ`72iC0 z@#yk5DPf5tMSohn0a1(6)sUJL-H7bzD3`wYs1Ij-GF2O?EbG$Q^0K}Vt^aU{}Vap0h% z{(z$5$R8j&a3H8yai9a~11f?8rH@n^YtqD>TQ!7H&62U`wEW|1#Hu1!~Kcj zt*!@3K6!D^GU>0~Y(^yEY8|1Zg=b^ff=i4BvXSdI;4NQ4)bB$Ov%VaSt{)E$-VEL4F~f~Cm4kwRyI-5iwagT%Y?giB}s<lyv_PnMN)7T2|1Ew4)?)D7oXsgZ00000 LNkvXXu0mjf;kLr@ delta 145 zcmV;C0B--j2dn{*BYyyMNklC5T_U$IHsZTf4htf`34LP7XSc7B!1M{6el47015yANkvXXu0mjf26aIb From 1c6d1c958abfbad0b54452a420ee2715c15f1583 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 28 Oct 2022 03:56:05 +0200 Subject: [PATCH 15/39] Add more nether bridge variants --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 20 +++++++++++------- .../mcl_nether_fortresses_nether_bridge_1.mts | Bin 799 -> 1049 bytes .../mcl_nether_fortresses_nether_bridge_2.mts | Bin 0 -> 1060 bytes .../mcl_nether_fortresses_nether_bridge_3.mts | Bin 0 -> 744 bytes .../mcl_nether_fortresses_nether_bridge_4.mts | Bin 0 -> 745 bytes 5 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_2.mts create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_3.mts create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_4.mts diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 035aa788c..40d6d55d7 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -39,18 +39,22 @@ mcl_structures.register_structure("nether_outpost",{ }) mcl_structures.register_structure("nether_bridge",{ - place_on = {"mcl_nether:nether_lava_source"}, + place_on = {"mcl_nether:nether_lava_source","mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand","mcl_core:bedrock"}, fill_ratio = 0.01, chunk_probability = 100, - flags = "all_floors liquid_surface", - --biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest","BasaltDelta"}, + flags = "all_floors", sidelen = 38, solid_ground = false, make_foundation = false, - y_min = mcl_vars.mg_lava_nether_max - 5, - y_max = mcl_vars.mg_lava_nether_max + 5, - filenames = { modpath.."/schematics/mcl_nether_fortresses_nether_bridge_1.mts" }, - y_offset = 0, + y_min = mcl_vars.mg_nether_min - 4, + y_max = mcl_vars.mg_lava_nether_max - 20, + filenames = { + modpath.."/schematics/mcl_nether_fortresses_nether_bridge_1.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bridge_2.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bridge_3.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bridge_4.mts", + }, + y_offset = function(pr) return pr:next(15,20) end, after_place = function(pos,def,pr) local p1 = vector.offset(pos,-14,0,-14) local p2 = vector.offset(pos,14,24,14) @@ -61,7 +65,7 @@ mcl_structures.register_structure("nether_bridge",{ mcl_structures.register_structure("nether_bulwark",{ place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, fill_ratio = 0.01, - chunk_probability = 600, + chunk_probability = 900, flags = "all_floors", biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest"}, sidelen = 36, diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_1.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_1.mts index 366d4f3e783e162c9067dfdb8c55d8c33dc6d5b5..6923f6edb7df825ff92960889b0f0e55dcfc197b 100644 GIT binary patch delta 779 zcmV+m1N8i#2AK%3907k?!Y~X*!w~cVR35jlE)G~j*IRl`yBt4f$Oh}5EbC+pA4#d4llk(J+eT*M{%Ln*a-LN(7>zfLdLYF?eh9_n3s!3 zU1&xd)7GMO-i}rmwJ4D{sf(J>*9KqXDF3lSDP+x@KQpXH&B5{3X*nZx(H`7i*vC=Q zUzA72Q9UU2j8%W;7j|gzU3QksYp&D2&JaKE{)%Wlf7-^E=AEG~W_ZSWBGtv7{wx2p zcypg$d;y0iVsm(NpX&h&6?1s=pLcVp?tCvW@aBIHgd?N&-A7!HD*0^OZl`BR)}!3C z&D-(nq89Q!bMDChUvS6wjMZGHmAdFbYJc%rxn0>Py;Xk?3@=}B(~&uX3P;oNzLy9V zDuV4b1CB)W$VIrlkLGO-1wONSF5==F-Cmm+$i;J?(ueUgx0gC0TTnK+PsNI{xfk)C z4Hk{eRl(tcDR4!VKWk+(+nStwK;CocCzhHJnc{*%mny)b}xN^}zN@9CmX7yaejg4|khqI7_ErqZWX+b)WU6rj&-fJ2bg z(e?{tn@*7g>dhV3}Zco#6U>Y7}!PU z?Dytyd-Q+*N2zi4!IwF$8%G~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w|NV z$>rJ8d}V|+K~88_xHP3;+0%l6=&dmY90Dp@;&CxkuR7>u{0eBi5v&+37T#dcA zOW5S{Tm{$8MROznwq2X1+Hq~yypp3)33}C&eiVHxXcNtrUajKF$GW~TWo~uY>UVzP cT*B;IO$(R3)yvoNu&Qo)r~KW%(z*2u0DGqQhX4Qo literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_3.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_3.mts new file mode 100644 index 0000000000000000000000000000000000000000..e62e298fddb3cf22266422675b67c44a09a55492 GIT binary patch literal 744 zcmeYb3HD`RVc=#EVi2mw01TWA%!!#r46?b&Iq_+!dC958R(Yu<8L36_Nky5-*$^>^ zba4q#Ww8~Qibqz&AP&+E5kb+-AdMtZl$wI7OB*Dal#`g8U0jl%muiJz#wTZF7N_O_ zH5BCMWEN+nrZ7mNDK5@0&519`FG|i}Py|V#I1a-qL68!#YM}qXbj6&vGrG%~6?ob< z?keNIu(kj6>hq6US2*%CshQnB7a^8&cD}@ugr1-|S_#^fI|SFQW!~oWwCz?!UH0WI z`|bbU|C&A3G$Zo(o?}-Rlx_X+Lh7pH>HNJLoZ^`GeBj%spH#j(zhj>L@n_SY?RAQO z6EA=2Y5D5!Zm+skr*`j|^>=yPuJ0G0?Psk0__K1yP0fFkgWvs~dRglFE8h=hwY-1q zUKuA<@~;h+35hxUIy-RomZ*Xk@BYReKJfbbigo%cvPJxt?AzULn|odGOZj$}qBlDY z^82`c?)%_z`|`9$H+I#=$4^nZF4^(TRr5u9^I^NJzfr2<3%L@XZ@DF&KH=BCAG$K( ziaHXi4enY_tQBzz@x-f*F+2pQ_z{V9v8H0o#^Uge)Em$j;@lk16 z?-y5lcD>}Rs0Y%<%x~fh(~C8eqIks|--QSMt2Ees_J;6O!PmlD4A$;nE4y4nEr4O) zcLt`WfXRowycGj)XKr1v!BJp!lnZC+w1%h$G0vvhRh3cGdssxNC{ Qx^KYmXaCqa@49*e00_rWVgLXD literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_4.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bridge_4.mts new file mode 100644 index 0000000000000000000000000000000000000000..6b66ac6a0251bad083444734ec07642f7e35f889 GIT binary patch literal 745 zcmeYb3HD`RVc=#EVi2mw01O-q%!!#r46?b&Iq_+!dC958R(Yu<8L36_Nky5-*$^>^ zba4q#Ww8~Qibqz&AP&+E5kb+-AdMtZl$wI7OB*Dal#`g8U0jl%muiJz#wTZF7N_O_ zH5BCMWEN+nrZ7mNDK5@0&519`FG|i}Py|V#I1b&aiaBp*beA&MdA*JIOD<+?ald-{`>c&@!SOuqA@{O%&#i6^ zyPc)DaQFA>sSNM8xcN?fxIR$GviN=2lJeJE!zwf0|0|O}->O_!9C%M)PJFnC?}2^B zbILuY1>C*%TglE_D_iC>U&_y$fxjPVY&%;jd^1%mbHTNJ0lHc7bNV^o__=;%jnQr3 zTx;H~aiGsbzvKb8$|KKmUsdg{hPWAQIp3b=2qeoqxaYIz-ULf=<*8p@)I4~p>a!p_ zQS`u%j-N&g)fDc}k(_eeFi9Zim!nR$lGBra8kf$qZ@n#(x6NpAA9GHVjqsb~M7yW! zW@g7#&pxU*X`X|_l9zS-Hk0?fKe{G^A-$xZ)%Br}zL?~Mn6OQK(oq#6a;Ywfn#x@^ zm2tWW*8V1GZh4o?U)6qpJpZxnL)+WFpH5dY#dhzhI3ISeFl0%=qn@gzdw! Date: Fri, 28 Oct 2022 06:31:56 +0200 Subject: [PATCH 16/39] enforce cavern setting for nether generation people unticking the "caverns" box probably do not expect that this only applies to nether "terrain" --- mods/MAPGEN/mcl_mapgen_core/init.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index ba1f053c9..569352012 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -106,16 +106,23 @@ end if mg_name == "v7" then minetest.set_mapgen_setting("mgv7_cavern_threshold", "0.20", true) + mg_flags.caverns = true elseif mg_name == "valleys" then minetest.set_mapgen_setting("mgvalleys_cavern_threshold", "0.20", true) + mg_flags.caverns = true elseif mg_name == "carpathian" then minetest.set_mapgen_setting("mgcarpathian_cavern_threshold", "0.20", true) + mg_flags.caverns = true elseif mg_name == "v5" then minetest.set_mapgen_setting("mgv5_cavern_threshold", "0.20", true) + mg_flags.caverns = true elseif mg_name == "fractal" then minetest.set_mapgen_setting("mgfractal_cavern_threshold", "0.20", true) + mg_flags.caverns = true end + + local mg_flags_str = "" for k,v in pairs(mg_flags) do if v == false then From 6b8236e8f3ece5f2b24ba741fc2f4ce26e7d0fb1 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 28 Oct 2022 13:34:58 +0200 Subject: [PATCH 17/39] Fix crash in villagegen --- mods/CORE/mcl_util/init.lua | 1 + mods/MAPGEN/mcl_structures/api.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 58285039a..0972e5019 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -23,6 +23,7 @@ function table.update_nil(t, ...) end function mcl_util.file_exists(name) + if type(name) ~= "string" then return end local f = io.open(name) if not f then return false diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 719beebd8..6a7fc2c39 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -32,8 +32,8 @@ local function ecb_place(blockpos, action, calls_remaining, param) end function mcl_structures.place_schematic(pos, schematic, rotation, replacements, force_placement, flags, after_placement_callback, pr, callback_param) - if not mcl_util.file_exists(schematic) then - minetest.log("warning","[mcl_structures] schematic file "..schematic.." does not exist.") + if type(schematic) ~= "table" and not mcl_util.file_exists(schematic) then + minetest.log("warning","[mcl_structures] schematic file "..tostring(schematic).." does not exist.") return end local s = loadstring(minetest.serialize_schematic(schematic, "lua", {lua_use_comments = false, lua_num_indent_spaces = 0}) .. " return schematic")() if s and s.size then From eef4b52ce48f3dae46a04e630457d686e63fb808 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 28 Oct 2022 17:51:10 +0200 Subject: [PATCH 18/39] Remove "wild" nether wart, remove natural wither skelly spawning wither skellys spawn on bridges now, enough wart in outposts and bulwarks --- mods/ENTITIES/mobs_mc/skeleton_wither.lua | 3 ++- mods/MAPGEN/mcl_biomes/init.lua | 11 ----------- ...her_fortresses_nether_bulwark_interior_1.mts | Bin 408 -> 770 bytes 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/skeleton_wither.lua b/mods/ENTITIES/mobs_mc/skeleton_wither.lua index da25e368d..f3fd3aab5 100644 --- a/mods/ENTITIES/mobs_mc/skeleton_wither.lua +++ b/mods/ENTITIES/mobs_mc/skeleton_wither.lua @@ -99,6 +99,7 @@ mcl_mobs:register_mob("mobs_mc:witherskeleton", { }) --spawn +--[[] mcl_mobs:spawn_specific( "mobs_mc:witherskeleton", "nether", @@ -114,6 +115,6 @@ mcl_mobs:spawn_specific( 5, mcl_vars.mg_nether_min, mcl_vars.mg_nether_max) - +--]] -- spawn eggs mcl_mobs:register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "#141414", "#474d4d", 0) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index b292b44a1..55adb0b35 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -4760,17 +4760,6 @@ local function register_dimension_decorations() flags = "all_floors", decoration = "mcl_mushrooms:mushroom_red", }) - minetest.register_decoration({ - deco_type = "simple", - place_on = {"mcl_nether:soul_sand"}, - sidelen = 16, - fill_ratio = 0.0032, - biomes = {"Nether","SoulsandValley"}, - y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 1, - flags = "all_floors", - decoration = "mcl_nether:nether_wart", - }) -- WARPED FOREST minetest.register_decoration({ diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts index a4fb24f282751b590b02c38a98e9682df2ef686d..9c09c3edb52340e6dfd35a00c5e5284dff3b5348 100644 GIT binary patch delta 548 zcmbQi+{89Pj*)+&yg|K4ZgNh1UTR53YLQiOerZm8abjKygE*2XL^3|9C^I>mK>|~v zJh7-G-T9HR?2rZM)eMq^7yuY2Me)o2DLZkLMXSw_E6JEz~Sf`m(6# zYWkT^9I`X*llT2_ve|P<`n0jPU`L^5NAtRQmFHJiWEnsEwB?tv@=@36t`5G1SqGaX zrMauuoRweo_(*+6cUFBu|G~;>%L^-Ss2zLuEatJPsm;>K&rc-R@3yJjv*CH7@B3Sq z-WknezwjeV@ZCnvrN@hu?|weh@!l_^&-UOw@e6yHw?3F?IqjUpznG&>cWyhrEcM&; zt6R)2ZLU!0QN1I5+2Kc3POZN8x#T0oa>cv1Jh2I@Qeys5RssZb+?e0HYjUbR{QrGT z`~FRa+Y*IqG>)H3%yTJUBQk|$x61O$6~(o%K4ZWyk(C Pf3uvX^Ob+Sy z<8kuJDv99FMlVn5E+&;btH_eQi`EL!J)E&xkLEn7b90fDr@lgP&qfF# Date: Fri, 28 Oct 2022 21:02:45 +0200 Subject: [PATCH 19/39] Add wither rose --- mods/ITEMS/mcl_flowers/init.lua | 3 +++ mods/ITEMS/mcl_flowers/register.lua | 8 +++++++- .../textures/mcl_flowers_wither_rose.png | Bin 0 -> 6055 bytes 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_wither_rose.png diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 33ea531c5..d7b046cf5 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -51,6 +51,9 @@ local on_place_flower = mcl_util.generate_on_place_plant_function(function(pos, if (light_night and light_night >= 8) or (light_day and light_day >= minetest.LIGHT_MAX) then light_ok = true end + if itemstack:get_name() == "mcl_flowers:wither_rose" and ( minetest.get_item_group(soil_node.name, "grass_block") > 0 or soil_node.name == "mcl_core:dirt" or soil_node.name == "mcl_core:coarse_dirt" or soil_node.name == "mcl_mud:mud" or soil_node.name == "mcl_moss:moss" or soil_node.name == "mcl_nether:netherrack" or minetest.get_item_group(soil_node.name, "soul_block") > 0 ) then + return true,colorize + 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 return ok, colorize diff --git a/mods/ITEMS/mcl_flowers/register.lua b/mods/ITEMS/mcl_flowers/register.lua index b45f3e1ee..c1bd37878 100644 --- a/mods/ITEMS/mcl_flowers/register.lua +++ b/mods/ITEMS/mcl_flowers/register.lua @@ -59,4 +59,10 @@ mcl_flowers.register_simple_flower("blue_orchid", { image = "mcl_flowers_blue_orchid.png", selection_box = { -5/16, -0.5, -5/16, 5/16, 7/16, 5/16 }, potted = true, -}) \ No newline at end of file +}) +mcl_flowers.register_simple_flower("wither_rose", { + desc = S("Wither Rose"), + image = "mcl_flowers_wither_rose.png", + selection_box = { -3/16, -0.5, -3/16, 3/16, 6/16, 3/16 }, + potted = true, +}) diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_wither_rose.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_wither_rose.png new file mode 100644 index 0000000000000000000000000000000000000000..539722a344bbb4ec5d38645de42795dbf09cbe96 GIT binary patch literal 6055 zcmeHKd0Z3M77idg$f6>ON(iX9gd~#$k~GL(77cq51PhbQ1OnMe0tq6Zh@zlH1*!t> zT2TRat1JTIUKNY_5FRRvh(!r1BBg9^5>T=A+2`-~`k#|umO1x3-#PcY=iHmw;Op(K zuQOc-g+l3jdbs){--e2}mIm@^-ZKKCQ0nLvfx!}gP>L3c1Z)l$MoSWeFdCL|*eH~& zv3O}r-V1B3q3-!?ZIwVF^~%-0TNBy+;(J!T9`zMT=D8&vdKb5-<#aWsjKudDEV{|O zt$AiUv+3ol>vL}#azl61yHEEgILta5Alo6W*S(Sxk<%OX>W)JPC-H>qG=CWYwaZRa zUho(`E)cAn=nfbX(pH#yrCYT0rcP8#;KgKKf0Lk_7|ODjGM_)c!jLpx*jVn6==LVM z>Hyx(qCpthqV9NQTLGk%R(8$T>eXgXjJ&zkF?H3-DTlhWa}y)mw?3;GG@EB!UtV)5 z2H!?bruwuzZ!VkGI=9x}rWV(;%r@!q?f$Ncyyq3g4`FkoIvKaK=|;|;bCyqlZEj&1 zf>lL5UgvIFB$FVT zQLDquh@-2%uU;4)9Q6m|?sAJYZC-bvRKoPb%~!evVdnb1i~M&*omvo7b=gu|g@w11 z-%+)=S4-C+R(13aPb=3k)g#_qr~i}}KIg5YJAV^>tLJG)LPQwsw9G(F%V?$MDhn00 zP%G`poB;N0=NbBgkSSnN`;GM;!*i;$6SruIHl_=T{PId?$Qb)0SFc|M`1@vCtyz$D zW!<2k;M(39R=*oM>rG#HVDo-gbC->NZBfY~ZWS7vjzs5?^0)sS@$0>tAtwtc+IcJw z0_S9o|7~F&NM*&XbH4pe_sIeK7qRsZ-=6MBeKYSunsKIycy?~sc`vu!g(srVM+2*1$rRk#XFB@bp>_&$KdT@wrVW?$6^xEo(BK z(ksv|TVo23vz&BkWK!a-qS#{hWs%{BuH|?wUu>CNEL-6mKJ%2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-ZO2jgh&V_mfZXv}DX1WXiVCps6o5^_vZxdymSjtUu}nKM z9?K*!sQ^d>m@t!|q*AN{&B@o(9s}6mKUjRZpoA?D@sRf7@F9Uz{9!1N!-E4Pph7l+ zEdjt205XL_rU14?@&`~5ED|GSu3#nLZ2&+y0l}&}FkF^VJiGZbaRDxkh(Q#uv=L|;T zl(%%;=fHnq3WyR&`TrZw2k3hiCy_)d5XJb2e3;QNOY(W1Pl4Yv`6IiXSRzXB{F_Pr z2}d6-SP#TkAW9e)KLCy$y&K(p@rSQ8Z6QAqK<=g9Pyu`gfFvqGy(MbQ`HCBE9U<8EvYmhI}_p4lA z<@zE8z6kuay1vTwMGAZo_-l3j-{jKy@W>7Gk^g;CvAZj3MDf~F zaVQ(HXbU|;#3+>RB*j|=l~-Vj7&RrH3^&bom09|RGyIz0R3WB2o~}-TlwVj8d!`71 z`vb>jvl-0e)+aXsxdd9V#LbqWlz08!;Pa&2@msVcJS1oCl3AC(sAsu zUgHgs9`5@Jc5`b)&2OqE+|o6@jWw@s5hVHBO?%EVn#U<}Lf6?O(d-l|wBVIPN5s;f< zoU=9acFIs#&&cFyjv{C0iMkm*X+>+N_uE7$u6B@BWs(#qRzYE>`-Z5w_v}OFhVpdt Kb}ey^Nc|75a41~> literal 0 HcmV?d00001 From d1f0ade2e8a4492c8e88eea17c5f164689bccfdb Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 28 Oct 2022 21:19:09 +0200 Subject: [PATCH 20/39] Grow wither rose when wither kills mob --- mods/ENTITIES/mobs_mc/wither.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mobs_mc/wither.lua b/mods/ENTITIES/mobs_mc/wither.lua index 22c0598e9..26f90be5a 100644 --- a/mods/ENTITIES/mobs_mc/wither.lua +++ b/mods/ENTITIES/mobs_mc/wither.lua @@ -42,7 +42,7 @@ mcl_mobs:register_mob("mobs_mc:wither", { fly = true, makes_footstep_sound = false, dogshoot_switch = 1, - dogshoot_count_max =1, + dogshoot_count_max = 1, attack_animals = true, can_despawn = false, drops = { @@ -79,9 +79,11 @@ mcl_mobs:register_mob("mobs_mc:wither", { on_spawn = function(self) minetest.sound_play("mobs_mc_wither_spawn", {object=self.object, gain=1.0, max_hear_distance=64}) end, + }) local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false +local wither_rose_soil = { "group:grass_block", "mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_nether:netherrack", "group:soul_block", "mcl_mud:mud", "mcl_moss:moss" } mcl_mobs:register_arrow("mobs_mc:wither_skull", { visual = "sprite", @@ -105,6 +107,18 @@ mcl_mobs:register_arrow("mobs_mc:wither_skull", { damage_groups = {fleshy = 8}, }, nil) mcl_mobs:boom(self, self.object:get_pos(), 1) + local l = mob:get_luaentity() + if l and l.health - 8 <= 0 then + local n = minetest.find_node_near(mob:get_pos(),2,wither_rose_soil) + if n then + local p = vector.offset(n,0,1,0) + if minetest.get_node(p).name == "air" then + if not ( mobs_griefing and minetest.place_node(p,{name="mcl_flowers:wither_rose"}) ) then + minetest.add_item(p,"mcl_flowers:wither_rose") + end + end + end + end end, -- node hit, explode From 1f58cfb240697d2a319b037f211533eb738e75b1 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 28 Oct 2022 21:50:44 +0200 Subject: [PATCH 21/39] Fix merge conflict --- mods/MAPGEN/mcl_structures/api.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 6a7fc2c39..c11d62203 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -281,14 +281,15 @@ function mcl_structures.place_structure(pos, def, pr, blockseed) end,pr) end end - elseif def.after_place then ap = def.after_place + elseif def.after_place then + ap = def.after_place end mcl_structures.place_schematic(pp, file, rot, def.replacements, true, "place_center_x,place_center_z",function(p1, p2, size, rotation) if not def.daughters then if def.loot then generate_loot(pp,def,pr,blockseed) end if def.construct_nodes then construct_nodes(pp,def,pr,blockseed) end - return ap(pp,def,pr,blockseed,p1,p2,size,rotation) end + return ap(pp,def,pr,blockseed,p1,p2,size,rotation) end,pr) if log_enabled then minetest.log("action","[mcl_structures] "..def.name.." placed at "..minetest.pos_to_string(pp)) From 77bdce5cea2044f65961b97b3149af7f2dca318c Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 29 Oct 2022 00:18:48 +0200 Subject: [PATCH 22/39] Add structure mob respawning mechanic this sets a metadata field "spawnblock" in the nodes mobs spawn on and registers an abm to respan them --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 30 +++++-------- mods/MAPGEN/mcl_structures/api.lua | 50 +++++++++++++++++++--- 2 files changed, 55 insertions(+), 25 deletions(-) diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 40d6d55d7..4067398ad 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -3,21 +3,6 @@ local S = minetest.get_translator(modname) local modpath = minetest.get_modpath(modname) local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) - -local function spawn_mobs(mob,spawnon,p1,p2,pr,n) - if peaceful then return end - n = n or 1 - local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) - if sp and #sp > 0 then - for i=1,n do - local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) - if pos then - minetest.add_entity(pos,mob) - end - end - end -end - mcl_structures.register_structure("nether_outpost",{ place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, fill_ratio = 0.01, @@ -58,10 +43,17 @@ mcl_structures.register_structure("nether_bridge",{ after_place = function(pos,def,pr) local p1 = vector.offset(pos,-14,0,-14) local p2 = vector.offset(pos,14,24,14) - spawn_mobs("mobs_mc:witherskeleton",{"mcl_blackstone:blackstone_chiseled_polished"},p1,p2,pr,5) + mcl_structures.spawn_mobs("mobs_mc:witherskeleton",{"mcl_blackstone:blackstone_chiseled_polished"},p1,p2,pr,5) end }) +mcl_structures.register_structure_spawn({ + name = "mobs_mc:witherskeleton", + y_min = mcl_vars.mg_lava_nether_max, + y_max = mcl_vars.mg_lava_nether_max + 32, + spawnon = { "mcl_blackstone:blackstone_chiseled_polished" }, +}) + mcl_structures.register_structure("nether_bulwark",{ place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, fill_ratio = 0.01, @@ -91,9 +83,9 @@ mcl_structures.register_structure("nether_bulwark",{ after_place = function(pos,def,pr) local p1 = vector.offset(pos,-14,0,-14) local p2 = vector.offset(pos,14,24,14) - spawn_mobs("mobs_mc:piglin",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr,5) - spawn_mobs("mobs_mc:piglin_brute",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr) - spawn_mobs("mobs_mc:hoglin",{"mcl_blackstone:nether_gold"},p1,p2,pr,4) + mcl_structures.spawn_mobs("mobs_mc:piglin",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr,5) + mcl_structures.spawn_mobs("mobs_mc:piglin_brute",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr) + mcl_structures.spawn_mobs("mobs_mc:hoglin",{"mcl_blackstone:nether_gold"},p1,p2,pr,4) end, loot = { ["mcl_chests:chest_small" ] ={ diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index c11d62203..05522ca44 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -1,15 +1,12 @@ mcl_structures.registered_structures = {} -local rotations = { - "0", - "90", - "180", - "270" -} + local place_queue = {} local disabled_structures = minetest.settings:get("mcl_disabled_structures") if disabled_structures then disabled_structures = disabled_structures:split(",") else disabled_structures = {} end +local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) + local logging = minetest.settings:get_bool("mcl_logging_structures",true) local rotations = { @@ -226,6 +223,20 @@ local function process_queue() minetest.after(0.5,process_queue) end +function mcl_structures.spawn_mobs(mob,spawnon,p1,p2,pr,n) + n = n or 1 + local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) + table.shuffle(sp) + for i,node in pairs(sp) do + if not peaceful and i < n then + local pos = vector.offset(node,0,1,0) + if pos then + minetest.add_entity(pos,mob) + end + end + minetest.get_meta(node):set_string("spawnblock","yes") + end +end function mcl_structures.place_structure(pos, def, pr, blockseed) if not def then return end @@ -352,6 +363,33 @@ function mcl_structures.register_structure(name,def,nospawn) --nospawn means it mcl_structures.registered_structures[name] = def end +local structure_spawns = {} +function mcl_structures.register_structure_spawn(def) + --name,y_min,y_max,spawnon,biomes + minetest.register_abm({ + label = "Spawn "..def.name, + nodenames = def.spawnon, + min_y = def.y_min or -31000, + max_y = def.y_max or 31000, + interval = 15, + chance = 3, + action = function(pos, node, active_object_count, active_object_count_wider) + local p = vector.offset(pos,0,1,0) + if active_object_count > 7 then return end + if minetest.get_node(p).name ~= "air" then return end + if minetest.get_meta(pos):get_string("spawnblock") == "" then return end + if mg_name ~= "v6" and mg_name ~= "singlenode" and def.biomes then + if table.indexof(def.biomes,minetest.get_biome_name(minetest.get_biome_data(p).biome)) == -1 then + return + end + end + local mobdef = minetest.registered_entities[def.name] + if mobdef.can_spawn and not mobdef.can_spawn(p) then return end + minetest.add_entity(p,def.name) + end, + }) +end + --lbm for secondary structures (structblock included in base structure) minetest.register_lbm({ name = "mcl_structures:struct_lbm", From 27a434641db59a1899eab17195d14745b1ffceff Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 29 Oct 2022 00:43:15 +0200 Subject: [PATCH 23/39] Make structure spawning respect caps --- mods/MAPGEN/mcl_structures/api.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 05522ca44..7e5b6547f 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -6,9 +6,12 @@ if disabled_structures then disabled_structures = disabled_structures:split(",") else disabled_structures = {} end local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) +local mob_cap_player = tonumber(minetest.settings:get("mcl_mob_cap_player")) or 75 local logging = minetest.settings:get_bool("mcl_logging_structures",true) +local mg_name = minetest.get_mapgen_setting("mg_name") + local rotations = { "0", "90", @@ -191,7 +194,7 @@ local function foundation(ground_p1,ground_p2,pos,sidelen) local node_top = "mcl_core:dirt_with_grass" or minetest.get_node(ground_p1).name local node_dust = nil - if minetest.get_mapgen_setting("mg_name") ~= "v6" then + if mg_name ~= "v6" then local b = minetest.registered_biomes[minetest.get_biome_name(minetest.get_biome_data(pos).biome)] --minetest.log(dump(b.node_top)) if b then @@ -238,7 +241,7 @@ function mcl_structures.spawn_mobs(mob,spawnon,p1,p2,pr,n) end end -function mcl_structures.place_structure(pos, def, pr, blockseed) +function mcl_structures.place_structure(pos, def, pr, blockseed, rot) if not def then return end if not rot then rot = "random" end local log_enabled = logging and not def.terrain_feature @@ -365,17 +368,19 @@ end local structure_spawns = {} function mcl_structures.register_structure_spawn(def) - --name,y_min,y_max,spawnon,biomes + --name,y_min,y_max,spawnon,biomes,chance,interval,limit minetest.register_abm({ label = "Spawn "..def.name, nodenames = def.spawnon, min_y = def.y_min or -31000, max_y = def.y_max or 31000, - interval = 15, - chance = 3, + interval = def.interval or 60, + chance = def.chance or 5, action = function(pos, node, active_object_count, active_object_count_wider) + local limit = def.limit or 7 + if active_object_count > limit then return end + if active_object_count_wider > mob_cap_player then return end local p = vector.offset(pos,0,1,0) - if active_object_count > 7 then return end if minetest.get_node(p).name ~= "air" then return end if minetest.get_meta(pos):get_string("spawnblock") == "" then return end if mg_name ~= "v6" and mg_name ~= "singlenode" and def.biomes then From 0f01a28c9391f3ba666dccf57da35226f66f71ed Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 29 Oct 2022 01:26:32 +0200 Subject: [PATCH 24/39] Add structure spawning to other structures --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 23 ++++++++++ mods/MAPGEN/mcl_structures/api.lua | 3 +- mods/MAPGEN/mcl_structures/end_city.lua | 23 +++++++--- mods/MAPGEN/mcl_structures/igloo.lua | 25 +++++++--- .../mcl_structures/pillager_outpost.lua | 46 ++++++++++--------- .../mcl_structures/woodland_mansion.lua | 45 ++++++++++-------- 6 files changed, 109 insertions(+), 56 deletions(-) diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 4067398ad..6a2bd1e9d 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -51,6 +51,9 @@ mcl_structures.register_structure_spawn({ name = "mobs_mc:witherskeleton", y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_lava_nether_max + 32, + chance = 15, + interval = 60, + limit = 4, spawnon = { "mcl_blackstone:blackstone_chiseled_polished" }, }) @@ -130,3 +133,23 @@ mcl_structures.register_structure("nether_bulwark",{ }} }, }) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:piglin", + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_nether_max, + chance = 10, + interval = 60, + limit = 9, + spawnon = {"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"}, +}) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:piglin_brute", + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_nether_max, + chance = 20, + interval = 60, + limit = 4, + spawnon = {"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"}, +}) diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 7e5b6547f..9918031f8 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -7,6 +7,7 @@ else disabled_structures = {} end local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) local mob_cap_player = tonumber(minetest.settings:get("mcl_mob_cap_player")) or 75 +local mob_cap_animal = tonumber(minetest.settings:get("mcl_mob_cap_animal")) or 10 local logging = minetest.settings:get_bool("mcl_logging_structures",true) @@ -378,7 +379,7 @@ function mcl_structures.register_structure_spawn(def) chance = def.chance or 5, action = function(pos, node, active_object_count, active_object_count_wider) local limit = def.limit or 7 - if active_object_count > limit then return end + if active_object_count_wider > limit + mob_cap_animal then return end if active_object_count_wider > mob_cap_player then return end local p = vector.offset(pos,0,1,0) if minetest.get_node(p).name ~= "air" then return end diff --git a/mods/MAPGEN/mcl_structures/end_city.lua b/mods/MAPGEN/mcl_structures/end_city.lua index 942d81366..5f432a0eb 100644 --- a/mods/MAPGEN/mcl_structures/end_city.lua +++ b/mods/MAPGEN/mcl_structures/end_city.lua @@ -2,14 +2,13 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) local modpath = minetest.get_modpath(modname) +local spawnon = {"mcl_end:purpur_block"} + local function spawn_shulkers(pos,def,pr) - local nn = minetest.find_nodes_in_area_under_air(vector.offset(pos,-def.sidelen/2,-1,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2),{"mcl_end:purpur_block"}) - if nn and #nn > 0 then - table.shuffle(nn) - for i = 1,pr:next(1,math.min(6,#nn)) do - minetest.add_entity(vector.offset(nn[i],0,0.5,0),"mobs_mc:shulker") - end - end + local p1 = vector.offset(pos,-def.sidelen/2,-1,-def.sidelen/2) + local p2 = vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2) + mcl_structures.spawn_mobs("mobs_mc:shulker",spawnon,p1,p2,pr,1) + local guard = minetest.find_node_near(pos,def.sidelen,{"mcl_itemframes:item_frame"}) if guard then minetest.add_entity(vector.offset(guard,0,-1.5,0),"mobs_mc:shulker") @@ -133,3 +132,13 @@ mcl_structures.register_structure("end_boat",{ }} } }) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:shulker", + y_min = mcl_vars.mg_end_min, + y_max = mcl_vars.mg_end_max, + chance = 10, + interval = 60, + limit = 6, + spawnon = spawnon, +}) diff --git a/mods/MAPGEN/mcl_structures/igloo.lua b/mods/MAPGEN/mcl_structures/igloo.lua index 64b4206c0..0fd8c6217 100644 --- a/mods/MAPGEN/mcl_structures/igloo.lua +++ b/mods/MAPGEN/mcl_structures/igloo.lua @@ -14,6 +14,24 @@ function mcl_structures.generate_igloo_top(pos, pr) end), rotation end +local function spawn_mobs(p1,p2,vi,zv) + local mc = minetest.find_nodes_in_area_under_air(p1,p2,{"mcl_core:stonebrickmossy"}) + if #mc == 2 then + local vp = mc[1] + local zp = mc[2] + if not vi and zv and zv:get_pos() and vector.distance(mc[1],zv:get_pos()) < 2 then + vp = mc[2] + elseif not zv and vi and vi:get_pos() and vector.distance(mc[2],vi:get_pos()) < 2 then + zp = mc[1] + elseif zv and vi then + return + end + vi = minetest.add_entity(vector.offset(mc[1],0,1,0),"mobs_mc:villager") + zv = minetest.add_entity(vector.offset(mc[2],0,1,0),"mobs_mc:villager_zombie") + minetest.after(1,spawn_mobs,p1,p2,vi,zv) + end +end + function mcl_structures.generate_igloo_basement(pos, orientation, loot, pr) -- TODO: Add monster eggs local path = modpath.."/schematics/mcl_structures_igloo_basement.mts" @@ -22,12 +40,7 @@ function mcl_structures.generate_igloo_basement(pos, orientation, loot, pr) local p2 = vector.offset(pos,5,5,5) mcl_structures.fill_chests(p1,p2,loot,pr) mcl_structures.construct_nodes(p1,p2,{"mcl_brewing:stand_000","mcl_books:bookshelf"}) - local mc = minetest.find_nodes_in_area_under_air(p1,p2,{"mcl_core:stonebrickmossy"}) - if #mc == 2 then - table.shuffle(mc) - minetest.add_entity(vector.offset(mc[1],0,1,0),"mobs_mc:villager") - minetest.add_entity(vector.offset(mc[2],0,1,0),"mobs_mc:villager_zombie") - end + spawn_mobs(p1,p2) end, pr) end diff --git a/mods/MAPGEN/mcl_structures/pillager_outpost.lua b/mods/MAPGEN/mcl_structures/pillager_outpost.lua index 3b337886c..5f25a839d 100644 --- a/mods/MAPGEN/mcl_structures/pillager_outpost.lua +++ b/mods/MAPGEN/mcl_structures/pillager_outpost.lua @@ -3,6 +3,8 @@ local S = minetest.get_translator(modname) local modpath = minetest.get_modpath(modname) local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) +local spawnon = {"mcl_core:stripped_oak"} + mcl_structures.register_structure("pillager_outpost",{ place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass","group:sand"}, fill_ratio = 0.01, @@ -58,27 +60,27 @@ mcl_structures.register_structure("pillager_outpost",{ after_place = function(p,def,pr) local p1 = vector.offset(p,-7,0,-7) local p2 = vector.offset(p,7,14,7) - local spawnon = {"mcl_core:stripped_oak"} - local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) - for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do - local def = minetest.registered_nodes[minetest.get_node(n).name:gsub("_%d+$","")] - if def and def.on_construct then - def.on_construct(n) - end - end - if not peaceful then - if sp and #sp > 0 then - for i=1,5 do - local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) - if pos then - minetest.add_entity(pos,"mobs_mc:pillager") - end - end - local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0) - if pos then - minetest.add_entity(pos,"mobs_mc:evoker") - end - end - end + mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5) + mcl_structures.spawn_mobs("mobs_mc:evoker",spawnon,p1,p2,pr,1) end }) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:pillager", + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + chance = 10, + interval = 60, + limit = 9, + spawnon = spawnon, +}) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:evoker", + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + chance = 100, + interval = 60, + limit = 4, + spawnon = spawnon, +}) diff --git a/mods/MAPGEN/mcl_structures/woodland_mansion.lua b/mods/MAPGEN/mcl_structures/woodland_mansion.lua index ca1464fef..c4d494871 100644 --- a/mods/MAPGEN/mcl_structures/woodland_mansion.lua +++ b/mods/MAPGEN/mcl_structures/woodland_mansion.lua @@ -3,6 +3,8 @@ local S = minetest.get_translator(modname) local modpath = minetest.get_modpath(modname) local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) +local spawnon = {"mcl_deepslate:deepslate","mcl_core:birchwood","mcl_wool:red_carpet","mcl_wool:brown_carpet"} + mcl_structures.register_structure("woodland_cabin",{ place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"}, fill_ratio = 0.01, @@ -20,28 +22,11 @@ mcl_structures.register_structure("woodland_cabin",{ }, construct_nodes = {"mcl_barrels:barrel_closed"}, after_place = function(p,def,pr) - local spawnon = {"mcl_deepslate:deepslate","mcl_core:birchwood","mcl_wool:red_carpet","mcl_wool:brown_carpet"} local p1=vector.offset(p,-def.sidelen,-1,-def.sidelen) local p2=vector.offset(p,def.sidelen,def.sidelen,def.sidelen) - local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) - if not peaceful then - if sp and #sp > 0 then - for i=1,5 do - local pos = sp[pr:next(1,#sp)] - if pos then - minetest.add_entity(pos,"mobs_mc:vindicator") - end - end - local pos = sp[pr:next(1,#sp)] - if pos then - minetest.add_entity(pos,"mobs_mc:evoker") - end - end - end - local parrot = minetest.find_node_near(p,25,{"mcl_heads:wither_skeleton"}) - if parrot then - minetest.add_entity(parrot,"mobs_mc:parrot") - end + mcl_structures.spawn_mobs("mobs_mc:vindicator",spawnon,p1,p2,pr,5) + mcl_structures.spawn_mobs("mobs_mc:evoker",spawnon,p1,p2,pr,1) + mcl_structures.spawn_mobs("mobs_mc:parrot",{"mcl_heads:wither_skeleton"},p1,p2,pr,1) end, loot = { ["mcl_chests:chest_small" ] ={{ @@ -82,3 +67,23 @@ mcl_structures.register_structure("woodland_cabin",{ }} } }) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:vindicator", + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + chance = 10, + interval = 60, + limit = 6, + spawnon = spawnon, +}) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:evoker", + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + chance = 50, + interval = 60, + limit = 6, + spawnon = spawnon, +}) From fe68e1eaac0228d562e4217e0dd4aea08d4ca958 Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 29 Oct 2022 03:16:08 +0200 Subject: [PATCH 25/39] Generate netherrack and ores under the lava another hack using minetest.generate_ores this time --- mods/MAPGEN/mcl_biomes/init.lua | 31 +++++++++++++++++++--------- mods/MAPGEN/mcl_mapgen_core/api.lua | 14 +++++++++++-- mods/MAPGEN/mcl_mapgen_core/init.lua | 7 ++++++- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 55adb0b35..2d6efd641 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1545,6 +1545,19 @@ local function register_dimension_biomes() flags = "all_ceilings", param2 = 0, }) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"mcl_core:bedrock"}, + sidelen = 16, + fill_ratio = 10, + y_min = mcl_vars.mg_nether_min - 10, + y_max = mcl_vars.mg_lava_nether_max, + height = 7, + max_height = 14, + decoration = "mcl_nether:netherrack", + flags = "all_floors,force_placement", + param2 = 0, + }) minetest.register_biome({ @@ -1570,7 +1583,7 @@ local function register_dimension_biomes() sidelen = 16, fill_ratio = 10, biomes = { "Nether" }, - y_min = -31000, + y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_nether:netherrack", flags = "all_floors", @@ -1586,7 +1599,6 @@ local function register_dimension_biomes() node_river_water = "air", node_cave_liquid = "air", y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max + 80, heat_point = 77, humidity_point = 33, @@ -1599,7 +1611,7 @@ local function register_dimension_biomes() sidelen = 16, fill_ratio = 10, biomes = { "SoulsandValley" }, - y_min = -31000, + y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_blackstone:soul_soil", flags = "all_floors, all_ceilings", @@ -1614,7 +1626,7 @@ local function register_dimension_biomes() clust_num_ores = 225, clust_size = 15, biomes = { "SoulsandValley" }, - y_min = mcl_vars.mg_nether_min, + y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, noise_params = { offset = 0, @@ -1636,7 +1648,6 @@ local function register_dimension_biomes() node_river_water = "air", node_cave_liquid = "air", y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max + 80, heat_point = 60, humidity_point = 47, @@ -1649,7 +1660,7 @@ local function register_dimension_biomes() sidelen = 16, fill_ratio = 10, biomes = { "CrimsonForest" }, - y_min = -31000, + y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_crimson:crimson_nylium", flags = "all_floors", @@ -1676,7 +1687,7 @@ local function register_dimension_biomes() sidelen = 16, fill_ratio = 10, biomes = { "WarpedForest" }, - y_min = -31000, + y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_crimson:warped_nylium", flags = "all_floors", @@ -1704,7 +1715,7 @@ local function register_dimension_biomes() sidelen = 16, fill_ratio = 10, biomes = { "BasaltDelta" }, - y_min = -31000, + y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_blackstone:basalt", flags = "all_floors", @@ -1714,12 +1725,12 @@ local function register_dimension_biomes() minetest.register_ore({ ore_type = "blob", ore = "mcl_blackstone:blackstone", - wherein = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_core:gravel","mcl_nether:soul_sand"}, + wherein = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_core:gravel"}, clust_scarcity = 100, clust_num_ores = 400, clust_size = 20, biomes = { "BasaltDelta" }, - y_min = mcl_vars.mg_nether_min, + y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, noise_params = { offset = 0, diff --git a/mods/MAPGEN/mcl_mapgen_core/api.lua b/mods/MAPGEN/mcl_mapgen_core/api.lua index 356950851..630270444 100644 --- a/mods/MAPGEN/mcl_mapgen_core/api.lua +++ b/mods/MAPGEN/mcl_mapgen_core/api.lua @@ -15,7 +15,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed) local t1 = os.clock() local p1, p2 = {x=minp.x, y=minp.y, z=minp.z}, {x=maxp.x, y=maxp.y, z=maxp.z} if lvm > 0 then - local lvm_used, shadow, deco_used, deco_table = false, false, false, false + local lvm_used, shadow, deco_used, deco_table, ore_used, ore_table = false, false, false, false, false, false local lb2 = {} -- param2 local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") local e1, e2 = {x=emin.x, y=emin.y, z=emin.z}, {x=emax.x, y=emax.y, z=emax.z} @@ -28,7 +28,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed) for _, rec in ipairs(registered_generators) do if rec.vf then - local lvm_used0, shadow0, deco = rec.vf(vm, data, data2, e1, e2, area, p1, p2, blockseed) + local lvm_used0, shadow0, deco, ore = rec.vf(vm, data, data2, e1, e2, area, p1, p2, blockseed) if lvm_used0 then lvm_used = true end @@ -40,6 +40,11 @@ minetest.register_on_generated(function(minp, maxp, blockseed) elseif deco then deco_used = true end + if ore and type(ore) == "table" then + ore_table = ore + elseif deco then + ore_used = true + end end end @@ -54,6 +59,11 @@ minetest.register_on_generated(function(minp, maxp, blockseed) elseif deco_used then minetest.generate_decorations(vm) end + if ore_table then + minetest.generate_ores(vm,vector.new(minp.x,ore_table.min,minp.z),vector.new(maxp.x,ore_table.max,maxp.z)) + elseif ore_used then + minetest.generate_ores(vm) + end vm:calc_lighting(p1, p2, shadow) vm:write_to_map() vm:update_liquids() diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 569352012..03c5aeb13 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -333,10 +333,15 @@ local function world_structure(vm, data, data2, emin, emax, area, minp, maxp, bl end end local deco = false + local ores = false if minp.y > mcl_vars.mg_nether_deco_max - 64 and maxp.y < mcl_vars.mg_nether_max + 128 then deco = {min=mcl_vars.mg_nether_deco_max,max=mcl_vars.mg_nether_max} end - return lvm_used, lvm_used, deco + if minp.y < mcl_vars.mg_nether_min + 10 or maxp.y < mcl_vars.mg_nether_min + 60 then + deco = {min=mcl_vars.mg_nether_min - 10,max=mcl_vars.mg_nether_min + 20} + ores = {min=mcl_vars.mg_nether_min - 10,max=mcl_vars.mg_nether_min + 20} + end + return lvm_used, lvm_used, deco, ores end local function block_fixes(vm, data, data2, emin, emax, area, minp, maxp, blockseed) From fb1c1a483e1eddf6ca4dc2ddeebb494b924de0a9 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 14 Oct 2022 18:27:57 +0200 Subject: [PATCH 26/39] Add strider --- mods/ENTITIES/mobs_mc/init.lua | 2 + .../mobs_mc/models/extra_mobs_strider.b3d | Bin 0 -> 33029 bytes mods/ENTITIES/mobs_mc/strider.lua | 248 ++++++++++++++++++ .../mobs_mc/textures/extra_mobs_strider.png | Bin 0 -> 2100 bytes .../textures/extra_mobs_strider_cold.png | Bin 0 -> 2055 bytes 5 files changed, 250 insertions(+) create mode 100644 mods/ENTITIES/mobs_mc/models/extra_mobs_strider.b3d create mode 100644 mods/ENTITIES/mobs_mc/strider.lua create mode 100644 mods/ENTITIES/mobs_mc/textures/extra_mobs_strider.png create mode 100644 mods/ENTITIES/mobs_mc/textures/extra_mobs_strider_cold.png diff --git a/mods/ENTITIES/mobs_mc/init.lua b/mods/ENTITIES/mobs_mc/init.lua index a37455e13..a84a8c321 100644 --- a/mods/ENTITIES/mobs_mc/init.lua +++ b/mods/ENTITIES/mobs_mc/init.lua @@ -154,3 +154,5 @@ dofile(path .. "/glow_squid.lua") dofile(path .. "/piglin.lua") dofile(path .. "/hoglin+zoglin.lua") + +dofile(path .. "/strider.lua") diff --git a/mods/ENTITIES/mobs_mc/models/extra_mobs_strider.b3d b/mods/ENTITIES/mobs_mc/models/extra_mobs_strider.b3d new file mode 100644 index 0000000000000000000000000000000000000000..72f4e254e332239450b0e14f4a0f7334aadbc660 GIT binary patch literal 33029 zcmeHP3wTx4mA(X_wrZuQ1w|ghO>P272;>H831^3w4+sx=NU4A%5CIDkLj4&v^|VoImt^KNM;e3WWxboiOgp;FL#}RF+lDE}0X0p`lm_g+ji< zZ(4!88BG*(^YZ%sL*-GUhYqXuL!q&wM~|n0xJJwI6#I!gy#)37l@+sRlvU);Dl3^0 z`&CQvI~o^7VdSuJSB*c{xO(l_@#E%v+Wf+EOandJ(4ejgE-QKw91eJ)P`SrGZ_&eX zeIc*W_C4Rw5MVbSr2DvUtgqbZqc5h9_KcqP&!fz~m$bbi=!JA2?Zx`allHm$9%3b;G_f|CVe2TzmA-)uVr|y+p@- z>zgmsheAsS)HgIB@BM+HP?N{L;&Vq9#roEJ|84tTZfJl$o9W}evA!m)7wcm!F@3aW z^w_uFo7T8BVBf3SUeWPB?i=fC(t3&d+9lb5WI_F{VL6UHD> ztQeQr`SLt`$7lNDCpfM-2KO~_j>RB$Zf4(>vF8~13H?hHgGr5Bk+Vw&pvKb=J-+PY zF=Bn|z3Xfr)(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literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mobs_mc/strider.lua b/mods/ENTITIES/mobs_mc/strider.lua new file mode 100644 index 000000000..a38955370 --- /dev/null +++ b/mods/ENTITIES/mobs_mc/strider.lua @@ -0,0 +1,248 @@ +--MCmobs v0.4 +--maikerumine +--made for MC like Survival game +--License for code WTFPL and otherwise stated in readmes + +local S = minetest.get_translator("mobs_mc") + +--################### +--################### STRIDER +--################### + + +local strider = { + type = "animal", + passive = true, + spawn_class = "passive", + hp_min = 20, + hp_max = 20, + xp_min = 9, + xp_max = 9, + armor = {fleshy = 90}, + attack_type = "dogfight", + damage = 2, + reach = 2, + collisionbox = {-.6, -0.01, -.6, .6, 1.94, .6}, + visual = "mesh", + mesh = "extra_mobs_strider.b3d", + textures = { { + "extra_mobs_strider.png", + } }, + visual_size = {x=3, y=3}, + sounds = { + }, + jump = true, + makes_footstep_sound = true, + walk_velocity = 2, + run_velocity = 4, + runaway = true, + drops = { + {name = "mcl_mobsitems:string", + chance = 1, + min = 2, + max = 5,}, + }, + animation = { + stand_speed = 15, + walk_speed = 15, + run_speed = 30, + stand_start = 5, + stand_end = 5, + walk_start = 1, + walk_end = 20, + }, + lava_damage = 0, + fire_damage = 0, + light_damage = 0, + water_damage = 5, + fear_height = 4, + view_range = 16, + fire_resistant = true, + floats_on_lava = 1, + floats = 0, + do_custom = function(self, dtime) + + if minetest.find_node_near(self.object:get_pos(), 2, "mcl_core:lava_source") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_core:lava_flowing") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_nether:nether_lava_source") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_nether:nether_lava_flowing") ~= nil then + self.walk_velocity = 2 + self.run_velocity = 4 + self.base_texture[1] = "extra_mobs_strider.png" + self.shaking = false + else + self.base_texture[1] = "extra_mobs_strider_cold.png" + self.walk_velocity = .5 + self.run_velocity = 1 + self.shaking = true + end + + self.object:set_properties({textures=self.base_texture, shaking=self.shaking, run_velocity=self.run_velocity, walk_velocity=self.walk_velocity}) + + -- set needed values if not already present + if not self.v2 then + self.v2 = 0 + self.max_speed_forward = 8 + self.max_speed_reverse = 4 + self.accel = 2 + self.terrain_type = 3 + self.driver_attach_at = {x = 0, y = 5.5, z = -1.75} + self.driver_eye_offset = {x = 0, y = 10, z = 0} + self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y} + end + + -- if driver present allow control of horse + if self.driver then + + mobs.drive(self, "walk", "stand", false, dtime) + + return false -- skip rest of mob functions + end + + return true + end, + + on_die = function(self, pos) + + -- drop saddle when horse is killed while riding + -- also detach from horse properly + if self.driver then + mobs.detach(self.driver, {x = 1, y = 0, z = 1}) + end + end, + + on_rightclick = function(self, clicker) + if not clicker or not clicker:is_player() then + return + end + + local wielditem = clicker:get_wielded_item() + + local controlitem = "" + if minetest.get_modpath("mcl_mobitems") then + controlitem = "mcl_mobitems_warped_fungus_stick:warped_fungus_stick" + else + controlitem = mobs_mc.items.carrot_on_a_stick + end + if wielditem:get_name() ~= controlitem then + if mcl_mobs:feed_tame(self, clicker, 1, true, true) then return end + end + + if self.child then + return + end + + local item = clicker:get_wielded_item() + if item:get_name() == "mcl_mobitems:saddle" and self.saddle ~= "yes" then + self.base_texture = { + "extra_mobs_strider.png", + "mobs_mc_pig_saddle.png", -- saddle + } + self.object:set_properties({ + textures = self.base_texture + }) + self.saddle = "yes" + self.tamed = true + self.drops = { + {name = "mcl_mobitems:string", + chance = 1, + min = 1, + max = 3,}, + {name = "mcl_mobitems:saddle", + chance = 1, + min = 1, + max = 1,}, + } + if not minetest.is_creative_enabled(clicker:get_player_name()) then + local inv = clicker:get_inventory() + local stack = inv:get_stack("main", clicker:get_wield_index()) + stack:take_item() + inv:set_stack("main", clicker:get_wield_index(), stack) + end + minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=8, pos=self.object:get_pos()}, true) + return + end + + -- Mount or detach player + local name = clicker:get_player_name() + if self.driver and clicker == self.driver then + -- Detach if already attached + mobs.detach(clicker, {x=1, y=0, z=0}) + return + + elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == controlitem then + -- Ride pig if it has a saddle and player uses a carrot on a stick + + mobs.attach(self, clicker) + + if not minetest.is_creative_enabled(clicker:get_player_name()) then + + local inv = self.driver:get_inventory() + -- 26 uses + if wielditem:get_wear() > 63000 then + -- Break carrot on a stick + local def = wielditem:get_definition() + if def.sounds and def.sounds.breaks then + minetest.sound_play(def.sounds.breaks, {pos = clicker:get_pos(), max_hear_distance = 8, gain = 0.5}, true) + end + wielditem = {name = mobs_mc.items.fishing_rod, count = 1} + else + wielditem:add_wear(2521) + end + inv:set_stack("main",self.driver:get_wield_index(), wielditem) + end + return + end + end, +} + +mcl_mobs:register_mob("mobs_mc:strider", strider) + +-- Baby strider. + +local baby_strider = table.copy(strider) +baby_strider.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3} +baby_strider.xp_min = 13 +baby_strider.xp_max = 13 +baby_strider.visual_size = {x=strider.visual_size.x/2, y=strider.visual_size.y/2} +textures = { { + "extra_mobs_strider.png", + "extra_mobs_trans.png", +} } +baby_strider.walk_velocity = 1.2 +baby_strider.run_velocity = 2.4 +baby_strider.child = 1 + +mcl_mobs:register_mob("mobs_mc:baby_strider", baby_strider) + +-- Regular spawning in the Nether + +mcl_mobs:spawn_setup({ + name = "mobs_mc:strider", + type_of_spawning = "lava", + dimension = "nether", + biomes = { + "Nether" + }, + min_height = mcl_vars.mg_nether_min, + max_height = mcl_vars.mg_nether_max, + chance = 2000, + check_position = function(pos) + return minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name:find("lava") + end +}) + +mcl_mobs:spawn_setup({ + name = "mobs_mc:baby_strider", + type_of_spawning = "lava", + dimension = "nether", + biomes = { + "Nether" + }, + min_height = mcl_vars.mg_nether_min, + max_height = mcl_vars.mg_nether_max, + chance = 100, + check_position = function(pos) + return minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name:find("lava") + end +}) + +-- spawn eggs +mcl_mobs:register_egg("mobs_mc:strider", S("Strider"), "#000000", "#FF0000", 0) diff --git a/mods/ENTITIES/mobs_mc/textures/extra_mobs_strider.png b/mods/ENTITIES/mobs_mc/textures/extra_mobs_strider.png new file mode 100644 index 0000000000000000000000000000000000000000..5039afe360a8ff2d631d6b9472c05e7da08c9956 GIT binary patch literal 2100 zcmV-42+Q}0P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jm72 z5fKMY0WSXl00*>5L_t(|+U;6FXcSi%{${c}vm0I0I1NKXH?=Bht0>wwrW6m}Dpja0 zR)o@nhe}SRMM|O2Q>7QNH>q9}>_up)E$G36U{MOXs3E~PvF?(S~n^LgZQIpC!gEwO;6u}N;~E+!Mpxc~R6aen%b9zMjR z-hmOjjLB-HCcGR?;xS(sym0$A48y=SN%&@xU{h8SV|u-0h`sBtbMhi;f>&C~0kKvr zn#BxI1tznTzUWXlr;w~5Y|NrnfGA{`z+wG`$~3y-vARkSbA@IpqNxfH!U7`H554v*MnjG$a&{D3^b)V08J*f0#_aye|;ve=hw10D z`Jlau^H~8FbT1*^N3i|JL^BRcQrN^SW`sqO7_rNka2y;uup0pI)!|>zr)e;C4U^Rh zR!9*bYdgryj^87UXVs$ojUY~8`;>(@(cvqqk6V`SBjUp1 zGu!yx3pZfy+JTc7Phi4%!tA%Qlei@$LlcgJlNV3G+_eLDFWm5~5%vvHaPg4jgJOyk zPd-yDAyX{*EJ0jb6-`-IL?diIkXnu-S8s+^hhf#w zM%H#b^G;VgkJ$U|@$M?GwHPEkvSUk)P*xvbJ%+5Jo?es*MLS-7KtDT-P zY))*h@>cX4&sCN*#?&<&xq1_WLf`9VZ|(Fa{tongQ&O@>f^+Su9xvtddE_Bwk4_#i zbl=)M5eoX4%nLzbF$|ev34NNz*`EnruZRj_e&+A>h`B$Jz_?|3_Bn1@JYC+p%=Nuv zb5xO0Wfur5Ia!$E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?_Uz$t{D4$uH0fAGI=^2Jf9645ZH7@$Q&{3a-E=5qc(<; z9O|Qp;&5KA$tI2G3yBi$>*cJb^C{L4WeLiqbZw&bZR^{1L~E9J>K!W#k_9I$ZZS`) zkf(dYZq&*D+Q`ts-{TU2iNdCIVds8A9fhEi9&R**i!3Lxbt`sB`Xebxx%+RDv8*r; g7x@2zSf70%>ZSt2G*Wn;^GgFZ7H7;GOns971Kg#>2LJ#7 literal 0 HcmV?d00001 From 6485545269d88218322feefebe0963171e8593d4 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 27 Oct 2022 17:45:59 +0200 Subject: [PATCH 27/39] Add warped fungus on a stick item --- mods/ITEMS/mcl_mobitems/init.lua | 27 ++++++++++++++++++ .../mcl_mobitems_warped_fungus_on_a_stick.png | Bin 0 -> 6428 bytes 2 files changed, 27 insertions(+) create mode 100644 mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_warped_fungus_on_a_stick.png diff --git a/mods/ITEMS/mcl_mobitems/init.lua b/mods/ITEMS/mcl_mobitems/init.lua index a5c2a4214..256be9025 100644 --- a/mods/ITEMS/mcl_mobitems/init.lua +++ b/mods/ITEMS/mcl_mobitems/init.lua @@ -327,6 +327,17 @@ minetest.register_tool("mcl_mobitems:carrot_on_a_stick", { _mcl_toollike_wield = true, }) +minetest.register_tool("mcl_mobitems:warped_fungus_on_a_stick", { + description = S("Warped fungus on a Stick"), + _tt_help = S("Lets you ride a strider"), + _doc_items_longdesc = S("A warped fungus on a stick can be used on saddled striders to ride them."), + _doc_items_usagehelp = S("Place it on a saddled strider to mount it. You can now ride the strider like a horse. Striders will also walk towards you when you just wield the carrot on a stick."), + wield_image = "mcl_mobitems_warped_fungus_on_a_stick.png^[transformFY^[transformR90", + inventory_image = "mcl_mobitems_warped_fungus_on_a_stick.png", + groups = { transport = 1 }, + _mcl_toollike_wield = true, +}) + minetest.register_craftitem("mcl_mobitems:nautilus_shell", { description = S("Nautilus Shell"), _tt_help = S("Used to craft a conduit"), @@ -450,6 +461,22 @@ minetest.register_craft({ }, }) +minetest.register_craft({ + output = "mcl_mobitems:warped_fungus_on_a_stick", + recipe = { + { "mcl_fishing:fishing_rod", "", }, + { "", "mcl_crimson:warped_fungus" }, + }, +}) + +minetest.register_craft({ + output = "mcl_mobitems:warped_fungus_on_a_stick", + recipe = { + { "","mcl_fishing:fishing_rod", }, + { "mcl_crimson:warped_fungus", "" }, + }, +}) + minetest.register_craft({ type = "shapeless", output = "mcl_mobitems:magma_cream", diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_warped_fungus_on_a_stick.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_warped_fungus_on_a_stick.png new file mode 100644 index 0000000000000000000000000000000000000000..9f20bf787727f7d0da5f3cb76e843f5e0316cbd5 GIT binary patch literal 6428 zcmeHLd011|whvGS!4U;{6iNscnNH@ALBbTK00D%c42qm2ClH1tB!Prc2BClxf`YA3 zxmB-l6-yoQA~+$SprX(sg4(Jmpdy1qizxRbpyF+B@AG@F{|R3pd+p!)t+m&*&vyy} z{5g2G z2!!J1h1H>lZI{n|9c2)zUW_Q{@0c6h<5Ietk&{lhOuBubu)Z(SoM@WG>zUglp)^bid!sC4dO z%8`BAgtaYYvcm6ko?cmaC%QD{$28Ba51wDEXp?W^3pX{MvNbo~D_D`3&|jW4>fGAj zS2|+Vc+LOX_(es#d8#c^)HtExzt4AWh?ZsyJ37Fr#oNGAYxtni*S4A85Eu8i2cOcg z2OWta%X}7V@C`Ey+}$>x{^!u*qGIn89C6D&|y$-c7IqbHJ{WM zrny{U4PJ#bEU>bJ+Wg4?j1o6mHPikS&&tTCRh!IZLQ|~%}&@=MH?H; zJaT;jd$dzyd)1V~KU1@bVWZWJpZm2?$%hCf50(VC2}zB3Y)xUKV{IkYxzOu4 zVWa6Sx{FU(V63~Zcc0q1m1|6lz+2J{h^b9Q&$xE6M?}B;^F{DT-!4r-g8M#C>*paa zK0A=Od{tA0M&5Ic39XdYXL}=3o{$Y2I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#=`*~tZLf;F6p{xZ-+3cF_R;j71!}S%r^$}k# zPLQk}Ah75_B)VhPt(rq`YTE6@?F0J}lPzSwhiPxILPU{|$gLY&b Uy;9@V1V Date: Thu, 27 Oct 2022 17:46:42 +0200 Subject: [PATCH 28/39] Fix strider riding --- mods/ENTITIES/mobs_mc/strider.lua | 32 +++++++++---------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/strider.lua b/mods/ENTITIES/mobs_mc/strider.lua index a38955370..efb907983 100644 --- a/mods/ENTITIES/mobs_mc/strider.lua +++ b/mods/ENTITIES/mobs_mc/strider.lua @@ -62,7 +62,7 @@ local strider = { floats = 0, do_custom = function(self, dtime) - if minetest.find_node_near(self.object:get_pos(), 2, "mcl_core:lava_source") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_core:lava_flowing") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_nether:nether_lava_source") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_nether:nether_lava_flowing") ~= nil then + if minetest.find_node_near(self.object:get_pos(), 2, {"mcl_core:lava_source","mcl_core:lava_flowing","mcl_nether:nether_lava_source","mcl_nether:nether_lava_flowing"}) then self.walk_velocity = 2 self.run_velocity = 4 self.base_texture[1] = "extra_mobs_strider.png" @@ -91,7 +91,7 @@ local strider = { -- if driver present allow control of horse if self.driver then - mobs.drive(self, "walk", "stand", false, dtime) + mcl_mobs.drive(self, "walk", "stand", false, dtime) return false -- skip rest of mob functions end @@ -104,7 +104,7 @@ local strider = { -- drop saddle when horse is killed while riding -- also detach from horse properly if self.driver then - mobs.detach(self.driver, {x = 1, y = 0, z = 1}) + mcl_mobs.detach(self.driver, {x = 1, y = 0, z = 1}) end end, @@ -115,13 +115,7 @@ local strider = { local wielditem = clicker:get_wielded_item() - local controlitem = "" - if minetest.get_modpath("mcl_mobitems") then - controlitem = "mcl_mobitems_warped_fungus_stick:warped_fungus_stick" - else - controlitem = mobs_mc.items.carrot_on_a_stick - end - if wielditem:get_name() ~= controlitem then + if wielditem:get_name() ~= "mcl_crimson:warped_fungus" then if mcl_mobs:feed_tame(self, clicker, 1, true, true) then return end end @@ -151,10 +145,8 @@ local strider = { max = 1,}, } if not minetest.is_creative_enabled(clicker:get_player_name()) then - local inv = clicker:get_inventory() - local stack = inv:get_stack("main", clicker:get_wield_index()) - stack:take_item() - inv:set_stack("main", clicker:get_wield_index(), stack) + wielditem:take_item(1) + clicker:get_inventory():set_stack("main", clicker:get_wield_index(), wielditem) end minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=8, pos=self.object:get_pos()}, true) return @@ -164,13 +156,13 @@ local strider = { local name = clicker:get_player_name() if self.driver and clicker == self.driver then -- Detach if already attached - mobs.detach(clicker, {x=1, y=0, z=0}) + mcl_mobs.detach(clicker, {x=1, y=0, z=0}) return - elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == controlitem then + elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == "mcl_mobitems:warped_fungus_on_a_stick" then -- Ride pig if it has a saddle and player uses a carrot on a stick - mobs.attach(self, clicker) + mcl_mobs.attach(self, clicker) if not minetest.is_creative_enabled(clicker:get_player_name()) then @@ -224,9 +216,6 @@ mcl_mobs:spawn_setup({ min_height = mcl_vars.mg_nether_min, max_height = mcl_vars.mg_nether_max, chance = 2000, - check_position = function(pos) - return minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name:find("lava") - end }) mcl_mobs:spawn_setup({ @@ -239,9 +228,6 @@ mcl_mobs:spawn_setup({ min_height = mcl_vars.mg_nether_min, max_height = mcl_vars.mg_nether_max, chance = 100, - check_position = function(pos) - return minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name:find("lava") - end }) -- spawn eggs From 376aeda495e27acabc4b2aafc93e3027599dd654 Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 29 Oct 2022 03:49:36 +0200 Subject: [PATCH 29/39] change bulwark to use soulless fire for piggy comfort --- .../mcl_nether_fortresses_nether_bulwark.mts | Bin 2895 -> 3216 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark.mts index edf8608d4296fec6771b77c5faafab4084f9066e..a9522cce01941802db96073f85f6504140b36501 100644 GIT binary patch delta 2250 zcmZvaeKgaHAIClZii*n9_1t20;zu_kE#{&UVM@qztPNqZY14-9&Fy-MVUwqrQ$Moh zVM-BWx`jm~BxUhco@z5IreVx4_4}RkyXXA=`JB&re?I5)dcV*4^lRp7=R(y@WaL95 zu`-%5$mo#xSS&IEg@ffe@MKM?d2%|`Q?k2d&GG=f%|=CUb0<0!6OY1Ta4>3&EQ0!3 z_M@i8ri_fmqF~XX_|On^bSxnf6Hc9$gPc|W`v@0%1&c(<=x?fM6bAVng+awfps*of z*hpm5PfbSWZC$1gfl@ zhO8BJLtgtwcbJ+ZuOR|3>#JKHJCa zD}_IKV}Xl?QX6-`JW^ao3yKp4hJr1;7Sf2)mqQL8E>g6tq=V3#md6nQ>zm%7YqF^H ztdYc`Y6&VW9%;B?VpkYE6x7@iV31SkaS#QANb7LPCTc3hMopa=ZLV6ww2&U_&*rWR z3g!*QZst8}a&>VibOF&3I8vyzo<3;#^%dWmivp4H6S@iQvAj4zY0emA5ubZaRl> zw?lj^%w6*K1Ka?0+%`q((diBnM>+2Ph+#13Q^q^}k)gJ+&@p79p$@n~p?fE$TJwzi zGmRgj9XkkHweHK$FOHr}L{xmcPC-UZ?PKQv*`4RI_q^wpWeWHAfmiIGL@t=you5%7COyO&T&?RI%Zvjn%-U*J13`eNCxmVT7FcDQ7BjPjgC8b$ z&I)N!4>j!8PYw2i(@9Gbl2nBN9V-?{p@x*G_jwxPky`Mild;oy$o?juN3l|SpW2Qk zLHWj+H`LPxFNFCQy;Xq1IZ&9SZo#{%n8bOs4(Az8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uv%@Sz4)m!spBm#i7i%t(EQ3TS1FCds#9P$8h_Sr zsuovtrlce~Bf{X#iUGr?u#$%zEwW4tVy~IfWv=a_5h#TJrel_NYnI8^vEo28m4Q_n zT?~onO~1WoC?-d5Zi{Y+Ps1NmlBhJ zyRA=qU4WY&8R7k{!_8H~pXD1*QAw{q;^=0zz4PN z9vts79yV;*Qq)-APv0xtF=)LIH1gBz)pMa8huZ=6YHJQP<N&awai From 72224a392a68c8092a62a76265a0db3754bc3a5e Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 29 Oct 2022 04:52:34 +0200 Subject: [PATCH 30/39] Add more nether bulwark variations --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 7 +++++-- ...> mcl_nether_fortresses_nether_bulwark_1.mts} | Bin .../mcl_nether_fortresses_nether_bulwark_2.mts | Bin 0 -> 3818 bytes .../mcl_nether_fortresses_nether_bulwark_3.mts | Bin 0 -> 4049 bytes .../mcl_nether_fortresses_nether_bulwark_4.mts | Bin 0 -> 3380 bytes 5 files changed, 5 insertions(+), 2 deletions(-) rename mods/MAPGEN/mcl_nether_fortresses/schematics/{mcl_nether_fortresses_nether_bulwark.mts => mcl_nether_fortresses_nether_bulwark_1.mts} (100%) create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_2.mts create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_3.mts create mode 100644 mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_4.mts diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 6a2bd1e9d..ffa1ea859 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -26,7 +26,7 @@ mcl_structures.register_structure("nether_outpost",{ mcl_structures.register_structure("nether_bridge",{ place_on = {"mcl_nether:nether_lava_source","mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand","mcl_core:bedrock"}, fill_ratio = 0.01, - chunk_probability = 100, + chunk_probability = 500, flags = "all_floors", sidelen = 38, solid_ground = false, @@ -69,7 +69,10 @@ mcl_structures.register_structure("nether_bulwark",{ y_min = mcl_vars.mg_lava_nether_max - 1, y_max = mcl_vars.mg_nether_max - 30, filenames = { - modpath.."/schematics/mcl_nether_fortresses_nether_bulwark.mts" + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_1.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_2.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_3.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_4.mts", }, daughters = {{ files = { diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_1.mts similarity index 100% rename from mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark.mts rename to mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_1.mts diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_2.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_2.mts new file mode 100644 index 0000000000000000000000000000000000000000..7cf4c07225a0b83e9e4113c8c865eaf65cade04f GIT binary patch literal 3818 zcmb7E30RWZ8m5{|Gt<&6&1KZwvU0&RaiOfnDYuMqT3i?;L=wRSF-Or{Q!;JS!BH%; zY}(Ws%}Rt^sZ`W(%>|W=af@(6Mew3cV~gE8_kW)Aob!C=JMZ_N_x;ZA{1e0(@Eu?S zU=v_NpA<(>uP!qss)c-58qzM8)kb`4` z5FjKLeZmKgh5G}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qGk>$6GwLY$gABgYugGEF@gUyy+hW(k_k`P*WUtB^kHNjY4JB`~+5bqO@y$$rdO=#ND zrNHa(GIiy5mn}BDu9JmpYQckV=PDImTk7_D3->~-(0S+3<$eMp!d1Vo<5Qg$32<83 z1f#4&;3jhb6S+jm5R~LaNgd#O*Obs6BqHRZ>I4h-K^-0nYS+u*-{Y;_*WG<~F_)z! zR$qu8!8^3~HtW0(ALkCJrfJ(wTq1OIl=`Q0(TU3HyXe!wiG<2i^g4Dvq&U!@t~<3i zJXVx`S2DT=;VVKN5}Mie74GR1K&$(-T1_i_DILB^6Jqg7Ro zYiBq!WdA-sa+GJDH?nC5KN^V2vULtljEs|WuBtx2nk`*SALfyo&!{BNIM<*3OFAh4 zrc%nor)B8DxEIC`dzrPG@rp_`NxcdC*-R>c2P%HF+TtEdjA*T!9}P1)LAS~51serP zW`ea0TpOo!*^^vLrS}Pf9uwgu#N7)SCL&q0dJ7L=KN$^DFNHDoSRFH15f(}lWC@^h zel+*^ut&h=Hu(?rz}+IMuXkLrYz3gWASfoL9u?9wSjD^e!IN#OdbGz))#LhI=}Il&AV0H zDmPjNVlF2TcIv34xCiH4!yXi}*R>tg4N&7eBj14azS*O*YFqs&{PGOQN z{Hk3X8H>oeoO-WK$SNu^a!CZg*HX^bBVVggXi$HA!?oUAB-iOmKJ69uL1Hh)h}~YI z`e(y0Wo?q@`v53nSE6rHB%h$7p{|l)_J(SG;bKb4CT6`E=^nMK%Ormwt%6z0M^KIJ ziHy^fr-wVahnKNuf|B*(FIl5a4nS<56{FmwCbg?tLOb^AG^P2>=E#f)>H4&zKW}<+YaCl@?6tBPuES?x{I|bSAL7pZ)$oy xZ1*moO8^V_BMUuA+q&II3GEbJKB^nc!N{y%>ilB@s# literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_4.mts b/mods/MAPGEN/mcl_nether_fortresses/schematics/mcl_nether_fortresses_nether_bulwark_4.mts new file mode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T0VeqeZ3-ZBdg{LuApfg;z zowVi(bGOK8<%BkOr%H`Cy9RS*hz&!)N_**kT3chX{o?%dlW(nuG%{rI7yqRrcJYP@ zZMQ~Ma}ISR?Mi6vjCff~wn6-aR_u>hf|W`)u)Sw!s47$Q_|hY##e&Xw>Ce3SwF$*E zUB%fkqWzcOnaZ6i{_Mb_VDEEB?9qRgv0b}S{Xe=EXI-g2IdLaw2CD}Y;jM5zEpvVm mD`A}LSqE?D^G&i|MS7pr%`HhyN=>kJf0HQFB*+O3TKG3qS5{j9 literal 0 HcmV?d00001 From aa2661341b41b7bf01b6664b97e66585cc50c8f9 Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 29 Oct 2022 05:13:45 +0200 Subject: [PATCH 31/39] less lava springs, no ceiling lava springs --- mods/MAPGEN/mcl_biomes/init.lua | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 2d6efd641..42e572b58 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -2433,11 +2433,24 @@ local function register_dimension_ores() ore_type = "scatter", ore = "mcl_nether:nether_lava_source", wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + clust_scarcity = 13500, --rare + clust_num_ores = 1, + clust_size = 1, + y_min = mcl_vars.mg_lava_nether_max, + y_max = mcl_vars.mg_nether_max - 13, + }) + + local lava_biomes = {"BasaltDelta","Nether"} + minetest.register_ore({ + ore_type = "scatter", + ore = "mcl_nether:nether_lava_source", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 500, clust_num_ores = 1, clust_size = 1, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_lava_nether_max + 1, + biomes = lava_biomes, + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_lava_nether_max + 1, }) minetest.register_ore({ @@ -2447,6 +2460,7 @@ local function register_dimension_ores() clust_scarcity = 1000, clust_num_ores = 1, clust_size = 1, + biomes = lava_biomes, y_min = mcl_vars.mg_lava_nether_max + 2, y_max = mcl_vars.mg_lava_nether_max + 12, }) @@ -2458,6 +2472,7 @@ local function register_dimension_ores() clust_scarcity = 2000, clust_num_ores = 1, clust_size = 1, + biomes = lava_biomes, y_min = mcl_vars.mg_lava_nether_max + 13, y_max = mcl_vars.mg_lava_nether_max + 48, }) @@ -2468,8 +2483,9 @@ local function register_dimension_ores() clust_scarcity = 3500, clust_num_ores = 1, clust_size = 1, + biomes = lava_biomes, y_min = mcl_vars.mg_lava_nether_max + 49, - y_max = mcl_vars.mg_nether_max, + y_max = mcl_vars.mg_nether_max - 13, }) --[[ THE END ]] From f324e150ea05ff62818d4a92a9c79bcf1a48e5af Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 29 Oct 2022 11:49:56 +0200 Subject: [PATCH 32/39] Don't generate glowstone in the ceiling --- mods/MAPGEN/mcl_biomes/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 42e572b58..c3a53ea0d 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -2370,7 +2370,7 @@ local function register_dimension_ores() clust_scarcity = 26 * 26 * 26, clust_size = 5, y_min = mcl_vars.mg_lava_nether_max + 10, - y_max = mcl_vars.mg_nether_max, + y_max = mcl_vars.mg_nether_max - 13, noise_threshold = 0.0, noise_params = { offset = 0.5, From d393e6a18138e7a37730aafdfe169526477a6486 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 30 Oct 2022 01:54:33 +0200 Subject: [PATCH 33/39] fix single mob spawning and poutpost walls --- mods/MAPGEN/mcl_structures/api.lua | 2 +- mods/MAPGEN/mcl_structures/pillager_outpost.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 9918031f8..76ef9bdee 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -232,7 +232,7 @@ function mcl_structures.spawn_mobs(mob,spawnon,p1,p2,pr,n) local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) table.shuffle(sp) for i,node in pairs(sp) do - if not peaceful and i < n then + if not peaceful and i <= n then local pos = vector.offset(node,0,1,0) if pos then minetest.add_entity(pos,mob) diff --git a/mods/MAPGEN/mcl_structures/pillager_outpost.lua b/mods/MAPGEN/mcl_structures/pillager_outpost.lua index 5f25a839d..419364bab 100644 --- a/mods/MAPGEN/mcl_structures/pillager_outpost.lua +++ b/mods/MAPGEN/mcl_structures/pillager_outpost.lua @@ -60,8 +60,9 @@ mcl_structures.register_structure("pillager_outpost",{ after_place = function(p,def,pr) local p1 = vector.offset(p,-7,0,-7) local p2 = vector.offset(p,7,14,7) - mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5) mcl_structures.spawn_mobs("mobs_mc:evoker",spawnon,p1,p2,pr,1) + mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5) + mcl_structures.construct_nodes(p1,p2,{"group:wall"}) end }) From 21f5586669d1ff8a24f04d1acb0824abe5e3d3ca Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 30 Oct 2022 02:21:35 +0200 Subject: [PATCH 34/39] Fix strider spawning --- mods/ENTITIES/mobs_mc/strider.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/strider.lua b/mods/ENTITIES/mobs_mc/strider.lua index efb907983..12568b8a5 100644 --- a/mods/ENTITIES/mobs_mc/strider.lua +++ b/mods/ENTITIES/mobs_mc/strider.lua @@ -211,7 +211,11 @@ mcl_mobs:spawn_setup({ type_of_spawning = "lava", dimension = "nether", biomes = { - "Nether" + "Nether", + "BasaltDelta", + "WarpedForest", + "CrimsonForest", + "SoulsandValley" }, min_height = mcl_vars.mg_nether_min, max_height = mcl_vars.mg_nether_max, @@ -223,7 +227,11 @@ mcl_mobs:spawn_setup({ type_of_spawning = "lava", dimension = "nether", biomes = { - "Nether" + "Nether", + "BasaltDelta", + "WarpedForest", + "CrimsonForest", + "SoulsandValley" }, min_height = mcl_vars.mg_nether_min, max_height = mcl_vars.mg_nether_max, From 3629f88dc05febadf3c21754973a026fa326003a Mon Sep 17 00:00:00 2001 From: cora Date: Mon, 31 Oct 2022 01:15:37 +0100 Subject: [PATCH 35/39] Make strider usable --- mods/ENTITIES/mobs_mc/strider.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/strider.lua b/mods/ENTITIES/mobs_mc/strider.lua index 12568b8a5..65837d422 100644 --- a/mods/ENTITIES/mobs_mc/strider.lua +++ b/mods/ENTITIES/mobs_mc/strider.lua @@ -90,9 +90,12 @@ local strider = { -- if driver present allow control of horse if self.driver then - + local pos = self.object:get_pos() + local v = self.object:get_velocity() + self.object:set_velocity(vector.new(v.x,0,v.z)) mcl_mobs.drive(self, "walk", "stand", false, dtime) - + local l = minetest.find_node_near(pos,2,{"group:lava"}) + if l then self.object:set_pos(vector.new(pos.x,l.y+0.5,pos.z)) end return false -- skip rest of mob functions end From 009ca7535c69cc42a33aaa414a011e6dab8c9780 Mon Sep 17 00:00:00 2001 From: cora Date: Tue, 1 Nov 2022 03:27:34 +0100 Subject: [PATCH 36/39] Add nether outpost with bridges just via spawnstruct for now --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 56 ++++++++++++++++++---- mods/MAPGEN/mcl_structures/api.lua | 9 ++-- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index ffa1ea859..77561e6f2 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -22,7 +22,12 @@ mcl_structures.register_structure("nether_outpost",{ mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) end }) - +local nbridges = { + modpath.."/schematics/mcl_nether_fortresses_nether_bridge_1.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bridge_2.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bridge_3.mts", + modpath.."/schematics/mcl_nether_fortresses_nether_bridge_4.mts", +} mcl_structures.register_structure("nether_bridge",{ place_on = {"mcl_nether:nether_lava_source","mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand","mcl_core:bedrock"}, fill_ratio = 0.01, @@ -33,12 +38,7 @@ mcl_structures.register_structure("nether_bridge",{ make_foundation = false, y_min = mcl_vars.mg_nether_min - 4, y_max = mcl_vars.mg_lava_nether_max - 20, - filenames = { - modpath.."/schematics/mcl_nether_fortresses_nether_bridge_1.mts", - modpath.."/schematics/mcl_nether_fortresses_nether_bridge_2.mts", - modpath.."/schematics/mcl_nether_fortresses_nether_bridge_3.mts", - modpath.."/schematics/mcl_nether_fortresses_nether_bridge_4.mts", - }, + filenames = nbridges, y_offset = function(pr) return pr:next(15,20) end, after_place = function(pos,def,pr) local p1 = vector.offset(pos,-14,0,-14) @@ -47,6 +47,46 @@ mcl_structures.register_structure("nether_bridge",{ end }) +mcl_structures.register_structure("nether_outpost_with_bridges",{ + place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand","mcl_nether:nether_lava_source"}, + fill_ratio = 0.01, + chunk_probability = 1300, + flags = "all_floors", + biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest","BasaltDelta"}, + sidelen = 24, + solid_ground = true, + make_foundation = true, + y_min = mcl_vars.mg_lava_nether_max - 1, + y_max = mcl_vars.mg_nether_max - 30, + filenames = { modpath.."/schematics/mcl_nether_fortresses_nether_outpost.mts" }, + daughters = {{ + files = { nbridges[1] }, + pos = vector.new(0,-2,-24), + rot = 180, + }, + { + files = { nbridges[1] }, + pos = vector.new(0,-2,24), + rot = 0, + }, + { + files = { nbridges[1] }, + pos = vector.new(-24,-2,0), + rot = 270, + }, + { + files = { nbridges[1] }, + pos = vector.new(24,-2,0), + rot = 90, + }, + }, + after_place = function(pos,def,pr) + local sp = minetest.find_nodes_in_area(pos,vector.offset(pos,0,20,0),{"mcl_mobspawners:spawner"}) + if not sp[1] then return end + mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) + end +},true) --just for experimental purposes for now + mcl_structures.register_structure_spawn({ name = "mobs_mc:witherskeleton", y_min = mcl_vars.mg_lava_nether_max, @@ -81,7 +121,7 @@ mcl_structures.register_structure("nether_bulwark",{ modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_3.mts", modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_4.mts", }, - pos = vector.new(5,0,5), + pos = vector.new(0,0,0), }, }, y_offset = 0, diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 76ef9bdee..120cd7c7f 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -284,10 +284,11 @@ function mcl_structures.place_structure(pos, def, pr, blockseed, rot) local ap = function(pos,def,pr,blockseed) end if def.daughters then - for _,d in pairs(def.daughters) do - local p = vector.add(pp,d.pos) - ap = function(pos,def,pr,blockseed) - mcl_structures.place_schematic(pos, d.files[pr:next(1,#d.files)], rot, nil, true, "place_center_x,place_center_z",function() + ap = function(pos,def,pr,blockseed) + for _,d in pairs(def.daughters) do + local p = vector.add(pos,d.pos) + local rot = d.rot or 0 + mcl_structures.place_schematic(p, d.files[pr:next(1,#d.files)], rot, nil, true, "place_center_x,place_center_z",function() if def.loot then generate_loot(pp,def,pr,blockseed) end if def.construct_nodes then construct_nodes(pp,def,pr,blockseed) end if def.after_place then From b4cb06b5edb78c2411bd76e6512a32b21d6e53f2 Mon Sep 17 00:00:00 2001 From: cora Date: Tue, 1 Nov 2022 03:48:12 +0100 Subject: [PATCH 37/39] Tweak basalt delta floors --- mods/MAPGEN/mcl_biomes/init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index c3a53ea0d..d468ae4f4 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -5057,6 +5057,18 @@ local function register_dimension_decorations() y_max = mcl_vars.mg_nether_deco_max - 15, flags = "all_floors, all ceilings", }) + minetest.register_decoration({ + deco_type = "simple", + decoration = "mcl_blackstone:basalt", + place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + sidelen = 80, + height_max = 3, + fill_ratio = 0.4, + biomes = {"BasaltDelta"}, + y_min = mcl_vars.mg_lava_nether_max + 1, + y_max = mcl_vars.mg_nether_deco_max - 15, + flags = "all_floors, all ceilings", + }) minetest.register_decoration({ deco_type = "simple", decoration = "mcl_nether:magma", From ae9173f7ecdfb4f11753d900b892aecd58daa269 Mon Sep 17 00:00:00 2001 From: cora Date: Tue, 1 Nov 2022 04:21:47 +0100 Subject: [PATCH 38/39] Grow legs under outpost with bridges --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index 77561e6f2..bf8f9c599 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -84,13 +84,27 @@ mcl_structures.register_structure("nether_outpost_with_bridges",{ local sp = minetest.find_nodes_in_area(pos,vector.offset(pos,0,20,0),{"mcl_mobspawners:spawner"}) if not sp[1] then return end mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) + + local legs = minetest.find_nodes_in_area(vector.offset(pos,-45,-2,-45),vector.offset(pos,45,0,45), "mcl_nether:nether_brick") + local bricks = {} + for _,leg in pairs(legs) do + while minetest.get_item_group(mcl_vars.get_node(vector.offset(leg,0,-1,0), true, 333333).name, "solid") == 0 do + leg = vector.offset(leg,0,-1,0) + table.insert(bricks,leg) + end + end + minetest.bulk_set_node(bricks, {name = "mcl_nether:nether_brick", param2 = 2}) + + local p1 = vector.offset(pos,-45,13,-45) + local p2 = vector.offset(pos,45,13,45) + mcl_structures.spawn_mobs("mobs_mc:witherskeleton",{"mcl_blackstone:blackstone_chiseled_polished"},p1,p2,pr,5) end -},true) --just for experimental purposes for now +},true) mcl_structures.register_structure_spawn({ name = "mobs_mc:witherskeleton", y_min = mcl_vars.mg_lava_nether_max, - y_max = mcl_vars.mg_lava_nether_max + 32, + y_max = mcl_vars.mg_nether_max, chance = 15, interval = 60, limit = 4, From 646a341f5234b103c5874f6fb395dfd73cdf9cca Mon Sep 17 00:00:00 2001 From: cora Date: Wed, 2 Nov 2022 03:47:23 +0100 Subject: [PATCH 39/39] Fix mob api can_spawn callback --- mods/ENTITIES/mcl_mobs/spawning.lua | 4 ++-- mods/ENTITIES/mobs_mc/strider.lua | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index 9bc7a6780..d7e3deb2b 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -672,8 +672,8 @@ if mobs_spawn then return end end - if minetest.registered_entities[mob_def.name].can_spawn and not minetest.registered_entities[mob_def.name].can_spawn(pos) then - minetest.log("warning","[mcl_mobs] mob "..mob_def.name.." refused to spawn at "..minetest.pos_to_string(vector.round(pos))) + if minetest.registered_entities[mob_def.name].can_spawn and not minetest.registered_entities[mob_def.name].can_spawn(spawning_position) then + minetest.log("warning","[mcl_mobs] mob "..mob_def.name.." refused to spawn at "..minetest.pos_to_string(vector.round(spawning_position))) return end --everything is correct, spawn mob diff --git a/mods/ENTITIES/mobs_mc/strider.lua b/mods/ENTITIES/mobs_mc/strider.lua index 65837d422..8344f48da 100644 --- a/mods/ENTITIES/mobs_mc/strider.lua +++ b/mods/ENTITIES/mobs_mc/strider.lua @@ -60,6 +60,10 @@ local strider = { fire_resistant = true, floats_on_lava = 1, floats = 0, + can_spawn = function(pos) + local l = minetest.find_node_near(pos,2,{"mcl_nether:nether_lava_source","mcl_nether:nether_lava_flowing"}) + return l ~= nil + end, do_custom = function(self, dtime) if minetest.find_node_near(self.object:get_pos(), 2, {"mcl_core:lava_source","mcl_core:lava_flowing","mcl_nether:nether_lava_source","mcl_nether:nether_lava_flowing"}) then