From 84691c393d83e6ebbf4603d6e8f4c32c35e07b21 Mon Sep 17 00:00:00 2001 From: PrairieWind Date: Sun, 7 Aug 2022 20:50:26 -0600 Subject: [PATCH 1/2] Pillager Outpost, Schematics by RandomLegoBrick --- mods/MAPGEN/mcl_structures/init.lua | 2 +- .../mcl_structures/pillager_outpost.lua | 67 ++++++++++++++++++ .../mcl_structures_pillager_outpost.mts | Bin 0 -> 1601 bytes 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 mods/MAPGEN/mcl_structures/pillager_outpost.lua create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_pillager_outpost.mts diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 44d21cd96..e0186b88a 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -246,7 +246,7 @@ dofile(modpath.."/igloo.lua") dofile(modpath.."/woodland_mansion.lua") dofile(modpath.."/ruined_portal.lua") dofile(modpath.."/geode.lua") - +dofile(modpath.."/pillager_outpost.lua") mcl_structures.register_structure("desert_well",{ diff --git a/mods/MAPGEN/mcl_structures/pillager_outpost.lua b/mods/MAPGEN/mcl_structures/pillager_outpost.lua new file mode 100644 index 000000000..28c938cff --- /dev/null +++ b/mods/MAPGEN/mcl_structures/pillager_outpost.lua @@ -0,0 +1,67 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local modpath = minetest.get_modpath(modname) + +mcl_structures.register_structure("pillager_outpost",{ + place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass","group:sand"}, + fill_ratio = 0.01, + flags = "place_center_x, place_center_z", + solid_ground = true, + make_foundation = true, + sidelen = 18, + y_offset = 0, + chunk_probability = 200, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + biomes = { "Desert", "Plains", "Savanna", "IcePlains", "Taiga" }, + filenames = { modpath.."/schematics/mcl_structures_pillager_outpost.mts" }, + loot = { + ["mcl_chests:chest_small" ] ={ + { + stacks_min = 2, + stacks_max = 3, + items = { + { itemstring = "mcl_farming:wheat_item", weight = 7, amount_min = 3, amount_max=5 }, + { itemstring = "mcl_farming:carrot_item", weight = 5, amount_min = 3, amount_max=5 }, + { itemstring = "mcl_farming:potato_item", weight = 5, amount_min = 2, amount_max=5 }, + } + }, + { + stacks_min = 1, + stacks_max = 2, + items = { + { itemstring = "mcl_experience:bottle", weight = 6, amount_min = 0, amount_max=1 }, + { itemstring = "mcl_bows:arrow", weight = 4, amount_min = 2, amount_max=7 }, + { itemstring = "mcl_mobitems:string", weight = 4, amount_min = 1, amount_max=6 }, + { itemstring = "mcl_core:iron_ingot", weight = 3, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_books:book", weight = 1, func = function(stack, pr) + mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) + end }, + } + }, + { + stacks_min = 1, + stacks_max = 3, + items = { + { itemstring = "mcl_core:darktree", amount_min = 2, amount_max=3 }, + } + }, + { + stacks_min = 1, + stacks_max = 1, + items = { + { itemstring = "mcl_bows:crossbow" }, + } + }} + }, + after_place = function (p,def,pr) + local p1 = vector.offset(p,-5,0,-5) + local p2 = vector.offset(p,-5,14,-5) + 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 + end +}) diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_pillager_outpost.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_pillager_outpost.mts new file mode 100644 index 0000000000000000000000000000000000000000..35424ad76d38c7262cd2aca076a0917fa0f6b9f5 GIT binary patch literal 1601 zcmeYb3HD`RVc=yDWZGH&!oOojfIUI^eFvN^O5@bkPYF=_`u~kZ9QFeTOVm5?Nj3bN~ zq(J&}67xz@i}H%Cpp5vmoc#PE22qe)a(+=N(3?e>1qG=oAk!K6;lj!JNl7`W3?guW z-2CF=N~kCiVPMLj0@4Z(9;^XnXhe)pEExpht^kEYNl|JlYE0!MCdI>K;*&r@Rgz!8 zAOq5c;s4~+%$&@;bVwATMm5xIun7zjAl)!|m<8qe`6)zs%z!}*?B*B!K9FV2@1iAId7wQs}~vYtkcLTP`G#Qid*$*8AF$w z*TiKnOe`;|yqd1n8)LfZzIcsHsPCzX5rBRwo}9KVk4LXxZ}{h0`sr@jaRRX&d zyLRSl!OYLcm5xgnOjmwieT6r>b;JG>M^_xWXgAsNz{%B|hTngDvph1R*!@w(v!b#i znx(M<#fI|F($BrOp0;!U+fu3Gl4%TAGPZkuyk=mfUu=HxTJM*zn0o0Le!CmLRC{)M zMLhS~bnfo1jKsNz@7&yz$-95i$JO!tr|%q%cr@ek+j`5=b?nXpanHA~$NSElywiPc z@xr~T^F+_LS+00I^YVh7VSch}w{JLevnn%xWnD^sq~$fQPoAF={_Rz*cy=ySHCb}I zR<@Q~a2Y62U)G+JKfLjy^kLig#iCX7XJ4z5NWT9(;nm-^~% zTGyJd?^mBZ5b@M_$|+0dnX`79&Rxi$Rh;)ST`jkKvZXNZhH!&ft4@EORJ6gOCR;(! zu1;UxfbF$UQifwVd}TJ zfA`k4#C)D3Z58ix?%b6|K~tN9KeAbl{|)eJ7T)DD!&%MZkMm{G)74?;jCAc&oo?19 z)jyhh*`|v(!8E_&+_Z#*8T%JMP_J{J)SGJdai-@ViRbf7qyL?;a!>azskLBQ$UDO* PzN&pw+#lwq$r4Ne9xKEr literal 0 HcmV?d00001 From 70277276b05bf547725a389202ceeff42e3f8874 Mon Sep 17 00:00:00 2001 From: PrairieWind Date: Tue, 9 Aug 2022 10:30:36 -0600 Subject: [PATCH 2/2] Adjusted spawn chance and fixed the walls on generation, thanks cora. --- mods/MAPGEN/mcl_structures/pillager_outpost.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/MAPGEN/mcl_structures/pillager_outpost.lua b/mods/MAPGEN/mcl_structures/pillager_outpost.lua index 28c938cff..596aa66c7 100644 --- a/mods/MAPGEN/mcl_structures/pillager_outpost.lua +++ b/mods/MAPGEN/mcl_structures/pillager_outpost.lua @@ -10,7 +10,7 @@ mcl_structures.register_structure("pillager_outpost",{ make_foundation = true, sidelen = 18, y_offset = 0, - chunk_probability = 200, + chunk_probability = 600, y_max = mcl_vars.mg_overworld_max, y_min = 1, biomes = { "Desert", "Plains", "Savanna", "IcePlains", "Taiga" }, @@ -54,9 +54,9 @@ mcl_structures.register_structure("pillager_outpost",{ } }} }, - after_place = function (p,def,pr) - local p1 = vector.offset(p,-5,0,-5) - local p2 = vector.offset(p,-5,14,-5) + after_place = function(p,def,pr) + local p1 = vector.offset(p,-7,0,-7) + local p2 = vector.offset(p,7,14,7) 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