diff --git a/mods/MAPGEN/mcl_structures/end_city.lua b/mods/MAPGEN/mcl_structures/end_city.lua index 526f3d478..29be3ebec 100644 --- a/mods/MAPGEN/mcl_structures/end_city.lua +++ b/mods/MAPGEN/mcl_structures/end_city.lua @@ -7,7 +7,7 @@ local function spawn_shulkers(pos,def,pr,p1,p2) vl_structures.spawn_mobs("mobs_mc:shulker",spawnon,p1,p2,pr,1) local guard = minetest.find_nodes_in_area(p1,p2,{"mcl_itemframes:item_frame"}) if #guard > 0 then - minetest.add_entity(vector.offset(guard[1],0,-1.5,0),"mobs_mc:shulker") -- fixme: MCLA uses -0.5? + minetest.add_entity(vector.offset(guard[1],0,-0.5,0),"mobs_mc:shulker") -- fixme: MCLA uses -0.5? end end @@ -28,7 +28,7 @@ vl_structures.register_structure("end_shipwreck",{ after_place = function(pos,def,pr,p1,p2) local fr = minetest.find_nodes_in_area(p1,p2,{"mcl_itemframes:item_frame"}) if #fr > 0 and mcl_itemframes then - mcl_itemframes.update_item_entity(fr[1],minetest.get_node(fr)) + mcl_itemframes.update_item_entity(fr[1],minetest.get_node(fr[1])) end return spawn_shulkers(pos,def,pr,p1,p2) end, @@ -137,3 +137,52 @@ vl_structures.register_structure_spawn({ limit = 6, spawnon = spawnon, }) + +vl_structures.register_structure("small_end_city",{ + place_on = {"mcl_end:end_stone"}, + flags = "place_center_x, place_center_z, all_floors", + y_offset = 0, + chunk_probability = 30, + prepare = { foundation = 2 }, + biomes = { "End", "EndHighlands", "EndMidlands", "EndBarrens", "EndSmallIslands" }, + sidelen = 20, + filenames = { + modpath.."/schematics/mcl_structures_end_city_simple.mts", + }, + after_place = function(pos,def,pr,p1,p2) + -- not on roof + vl_structures.spawn_mobs("mobs_mc:shulker",spawnon,p1,vector.offset(p2,0,-2,0),pr,1) + end, + construct_nodes = {"mcl_chests:ender_chest_small","mcl_chests:ender_chest","mcl_brewing:stand_000","mcl_chests:violet_shulker_box_small"}, + loot = { + [ "mcl_chests:chest_small" ] ={{ + stacks_min = 2, + stacks_max = 6, + items = { + { itemstring = "mcl_mobitems:bone", weight = 20, amount_min = 4, amount_max=6 }, + { itemstring = "mcl_farming:beetroot_seeds", weight = 16, amount_min = 1, amount_max=10 }, + { itemstring = "mcl_core:gold_ingot", weight = 15, amount_min = 2, amount_max = 7 }, + { itemstring = "mcl_core:iron_ingot", weight = 15, amount_min = 4, amount_max = 8 }, + { itemstring = "mcl_core:diamond", weight = 3, amount_min = 2, amount_max = 7 }, + { itemstring = "mcl_mobitems:saddle", weight = 3, }, + { itemstring = "mcl_core:emerald", weight = 2, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_tools:pick_iron_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_tools:shovel_iron_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_tools:sword_iron_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:helmet_iron_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:chestplate_iron_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:leggings_iron_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:boots_iron_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_tools:pick_diamond_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_tools:shovel_diamond_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:helmet_diamond_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:leggings_diamond_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_armor:boots_diamond_enchanted", weight = 3,func = function(stack, pr) mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) end }, + { itemstring = "mcl_core:emerald", weight = 2, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_mobitems:iron_horse_armor", weight = 1, }, + { itemstring = "mcl_mobitems:gold_horse_armor", weight = 1, }, + { itemstring = "mcl_core:apple_gold_enchanted", weight = 2, }, + } + }} + } +}) diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_end_city_simple.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_end_city_simple.mts new file mode 100644 index 000000000..721855f05 Binary files /dev/null and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_end_city_simple.mts differ diff --git a/mods/MAPGEN/vl_structures/api.lua b/mods/MAPGEN/vl_structures/api.lua index c3e04c64b..7d1a5a8cd 100644 --- a/mods/MAPGEN/vl_structures/api.lua +++ b/mods/MAPGEN/vl_structures/api.lua @@ -12,7 +12,7 @@ local logging = true or minetest.settings:get_bool("mcl_logging_structures", tru -- FIXME: switch to vl_structures_disabled? local disabled_structures = minetest.settings:get("mcl_disabled_structures") disabled_structures = disabled_structures and disabled_structures:split(",") or {} -function mcl_structures.is_disabled(structname) +function vl_structures.is_disabled(structname) return table.indexof(disabled_structures,structname) ~= -1 end