0
0
Fork 0

Enable villager spawning.

This commit is contained in:
MysticTempest 2021-02-09 06:06:19 -06:00
parent bd1e4187a0
commit dc9ca16321
5 changed files with 18 additions and 10 deletions

View File

@ -11,7 +11,7 @@ function mobs:spawn_abm_check(pos, node, name)
elseif is_forbidden_node(pos, node) or is_forbidden_node(vector.add(pos, vector.new(0, 1, 0))) then
return true
-- Spawn on opaque or liquid nodes
elseif minetest.get_item_group(node.name, "opaque") ~= 0 or minetest.registered_nodes[node.name].liquidtype ~= "none" then
elseif minetest.get_item_group(node.name, "opaque") ~= 0 or minetest.registered_nodes[node.name].liquidtype ~= "none" or node.name == "mcl_core:grass_path" then
return false
end

View File

@ -1067,7 +1067,7 @@ mobs:register_mob("mobs_mc:villager", {
mobs:spawn_specific("mobs_mc:villager", mobs_mc.spawn.village, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 8000, 4, mobs_mc.spawn_height.water+1, mobs_mc.spawn_height.overworld_max)
mobs:spawn_specific("mobs_mc:villager", mobs_mc.spawn.village, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 20, 4, mobs_mc.spawn_height.water+1, mobs_mc.spawn_height.overworld_max)
-- spawn eggs
mobs:register_egg("mobs_mc:villager", S("Villager"), "mobs_mc_spawn_icon_villager.png", 0)

View File

@ -225,6 +225,7 @@ mobs_mc.override.spawn = {
nether_fortress = { "mcl_nether:nether_brick", "mcl_nether:netherrack" },
nether_portal = { mobs_mc.override.items.nether_portal },
wolf = { mobs_mc.override.items.grass_block, "mcl_core:dirt", "mcl_core:dirt_with_grass_snow", "mcl_core:snow", "mcl_core:snowblock", "mcl_core:podzol" },
village = { "mcl_villages:stonebrickcarved", "mcl_core:grass_path", "mcl_core:sandstonesmooth2" },
}
-- This table contains important spawn height references for the mob spawn height.

View File

@ -188,6 +188,7 @@ function settlements.place_schematics(settlement_info, pr)
local schem_lua = minetest.serialize_schematic(building,
"lua",
{lua_use_comments = false, lua_num_indent_spaces = 0}).." return(schematic)"
schem_lua = schem_lua:gsub("mcl_core:stonebrickcarved", "mcl_villages:stonebrickcarved")
-- replace material
if replace_wall then
--Note, block substitution isn't matching node names exactly; so nodes that are to be substituted that have the same prefixes cause bugs.

View File

@ -13,18 +13,24 @@ dofile(settlements.modpath.."/paths.lua")
settlements_in_world = settlements.load()
settlements.grundstellungen()
--[[ Disable custom node spawning.
--
-- register block for npc spawn
--
minetest.register_node("settlements:junglewood", {
description = "special junglewood floor",
tiles = {"default_junglewood.png"},
groups = {choppy=3, wood=2},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("mcl_villages:stonebrickcarved", {
description = ("Chiseled Stone Village Bricks"),
_doc_items_longdesc = doc.sub.items.temp.build,
tiles = {"mcl_core_stonebrick_carved.png"},
stack_max = 64,
drop = "mcl_core:stonebrickcarved",
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
--]]
--[[ Enable for testing, but use MineClone2's own spawn code if/when merging.