Compare commits
3 Commits
787457595f
...
3c36131cd9
Author | SHA1 | Date |
---|---|---|
kno10 | 3c36131cd9 | |
kno10 | c4532de910 | |
kno10 | fb86aae449 |
|
@ -27,7 +27,6 @@ mcl_structures.register_structure = function(name, def, nospawn)
|
||||||
vl_structures.register_structure(name, def)
|
vl_structures.register_structure(name, def)
|
||||||
end
|
end
|
||||||
|
|
||||||
dofile(modpath.."/campsite.lua")
|
|
||||||
dofile(modpath.."/desert_temple.lua")
|
dofile(modpath.."/desert_temple.lua")
|
||||||
dofile(modpath.."/desert_well.lua")
|
dofile(modpath.."/desert_well.lua")
|
||||||
dofile(modpath.."/end_city.lua")
|
dofile(modpath.."/end_city.lua")
|
||||||
|
@ -41,7 +40,6 @@ dofile(modpath.."/ocean_temple.lua")
|
||||||
dofile(modpath.."/pillager_outpost.lua")
|
dofile(modpath.."/pillager_outpost.lua")
|
||||||
dofile(modpath.."/ruined_portal.lua")
|
dofile(modpath.."/ruined_portal.lua")
|
||||||
dofile(modpath.."/shipwrecks.lua")
|
dofile(modpath.."/shipwrecks.lua")
|
||||||
dofile(modpath.."/spider_cocoon.lua")
|
|
||||||
dofile(modpath.."/witch_hut.lua")
|
dofile(modpath.."/witch_hut.lua")
|
||||||
dofile(modpath.."/woodland_mansion.lua")
|
dofile(modpath.."/woodland_mansion.lua")
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ local spawnon = {"mcl_core:stripped_oak","mcl_stairs:slab_birchwood_top"}
|
||||||
vl_structures.register_structure("pillager_outpost",{
|
vl_structures.register_structure("pillager_outpost",{
|
||||||
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass","group:sand"},
|
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass","group:sand"},
|
||||||
flags = "place_center_x, place_center_z",
|
flags = "place_center_x, place_center_z",
|
||||||
prepare = { padding = 3, corners = 4, foundation = -8, clear = true },
|
prepare = { tolerance = 4, padding = 3, corners = 4, foundation = -8, clear = true },
|
||||||
y_offset = 0,
|
y_offset = 0,
|
||||||
chunk_probability = 15,
|
chunk_probability = 15,
|
||||||
y_max = mcl_vars.mg_overworld_max,
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
@ -57,8 +57,10 @@ vl_structures.register_structure("pillager_outpost",{
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
after_place = function(p,_,pr) -- fixme: use p1, p2 from the callback?
|
after_place = function(p,_,pr,p1,p2)
|
||||||
local p1, p2 = vector.offset(p,-9,0,-9), vector.offset(p,9,32,9)
|
for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do
|
||||||
|
mcl_walls.update_wall(n)
|
||||||
|
end
|
||||||
vl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5)
|
vl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5)
|
||||||
vl_structures.spawn_mobs("mobs_mc:parrot",{"mesecons_pressureplates:pressure_plate_stone_off"},p1,p2,pr,3)
|
vl_structures.spawn_mobs("mobs_mc:parrot",{"mesecons_pressureplates:pressure_plate_stone_off"},p1,p2,pr,3)
|
||||||
vl_structures.spawn_mobs("mobs_mc:iron_golem",{"mesecons_button:button_stone_off"},p1,p2,pr,1)
|
vl_structures.spawn_mobs("mobs_mc:iron_golem",{"mesecons_button:button_stone_off"},p1,p2,pr,1)
|
||||||
|
|
|
@ -71,10 +71,10 @@ vl_structures.register_structure("shipwreck",{
|
||||||
place_on = {"group:sand","mcl_core:gravel"},
|
place_on = {"group:sand","mcl_core:gravel"},
|
||||||
spawn_by = {"group:water"},
|
spawn_by = {"group:water"},
|
||||||
num_spawn_by = 4,
|
num_spawn_by = 4,
|
||||||
chunk_probability = 15,
|
chunk_probability = 20,
|
||||||
biomes = ocean_biomes,
|
biomes = ocean_biomes,
|
||||||
y_min = mcl_vars.mg_overworld_min,
|
y_min = mcl_vars.mg_overworld_min,
|
||||||
y_max = water_level-4,
|
y_max = water_level-5,
|
||||||
y_offset = function(pr) return pr:next(-3,-1) end,
|
y_offset = function(pr) return pr:next(-3,-1) end,
|
||||||
flags = "place_center_x, place_center_z, force_placement",
|
flags = "place_center_x, place_center_z, force_placement",
|
||||||
prepare = { tolerance = -1, clear = false, foundation = false, mode = "water" },
|
prepare = { tolerance = -1, clear = false, foundation = false, mode = "water" },
|
||||||
|
|
|
@ -6,7 +6,7 @@ local spawnon = {"mcl_deepslate:deepslate","mcl_core:birchwood","mcl_wool:red_ca
|
||||||
vl_structures.register_structure("woodland_cabin",{
|
vl_structures.register_structure("woodland_cabin",{
|
||||||
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"},
|
||||||
flags = "place_center_x, place_center_z",
|
flags = "place_center_x, place_center_z",
|
||||||
prepare = { padding = 2, corners = 5, foundation = true, clear = true, clear_top = 2 },
|
prepare = { tolerance = 3, padding = 2, corners = 5, foundation = -5, clear = true, clear_top = 2 },
|
||||||
force_placement = false,
|
force_placement = false,
|
||||||
chunk_probability = 20,
|
chunk_probability = 20,
|
||||||
y_max = mcl_vars.mg_overworld_max,
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
|
|
@ -219,9 +219,10 @@ function mcl_villages.place_schematics(sminp, smaxp, settlement, blockseed, pr)
|
||||||
|
|
||||||
-- Path planning and placement
|
-- Path planning and placement
|
||||||
mcl_villages.paths(blockseed, minetest.get_biome_name(minetest.get_biome_data(bell_pos).biome), sminp, smaxp)
|
mcl_villages.paths(blockseed, minetest.get_biome_name(minetest.get_biome_data(bell_pos).biome), sminp, smaxp)
|
||||||
mcl_villages.clean_no_paths(sminp, smaxp)
|
|
||||||
-- Clean up paths and initialize nodes
|
-- Clean up paths and initialize nodes
|
||||||
|
mcl_villages.clean_no_paths(sminp, smaxp) -- sometimes does not work?
|
||||||
for i, building in ipairs(settlement) do
|
for i, building in ipairs(settlement) do
|
||||||
|
mcl_villages.clean_no_paths(building.minp, building.maxp)
|
||||||
init_nodes(building.minp, building.maxp, pr)
|
init_nodes(building.minp, building.maxp, pr)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ local swap_node = core.swap_node
|
||||||
-- 3rd is the pos of the end points
|
-- 3rd is the pos of the end points
|
||||||
local path_ends = {}
|
local path_ends = {}
|
||||||
|
|
||||||
-- note: not using LVM here, as this runs after the pathfinder
|
|
||||||
-- simple function to increase "no_paths" walls
|
-- simple function to increase "no_paths" walls
|
||||||
function mcl_villages.clean_no_paths(minp, maxp)
|
function mcl_villages.clean_no_paths(minp, maxp)
|
||||||
local no_paths_nodes = minetest.find_nodes_in_area(minp, maxp, { "mcl_villages:no_paths" })
|
local no_paths_nodes = minetest.find_nodes_in_area(minp, maxp, { "mcl_villages:no_paths" })
|
||||||
|
@ -21,7 +20,6 @@ function mcl_villages.clean_no_paths(minp, maxp)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- this can still run in LVM
|
|
||||||
-- simple function to increase "no_paths" walls
|
-- simple function to increase "no_paths" walls
|
||||||
function mcl_villages.increase_no_paths(minp, maxp)
|
function mcl_villages.increase_no_paths(minp, maxp)
|
||||||
local p = vector.zero()
|
local p = vector.zero()
|
||||||
|
|
|
@ -8,6 +8,7 @@ vl_structures.register_structure("campsite",{
|
||||||
y_max = mcl_vars.mg_overworld_max,
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
y_min = 1,
|
y_min = 1,
|
||||||
prepare = { tolerance = 1, foundation = -2, clear_top = 1, padding = 1, corners = 1 }, -- low tolerance, perform little terraforming
|
prepare = { tolerance = 1, foundation = -2, clear_top = 1, padding = 1, corners = 1 }, -- low tolerance, perform little terraforming
|
||||||
|
biomes = { "Forest", "FlowerForest", "Plains", "SunflowerPlains", "Savanna", "SavannaM", "Taiga", "ColdTaiga" },
|
||||||
filenames = {
|
filenames = {
|
||||||
modpath.."/schematics/campsite_1.mts"
|
modpath.."/schematics/campsite_1.mts"
|
||||||
},
|
},
|
||||||
|
@ -67,5 +68,6 @@ vl_structures.register_structure("campsite",{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
-- TODO: spawn a band of pillagers?
|
||||||
})
|
})
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
local modname = minetest.get_current_modname()
|
||||||
|
local modpath = minetest.get_modpath(modname)
|
||||||
|
|
||||||
|
dofile(modpath.."/campsite.lua")
|
||||||
|
dofile(modpath.."/obelisks.lua")
|
||||||
|
dofile(modpath.."/spider_cocoon.lua")
|
||||||
|
dofile(modpath.."/witches_circle.lua")
|
|
@ -0,0 +1,4 @@
|
||||||
|
name = vl_extra_structures
|
||||||
|
author = kno10
|
||||||
|
description = Some additional decorative structures
|
||||||
|
depends = mcl_init, mcl_util, mcl_loot, vl_terraforming, vl_structures
|
|
@ -0,0 +1,52 @@
|
||||||
|
local modname = minetest.get_current_modname()
|
||||||
|
local modpath = minetest.get_modpath(modname)
|
||||||
|
|
||||||
|
vl_structures.register_structure("obelisk_sand",{
|
||||||
|
place_on = {"group:sand"},
|
||||||
|
flags = "place_center_x, place_center_z",
|
||||||
|
chunk_probability = 12,
|
||||||
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
y_min = 1,
|
||||||
|
y_offset = -3,
|
||||||
|
prepare = { tolerance=3, padding = 0, clear=false },
|
||||||
|
biomes = { "Desert" },
|
||||||
|
filenames = {
|
||||||
|
modpath.."/schematics/obelisk_sand_1.mts",
|
||||||
|
modpath.."/schematics/obelisk_sand_2.mts",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vl_structures.register_structure("obelisk_light",{
|
||||||
|
place_on = {"group:sand"},
|
||||||
|
flags = "place_center_x, place_center_z",
|
||||||
|
chunk_probability = 25,
|
||||||
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
y_min = 1,
|
||||||
|
y_offset = -2,
|
||||||
|
prepare = { tolerance=2, padding = 0, clear=false },
|
||||||
|
biomes = { "Desert" },
|
||||||
|
filenames = {
|
||||||
|
modpath.."/schematics/obelisk_fire.mts",
|
||||||
|
},
|
||||||
|
after_place = function(p,_,pr,p1,p2)
|
||||||
|
for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do
|
||||||
|
mcl_walls.update_wall(n)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vl_structures.register_structure("obelisk_cobble",{
|
||||||
|
place_on = {"group:grass_block", "group:dirt"},
|
||||||
|
flags = "place_center_x, place_center_z",
|
||||||
|
chunk_probability = 25,
|
||||||
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
y_min = 1,
|
||||||
|
y_offset = -2,
|
||||||
|
prepare = { tolerance=2, padding=0, clear=false },
|
||||||
|
biomes = { "Plains", "SunflowerPlains", "Forest", "FlowerForest", "BrichForest", "Taiga", "RoofedForest", "MegaTaiga", "MegaSpruceTaiga", },
|
||||||
|
filenames = {
|
||||||
|
modpath.."/schematics/obelisk_cobble.mts",
|
||||||
|
modpath.."/schematics/obelisk_cobble_broken.mts",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,43 @@
|
||||||
|
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)
|
||||||
|
|
||||||
|
local function spawn_witch(pos,def,pr,p1,p2)
|
||||||
|
local c = minetest.find_node_near(p1,15,{"mcl_cauldrons:cauldron"})
|
||||||
|
if c then
|
||||||
|
local nn = minetest.find_nodes_in_area_under_air(vector.new(p1.x,c.y-1,p1.z),vector.new(p2.x,c.y-1,p2.z),{"group:stone"})
|
||||||
|
local witch
|
||||||
|
if not peaceful then
|
||||||
|
witch = minetest.add_entity(vector.offset(nn[math.random(#nn)],0,1,0),"mobs_mc:witch"):get_luaentity()
|
||||||
|
witch._home = c
|
||||||
|
witch.can_despawn = false
|
||||||
|
end
|
||||||
|
local catobject = minetest.add_entity(vector.offset(nn[math.random(#nn)],0,1,0),"mobs_mc:cat")
|
||||||
|
if catobject and catobject:get_pos() then
|
||||||
|
local cat=catobject:get_luaentity()
|
||||||
|
cat.object:set_properties({textures = {"mobs_mc_cat_black.png"}})
|
||||||
|
cat.owner = "!witch!" --so it's not claimable by player
|
||||||
|
cat._home = c
|
||||||
|
cat.can_despawn = false
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vl_structures.register_structure("witches_circle",{
|
||||||
|
place_on = {"group:grass_block", "group:dirt", "mclx_core:river_water_source"},
|
||||||
|
flags = "place_center_x, place_center_z, all_surfaces",
|
||||||
|
chunk_probability = 14,
|
||||||
|
prepare = { tolerance=4, clear_bottom=1, clear_top=-1, padding=0, corners=3, foundation=-2 },
|
||||||
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
y_min = 1,
|
||||||
|
y_offset = -1,
|
||||||
|
force_placement = false,
|
||||||
|
biomes = { "Swampland", "Swampland_shore", "RoofedForest", },
|
||||||
|
filenames = { modpath.."/schematics/witch_circle.mts" },
|
||||||
|
construct_nodes = {"group:wall"}, -- fix wall orientation
|
||||||
|
after_place = spawn_witch,
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue