mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Merge pull request 'Several mob spawning and mob api fixes' (#2452) from mob_fixes into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2452 Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
commit
396b65ca04
27 changed files with 124 additions and 97 deletions
|
@ -1905,11 +1905,10 @@ local specific_attack = function(list, what)
|
|||
return false
|
||||
end
|
||||
|
||||
-- monster find someone to attack
|
||||
-- find someone to attack
|
||||
local monster_attack = function(self)
|
||||
|
||||
if self.type ~= "monster"
|
||||
or not damage_enabled
|
||||
if not damage_enabled
|
||||
or minetest.is_creative_enabled("")
|
||||
or self.passive
|
||||
or self.state == "attack"
|
||||
|
@ -1927,10 +1926,9 @@ local monster_attack = function(self)
|
|||
for n = 1, #objs do
|
||||
|
||||
if objs[n]:is_player() then
|
||||
|
||||
if mcl_mobs.invis[ objs[n]:get_player_name() ] or (not object_in_range(self, objs[n])) then
|
||||
type = ""
|
||||
else
|
||||
elseif (self.type == "monster" or self._aggro) then
|
||||
player = objs[n]
|
||||
type = "player"
|
||||
name = "player"
|
||||
|
@ -3346,11 +3344,11 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
|||
and (self.child == false or self.type == "monster")
|
||||
and hitter:get_player_name() ~= self.owner
|
||||
and not mcl_mobs.invis[ name ] then
|
||||
|
||||
if not die then
|
||||
-- attack whoever punched mob
|
||||
self.state = ""
|
||||
do_attack(self, hitter)
|
||||
self._aggro= true
|
||||
end
|
||||
|
||||
-- alert others to the attack
|
||||
|
@ -3362,7 +3360,6 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
|||
obj = objs[n]:get_luaentity()
|
||||
|
||||
if obj then
|
||||
|
||||
-- only alert members of same mob or friends
|
||||
if obj.group_attack
|
||||
and obj.state ~= "attack"
|
||||
|
@ -3372,6 +3369,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
|||
elseif type(obj.group_attack) == "table" then
|
||||
for i=1, #obj.group_attack do
|
||||
if obj.name == obj.group_attack[i] then
|
||||
obj._aggro = true
|
||||
do_attack(obj, hitter)
|
||||
break
|
||||
end
|
||||
|
@ -4037,6 +4035,7 @@ minetest.register_entity(name, {
|
|||
fire_damage_resistant = def.fire_damage_resistant or false,
|
||||
ignited_by_sunlight = def.ignited_by_sunlight or false,
|
||||
spawn_in_group = def.spawn_in_group,
|
||||
spawn_in_group_min = def.spawn_in_group_min,
|
||||
-- End of MCL2 extensions
|
||||
|
||||
on_spawn = def.on_spawn,
|
||||
|
|
|
@ -15,7 +15,7 @@ local math_cos = math.cos
|
|||
local math_sin = math.sin
|
||||
local math_round = function(x) return (x > 0) and math_floor(x + 0.5) or math_ceil(x - 0.5) end
|
||||
|
||||
--local vector_distance = vector.distance
|
||||
local vector_distance = vector.distance
|
||||
local vector_new = vector.new
|
||||
local vector_floor = vector.floor
|
||||
|
||||
|
@ -25,7 +25,15 @@ local table_remove = table.remove
|
|||
local pairs = pairs
|
||||
|
||||
-- range for mob count
|
||||
local aoc_range = 32
|
||||
local aoc_range = 136
|
||||
|
||||
local mob_cap = {
|
||||
monster = 70,
|
||||
animal =10,
|
||||
ambient =15,
|
||||
water = 5, --currently unused
|
||||
water_ambient = 20, --currently unused
|
||||
}
|
||||
|
||||
--do mobs spawn?
|
||||
local mobs_spawn = minetest.settings:get_bool("mobs_spawn", true) ~= false
|
||||
|
@ -153,6 +161,10 @@ local list_of_all_biomes = {
|
|||
-- dimension biome:
|
||||
|
||||
"Nether",
|
||||
"BasaltDelta",
|
||||
"CrimsonForest",
|
||||
"WarpedForest",
|
||||
"SoulsandValley",
|
||||
"End",
|
||||
|
||||
-- Overworld regular:
|
||||
|
@ -162,6 +174,8 @@ local list_of_all_biomes = {
|
|||
"Swampland",
|
||||
"Taiga",
|
||||
"ExtremeHills",
|
||||
"ExtremeHillsM",
|
||||
"ExtremeHills+_snowtop",
|
||||
"Jungle",
|
||||
"Savanna",
|
||||
"BirchForest",
|
||||
|
@ -180,7 +194,6 @@ local list_of_all_biomes = {
|
|||
"ExtremeHills+_snowtop",
|
||||
"MesaPlateauFM_grasstop",
|
||||
"JungleEdgeM",
|
||||
"ExtremeHillsM",
|
||||
"JungleM",
|
||||
"BirchForestM",
|
||||
"MesaPlateauF",
|
||||
|
@ -189,17 +202,29 @@ local list_of_all_biomes = {
|
|||
"MesaBryce",
|
||||
"JungleEdge",
|
||||
"SavannaM",
|
||||
"Nether",
|
||||
"WarpedForest",
|
||||
"SoulsandValley"
|
||||
}
|
||||
|
||||
-- count how many mobs are in an area
|
||||
local function count_mobs(pos)
|
||||
local function count_mobs(pos,r,mob_type)
|
||||
local num = 0
|
||||
for _,object in pairs(get_objects_inside_radius(pos, aoc_range)) do
|
||||
if object and object:get_luaentity() and object:get_luaentity().is_mob then
|
||||
num = num + 1
|
||||
for _,l in pairs(minetest.luaentities) do
|
||||
if l and l.is_mob and (mob_type == nil or l.type == mob_type) then
|
||||
local p = l.object:get_pos()
|
||||
if p and vector_distance(p,pos) < r then
|
||||
num = num + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return num
|
||||
end
|
||||
|
||||
local function count_mobs_total(mob_type)
|
||||
local num = 0
|
||||
for _,l in pairs(minetest.luaentities) do
|
||||
if l.is_mob then
|
||||
if mob_type == nil or l.type == mob_type then
|
||||
num = num + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return num
|
||||
|
@ -292,7 +317,7 @@ function mcl_mobs:spawn_setup(def)
|
|||
spawn_dictionary[#spawn_dictionary + 1] = {
|
||||
name = name,
|
||||
dimension = dimension,
|
||||
type_of_spawning = type_of_spawning,
|
||||
type_of_spawning = type_of_spawning,
|
||||
biomes = biomes,
|
||||
min_light = min_light,
|
||||
max_light = max_light,
|
||||
|
@ -386,22 +411,45 @@ local function get_water_spawn(p)
|
|||
end
|
||||
end
|
||||
|
||||
local function spawn_group(p,mob,spawn_on,group_max)
|
||||
local nn = minetest.find_nodes_in_area(vector.offset(p,-3,-3,-3),vector.offset(p,3,3,3),spawn_on)
|
||||
local dbg_spawn_attempts = 0
|
||||
local dbg_spawn_succ = 0
|
||||
|
||||
local function spawn_group(p,mob,spawn_on,group_max,group_min)
|
||||
if not group_min then group_min = 1 end
|
||||
local nn= minetest.find_nodes_in_area_under_air(vector.offset(p,-5,-3,-5),vector.offset(p,5,3,5),spawn_on)
|
||||
local o
|
||||
if not nn or #nn < 1 then
|
||||
nn = {}
|
||||
table.insert(nn,p)
|
||||
end
|
||||
for i = 1, math.random(group_max) do
|
||||
minetest.add_entity(nn[math.random(#nn)],mob)
|
||||
for i = 1, math.random(group_min,group_max) do
|
||||
local sp = vector.offset(nn[math.random(#nn)],0,1,0)
|
||||
if mob.type_of_spawning == "water" then
|
||||
sp = get_water_spawn(sp)
|
||||
end
|
||||
o = minetest.add_entity(sp,mob.name)
|
||||
if o then dbg_spawn_succ = dbg_spawn_succ + 1 end
|
||||
end
|
||||
return o
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("mobstats",{
|
||||
privs = { debug = true },
|
||||
func = function(n,param)
|
||||
local pos = minetest.get_player_by_name(n):get_pos()
|
||||
minetest.chat_send_player(n,"mobs within 32 radius of player:"..count_mobs(pos,32))
|
||||
minetest.chat_send_player(n,"total mobs:"..count_mobs_total())
|
||||
minetest.chat_send_player(n,"spawning attempts since server start:"..dbg_spawn_attempts)
|
||||
minetest.chat_send_player(n,"successful spawns since server start:"..dbg_spawn_succ)
|
||||
end
|
||||
})
|
||||
|
||||
if mobs_spawn then
|
||||
|
||||
local perlin_noise
|
||||
|
||||
local function spawn_a_mob(pos, dimension, y_min, y_max)
|
||||
dbg_spawn_attempts = dbg_spawn_attempts + 1
|
||||
local dimension = dimension or mcl_worlds.pos_to_dimension(pos)
|
||||
local goal_pos = get_next_mob_spawn_pos(pos)
|
||||
local spawning_position_list = find_nodes_in_area_under_air(
|
||||
|
@ -412,9 +460,6 @@ if mobs_spawn then
|
|||
if #spawning_position_list <= 0 then return end
|
||||
local spawning_position = spawning_position_list[math_random(1, #spawning_position_list)]
|
||||
|
||||
--hard code mob limit in area to 5 for now
|
||||
if count_mobs(spawning_position) >= 5 then return end
|
||||
|
||||
local gotten_node = get_node(spawning_position).name
|
||||
local gotten_biome = minetest.get_biome_data(spawning_position)
|
||||
if not gotten_node or not gotten_biome then return end
|
||||
|
@ -429,6 +474,7 @@ if mobs_spawn then
|
|||
local is_water = get_item_group(gotten_node, "water") ~= 0
|
||||
local is_lava = get_item_group(gotten_node, "lava") ~= 0
|
||||
local is_leaf = get_item_group(gotten_node, "leaves") ~= 0
|
||||
local is_bedrock = gotten_node == "mcl_core:bedrock"
|
||||
local is_ground = not (is_water or is_lava)
|
||||
local is_grass = minetest.get_item_group(gotten_node,"grass_block") ~= 0
|
||||
local has_bed = minetest.find_node_near(pos,25,{"group:bed"})
|
||||
|
@ -461,8 +507,12 @@ if mobs_spawn then
|
|||
end
|
||||
local mob_def = mob_library_worker_table[mob_index]
|
||||
local mob_type = minetest.registered_entities[mob_def.name].type
|
||||
local spawn_in_group = minetest.registered_entities[mob_def.name].spawn_in_group
|
||||
local spawn_in_group = minetest.registered_entities[mob_def.name].spawn_in_group or 4
|
||||
local mob_count_wide = count_mobs(pos,aoc_range,mob_type)
|
||||
local mob_count = count_mobs(spawning_position,32,mob_type)
|
||||
if mob_def
|
||||
and mob_count_wide < (mob_cap[mob_type] or 15)
|
||||
and mob_count < 5
|
||||
and spawning_position.y >= mob_def.min_height
|
||||
and spawning_position.y <= mob_def.max_height
|
||||
and mob_def.dimension == dimension
|
||||
|
@ -475,6 +525,7 @@ if mobs_spawn then
|
|||
and (not is_farm_animal(mob_def.name) or is_grass)
|
||||
and (mob_type ~= "npc" or has_bed)
|
||||
and (mob_def.type_of_spawning ~= "water" or is_water)
|
||||
and not is_bedrock
|
||||
then
|
||||
if mob_def.type_of_spawning == "water" then
|
||||
spawning_position = get_water_spawn(spawning_position)
|
||||
|
@ -483,10 +534,13 @@ if mobs_spawn then
|
|||
end
|
||||
end
|
||||
--everything is correct, spawn mob
|
||||
local object = minetest.add_entity(spawning_position, mob_def.name)
|
||||
local object
|
||||
if spawn_in_group then
|
||||
spawn_group(spawning_position,mob_def.name,{gotten_node},spawn_in_group)
|
||||
object = spawn_group(spawning_position,mob_def,{gotten_node},spawn_in_group,spawn_in_group_min)
|
||||
else object = minetest.add_entity(spawning_position, mob_def.name)
|
||||
end
|
||||
|
||||
|
||||
if object then
|
||||
return mob_def.on_spawn and mob_def.on_spawn(object, spawning_position)
|
||||
end
|
||||
|
|
|
@ -7,6 +7,7 @@ mcl_mobs:register_mob("mobs_mc:bat", {
|
|||
type = "animal",
|
||||
spawn_class = "ambient",
|
||||
can_despawn = true,
|
||||
spawn_in_group = 8,
|
||||
passive = true,
|
||||
hp_min = 6,
|
||||
hp_max = 6,
|
||||
|
|
|
@ -16,6 +16,8 @@ mcl_mobs:register_mob("mobs_mc:blaze", {
|
|||
description = S("Blaze"),
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
spawn_in_group_min = 2,
|
||||
spawn_in_group = 3,
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
xp_min = 10,
|
||||
|
|
|
@ -122,8 +122,6 @@ mcl_mobs:spawn_specific(
|
|||
"ExtremeHills_beach",
|
||||
"ExtremeHillsM",
|
||||
"ExtremeHills+",
|
||||
"ExtremeHills+_snowtop",
|
||||
"StoneBeach",
|
||||
"Plains",
|
||||
"Plains_beach",
|
||||
"SunflowerPlains",
|
||||
|
|
|
@ -40,7 +40,8 @@ local cod = {
|
|||
xp_max = 3,
|
||||
armor = 100,
|
||||
rotate = 180,
|
||||
spawn_in_group = 10,
|
||||
spawn_in_group_min = 3,
|
||||
spawn_in_group = 8,
|
||||
tilt_swim = true,
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
|
||||
visual = "mesh",
|
||||
|
|
|
@ -83,6 +83,8 @@ mcl_mobs:register_mob("mobs_mc:cow", cow_def)
|
|||
local mooshroom_def = table.copy(cow_def)
|
||||
mooshroom_def.description = S("Mooshroom")
|
||||
mooshroom_def.mesh = "mobs_mc_cow.b3d"
|
||||
mooshroom_def.spawn_in_group_min = 4
|
||||
mooshroom_def.spawn_in_group = 8
|
||||
mooshroom_def.textures = { {"mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png"}, {"mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } }
|
||||
mooshroom_def.on_rightclick = function(self, clicker)
|
||||
if mcl_mobs:feed_tame(self, clicker, 1, true, true) then return end
|
||||
|
@ -151,17 +153,12 @@ mcl_mobs:spawn_specific(
|
|||
"ground",
|
||||
{
|
||||
"flat",
|
||||
"IcePlainsSpikes",
|
||||
"ColdTaiga",
|
||||
"ColdTaiga_beach",
|
||||
"ColdTaiga_beach_water",
|
||||
"MegaTaiga",
|
||||
"MegaSpruceTaiga",
|
||||
"ExtremeHills",
|
||||
"ExtremeHills_beach",
|
||||
"ExtremeHillsM",
|
||||
"ExtremeHills+",
|
||||
"ExtremeHills+_snowtop",
|
||||
"StoneBeach",
|
||||
"Plains",
|
||||
"Plains_beach",
|
||||
|
|
|
@ -274,7 +274,6 @@ mcl_mobs:spawn_specific(
|
|||
"Plains",
|
||||
"Desert",
|
||||
"ColdTaiga",
|
||||
"MushroomIsland",
|
||||
"IcePlainsSpikes",
|
||||
"SunflowerPlains",
|
||||
"IcePlains",
|
||||
|
@ -301,7 +300,6 @@ mcl_mobs:spawn_specific(
|
|||
"ExtremeHills_beach",
|
||||
"ColdTaiga_beach",
|
||||
"Swampland_shore",
|
||||
"MushroomIslandShore",
|
||||
"JungleM_shore",
|
||||
"Jungle_shore",
|
||||
"MesaPlateauFM_sandlevel",
|
||||
|
@ -340,7 +338,6 @@ mcl_mobs:spawn_specific(
|
|||
"Forest_deep_ocean",
|
||||
"JungleM_deep_ocean",
|
||||
"FlowerForest_deep_ocean",
|
||||
"MushroomIsland_ocean",
|
||||
"MegaTaiga_ocean",
|
||||
"StoneBeach_deep_ocean",
|
||||
"IcePlainsSpikes_deep_ocean",
|
||||
|
@ -350,7 +347,6 @@ mcl_mobs:spawn_specific(
|
|||
"MesaBryce_deep_ocean",
|
||||
"ExtremeHills+_deep_ocean",
|
||||
"ExtremeHills_ocean",
|
||||
"MushroomIsland_deep_ocean",
|
||||
"Forest_ocean",
|
||||
"MegaTaiga_deep_ocean",
|
||||
"JungleEdge_ocean",
|
||||
|
@ -376,7 +372,6 @@ mcl_mobs:spawn_specific(
|
|||
"RoofedForest_underground",
|
||||
"Jungle_underground",
|
||||
"Swampland_underground",
|
||||
"MushroomIsland_underground",
|
||||
"BirchForest_underground",
|
||||
"Plains_underground",
|
||||
"MesaPlateauF_underground",
|
||||
|
|
|
@ -30,7 +30,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
|||
--###################
|
||||
|
||||
local dolphin = {
|
||||
type = "monster",
|
||||
type = "animal",
|
||||
spawn_class = "water",
|
||||
can_despawn = true,
|
||||
passive = true,
|
||||
|
@ -42,7 +42,8 @@ local dolphin = {
|
|||
walk_chance = 100,
|
||||
breath_max = 120,
|
||||
rotate = 180,
|
||||
spawn_in_group = 3,
|
||||
spawn_in_group_min = 3,
|
||||
spawn_in_group = 5,
|
||||
tilt_swim = true,
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
|
||||
visual = "mesh",
|
||||
|
@ -136,7 +137,6 @@ mcl_mobs:spawn_specific(
|
|||
"FlowerForest_beach",
|
||||
"Forest_beach",
|
||||
"StoneBeach",
|
||||
"ColdTaiga_beach_water",
|
||||
"Taiga_beach",
|
||||
"Savanna_beach",
|
||||
"Plains_beach",
|
||||
|
|
|
@ -627,7 +627,6 @@ mcl_mobs:spawn_specific(
|
|||
"Plains",
|
||||
"Desert",
|
||||
"ColdTaiga",
|
||||
"MushroomIsland",
|
||||
"IcePlainsSpikes",
|
||||
"SunflowerPlains",
|
||||
"IcePlains",
|
||||
|
@ -654,7 +653,6 @@ mcl_mobs:spawn_specific(
|
|||
"ExtremeHills_beach",
|
||||
"ColdTaiga_beach",
|
||||
"Swampland_shore",
|
||||
"MushroomIslandShore",
|
||||
"JungleM_shore",
|
||||
"Jungle_shore",
|
||||
"MesaPlateauFM_sandlevel",
|
||||
|
@ -693,7 +691,6 @@ mcl_mobs:spawn_specific(
|
|||
"Forest_deep_ocean",
|
||||
"JungleM_deep_ocean",
|
||||
"FlowerForest_deep_ocean",
|
||||
"MushroomIsland_ocean",
|
||||
"MegaTaiga_ocean",
|
||||
"StoneBeach_deep_ocean",
|
||||
"IcePlainsSpikes_deep_ocean",
|
||||
|
@ -703,7 +700,6 @@ mcl_mobs:spawn_specific(
|
|||
"MesaBryce_deep_ocean",
|
||||
"ExtremeHills+_deep_ocean",
|
||||
"ExtremeHills_ocean",
|
||||
"MushroomIsland_deep_ocean",
|
||||
"Forest_ocean",
|
||||
"MegaTaiga_deep_ocean",
|
||||
"JungleEdge_ocean",
|
||||
|
@ -729,7 +725,6 @@ mcl_mobs:spawn_specific(
|
|||
"RoofedForest_underground",
|
||||
"Jungle_underground",
|
||||
"Swampland_underground",
|
||||
"MushroomIsland_underground",
|
||||
"BirchForest_underground",
|
||||
"Plains_underground",
|
||||
"MesaPlateauF_underground",
|
||||
|
@ -767,10 +762,10 @@ mcl_mobs:spawn_specific(
|
|||
"ground",
|
||||
{
|
||||
"Nether",
|
||||
"SoulsandValley",
|
||||
"SoulsandVall3ey",
|
||||
},
|
||||
0,
|
||||
minetest.LIGHT_MAX+1,
|
||||
11,
|
||||
30,
|
||||
27500,
|
||||
4,
|
||||
|
@ -786,7 +781,7 @@ mcl_mobs:spawn_specific(
|
|||
"WarpedForest"
|
||||
},
|
||||
0,
|
||||
minetest.LIGHT_MAX+1,
|
||||
11,
|
||||
30,
|
||||
5000,
|
||||
4,
|
||||
|
|
|
@ -23,6 +23,7 @@ mcl_mobs:register_mob("mobs_mc:ghast", {
|
|||
collisionbox = {-2, 5, -2, 2, 9, 2},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_mc_ghast.b3d",
|
||||
spawn_in_group = 1,
|
||||
textures = {
|
||||
{"mobs_mc_ghast.png"},
|
||||
},
|
||||
|
|
|
@ -8,12 +8,14 @@ mcl_mobs:register_mob("mobs_mc:guardian", {
|
|||
description = S("Guardian"),
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
spawn_in_group_min = 2,
|
||||
spawn_in_group = 4,
|
||||
hp_min = 30,
|
||||
hp_max = 30,
|
||||
xp_min = 10,
|
||||
xp_max = 10,
|
||||
breath_max = -1,
|
||||
passive = false,
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
pathfinding = 1,
|
||||
view_range = 16,
|
||||
|
|
|
@ -100,6 +100,8 @@ local horse = {
|
|||
description = S("Horse"),
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
spawn_in_group_min = 2,
|
||||
spawn_in_group = 6,
|
||||
visual = "mesh",
|
||||
mesh = "mobs_mc_horse.b3d",
|
||||
visual_size = {x=3.0, y=3.0},
|
||||
|
@ -490,6 +492,8 @@ local d = 0.86 -- donkey scale
|
|||
local donkey = table.copy(horse)
|
||||
donkey.description = S("Donkey")
|
||||
donkey.textures = {{"blank.png", "mobs_mc_donkey.png", "blank.png"}}
|
||||
donkey.spawn_in_group = 3
|
||||
donkey.spawn_in_group_min = 1
|
||||
donkey.animation = {
|
||||
speed_normal = 25,
|
||||
stand_start = 0, stand_end = 0,
|
||||
|
@ -574,7 +578,7 @@ mcl_mobs:spawn_specific(
|
|||
"Savanna_beach",
|
||||
"Plains_beach",
|
||||
},
|
||||
0,
|
||||
9,
|
||||
minetest.LIGHT_MAX+1,
|
||||
30,
|
||||
15000,
|
||||
|
|
|
@ -28,6 +28,8 @@ mcl_mobs:register_mob("mobs_mc:llama", {
|
|||
description = S("Llama"),
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
spawn_in_group_min = 4,
|
||||
spawn_in_group = 6,
|
||||
hp_min = 15,
|
||||
hp_max = 30,
|
||||
xp_min = 1,
|
||||
|
@ -217,18 +219,16 @@ mcl_mobs:spawn_specific(
|
|||
"overworld",
|
||||
"ground",
|
||||
{
|
||||
"Mesa",
|
||||
"MesaPlateauFM_grasstop",
|
||||
"MesaPlateauF",
|
||||
"MesaPlateauFM",
|
||||
"MesaPlateauF_grasstop",
|
||||
"MesaBryce",
|
||||
"Jungle",
|
||||
"Jungle_shore",
|
||||
"JungleM",
|
||||
"JungleM_shore",
|
||||
"Savanna",
|
||||
"SavannaM",
|
||||
"SavannaM_beach",
|
||||
"Savanna_beach",
|
||||
"Savanna_ocean",
|
||||
"JungleEdge",
|
||||
"JungleEdgeM",
|
||||
"ExtremeHills",
|
||||
"ExtremeHills_beach",
|
||||
"ExtremeHillsM",
|
||||
},
|
||||
0,
|
||||
minetest.LIGHT_MAX+1,
|
||||
|
|
|
@ -30,6 +30,8 @@ local ocelot = {
|
|||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
can_despawn = true,
|
||||
spawn_in_group = 3,
|
||||
spawn_in_group_min = 1,
|
||||
hp_min = 10,
|
||||
hp_max = 10,
|
||||
xp_min = 1,
|
||||
|
|
|
@ -194,17 +194,12 @@ mcl_mobs:spawn_specific(
|
|||
"ground",
|
||||
{
|
||||
"flat",
|
||||
"IcePlainsSpikes",
|
||||
"ColdTaiga",
|
||||
"ColdTaiga_beach",
|
||||
"ColdTaiga_beach_water",
|
||||
"MegaTaiga",
|
||||
"MegaSpruceTaiga",
|
||||
"ExtremeHills",
|
||||
"ExtremeHills_beach",
|
||||
"ExtremeHillsM",
|
||||
"ExtremeHills+",
|
||||
"ExtremeHills+_snowtop",
|
||||
"StoneBeach",
|
||||
"Plains",
|
||||
"Plains_beach",
|
||||
|
|
|
@ -6,9 +6,10 @@ local rabbit = {
|
|||
description = S("Rabbit"),
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
spawn_in_group_min = 2,
|
||||
spawn_in_group = 3,
|
||||
passive = true,
|
||||
reach = 1,
|
||||
|
||||
hp_min = 3,
|
||||
hp_max = 3,
|
||||
xp_min = 1,
|
||||
|
|
|
@ -346,7 +346,7 @@ mcl_mobs:spawn_specific(
|
|||
"Swampland",
|
||||
"Swampland_shore"
|
||||
},
|
||||
0,
|
||||
9,
|
||||
minetest.LIGHT_MAX+1,
|
||||
30,
|
||||
15000,
|
||||
|
|
|
@ -162,7 +162,6 @@ mcl_mobs:spawn_specific(
|
|||
"Plains",
|
||||
"Desert",
|
||||
"ColdTaiga",
|
||||
"MushroomIsland",
|
||||
"IcePlainsSpikes",
|
||||
"SunflowerPlains",
|
||||
"IcePlains",
|
||||
|
@ -189,7 +188,6 @@ mcl_mobs:spawn_specific(
|
|||
"ExtremeHills_beach",
|
||||
"ColdTaiga_beach",
|
||||
"Swampland_shore",
|
||||
"MushroomIslandShore",
|
||||
"JungleM_shore",
|
||||
"Jungle_shore",
|
||||
"MesaPlateauFM_sandlevel",
|
||||
|
@ -228,7 +226,6 @@ mcl_mobs:spawn_specific(
|
|||
"Forest_deep_ocean",
|
||||
"JungleM_deep_ocean",
|
||||
"FlowerForest_deep_ocean",
|
||||
"MushroomIsland_ocean",
|
||||
"MegaTaiga_ocean",
|
||||
"StoneBeach_deep_ocean",
|
||||
"IcePlainsSpikes_deep_ocean",
|
||||
|
@ -238,7 +235,6 @@ mcl_mobs:spawn_specific(
|
|||
"MesaBryce_deep_ocean",
|
||||
"ExtremeHills+_deep_ocean",
|
||||
"ExtremeHills_ocean",
|
||||
"MushroomIsland_deep_ocean",
|
||||
"Forest_ocean",
|
||||
"MegaTaiga_deep_ocean",
|
||||
"JungleEdge_ocean",
|
||||
|
@ -264,7 +260,6 @@ mcl_mobs:spawn_specific(
|
|||
"RoofedForest_underground",
|
||||
"Jungle_underground",
|
||||
"Swampland_underground",
|
||||
"MushroomIsland_underground",
|
||||
"BirchForest_underground",
|
||||
"Plains_underground",
|
||||
"MesaPlateauF_underground",
|
||||
|
|
|
@ -101,7 +101,8 @@ mcl_mobs:spawn_specific(
|
|||
"nether",
|
||||
"ground",
|
||||
{
|
||||
"Nether"
|
||||
"Nether",
|
||||
"SoulsandValley",
|
||||
},
|
||||
0,
|
||||
7,
|
||||
|
|
|
@ -446,11 +446,6 @@ minetest.LIGHT_MAX+1,
|
|||
mmin,
|
||||
mmax)
|
||||
|
||||
--mcl_mobs:spawn_specific("mobs_mc:magma_cube_tiny", { "mcl_nether:nether_brick", "mcl_nether:netherrack" }, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 11000, 4, mmin, mmax)
|
||||
--mcl_mobs:spawn_specific("mobs_mc:magma_cube_small", { "mcl_nether:nether_brick", "mcl_nether:netherrack" }, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 11100, 4, mmin, mmax)
|
||||
--mcl_mobs:spawn_specific("mobs_mc:magma_cube_big", { "mcl_nether:nether_brick", "mcl_nether:netherrack" }, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 11200, 4, mmin, mmax)
|
||||
|
||||
|
||||
-- spawn eggs
|
||||
mcl_mobs:register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "mobs_mc_spawn_icon_magmacube.png")
|
||||
mcl_mobs:register_egg("mobs_mc:slime_big", S("Slime"), "mobs_mc_spawn_icon_slime.png")
|
||||
|
|
|
@ -109,7 +109,6 @@ mcl_mobs:spawn_specific(
|
|||
"Plains",
|
||||
"Desert",
|
||||
"ColdTaiga",
|
||||
"MushroomIsland",
|
||||
"IcePlainsSpikes",
|
||||
"SunflowerPlains",
|
||||
"IcePlains",
|
||||
|
@ -136,7 +135,6 @@ mcl_mobs:spawn_specific(
|
|||
"ExtremeHills_beach",
|
||||
"ColdTaiga_beach",
|
||||
"Swampland_shore",
|
||||
"MushroomIslandShore",
|
||||
"JungleM_shore",
|
||||
"Jungle_shore",
|
||||
"MesaPlateauFM_sandlevel",
|
||||
|
@ -175,7 +173,6 @@ mcl_mobs:spawn_specific(
|
|||
"Forest_deep_ocean",
|
||||
"JungleM_deep_ocean",
|
||||
"FlowerForest_deep_ocean",
|
||||
"MushroomIsland_ocean",
|
||||
"MegaTaiga_ocean",
|
||||
"StoneBeach_deep_ocean",
|
||||
"IcePlainsSpikes_deep_ocean",
|
||||
|
@ -185,7 +182,6 @@ mcl_mobs:spawn_specific(
|
|||
"MesaBryce_deep_ocean",
|
||||
"ExtremeHills+_deep_ocean",
|
||||
"ExtremeHills_ocean",
|
||||
"MushroomIsland_deep_ocean",
|
||||
"Forest_ocean",
|
||||
"MegaTaiga_deep_ocean",
|
||||
"JungleEdge_ocean",
|
||||
|
@ -211,7 +207,6 @@ mcl_mobs:spawn_specific(
|
|||
"RoofedForest_underground",
|
||||
"Jungle_underground",
|
||||
"Swampland_underground",
|
||||
"MushroomIsland_underground",
|
||||
"BirchForest_underground",
|
||||
"Plains_underground",
|
||||
"MesaPlateauF_underground",
|
||||
|
|
|
@ -29,6 +29,7 @@ mcl_mobs:register_mob("mobs_mc:villager_zombie", {
|
|||
description = S("Zombie Villager"),
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
spawn_in_group = 1,
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
xp_min = 5,
|
||||
|
@ -147,7 +148,6 @@ mcl_mobs:spawn_specific(
|
|||
"RoofedForest_underground",
|
||||
"Jungle_underground",
|
||||
"Swampland_underground",
|
||||
"MushroomIsland_underground",
|
||||
"BirchForest_underground",
|
||||
"Plains_underground",
|
||||
"MesaPlateauF_underground",
|
||||
|
@ -184,7 +184,6 @@ mcl_mobs:spawn_specific(
|
|||
"Plains",
|
||||
"Desert",
|
||||
"ColdTaiga",
|
||||
"MushroomIsland",
|
||||
"IcePlainsSpikes",
|
||||
"SunflowerPlains",
|
||||
"IcePlains",
|
||||
|
@ -211,7 +210,6 @@ mcl_mobs:spawn_specific(
|
|||
"ExtremeHills_beach",
|
||||
"ColdTaiga_beach",
|
||||
"Swampland_shore",
|
||||
"MushroomIslandShore",
|
||||
"JungleM_shore",
|
||||
"Jungle_shore",
|
||||
"MesaPlateauFM_sandlevel",
|
||||
|
|
|
@ -18,6 +18,7 @@ local wolf = {
|
|||
xp_max = 3,
|
||||
passive = false,
|
||||
group_attack = true,
|
||||
spawn_in_group = 8,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_mc_wolf.b3d",
|
||||
|
|
|
@ -162,7 +162,6 @@ mcl_mobs:spawn_specific(
|
|||
"RoofedForest_underground",
|
||||
"Jungle_underground",
|
||||
"Swampland_underground",
|
||||
"MushroomIsland_underground",
|
||||
"BirchForest_underground",
|
||||
"Plains_underground",
|
||||
"MesaPlateauF_underground",
|
||||
|
@ -198,7 +197,6 @@ mcl_mobs:spawn_specific(
|
|||
"Forest",
|
||||
"Plains",
|
||||
"ColdTaiga",
|
||||
"MushroomIsland",
|
||||
"IcePlainsSpikes",
|
||||
"SunflowerPlains",
|
||||
"IcePlains",
|
||||
|
@ -225,7 +223,6 @@ mcl_mobs:spawn_specific(
|
|||
"ExtremeHills_beach",
|
||||
"ColdTaiga_beach",
|
||||
"Swampland_shore",
|
||||
"MushroomIslandShore",
|
||||
"JungleM_shore",
|
||||
"Jungle_shore",
|
||||
"MesaPlateauFM_sandlevel",
|
||||
|
@ -254,7 +251,6 @@ mcl_mobs:spawn_specific(
|
|||
"RoofedForest_underground",
|
||||
"Jungle_underground",
|
||||
"Swampland_underground",
|
||||
"MushroomIsland_underground",
|
||||
"BirchForest_underground",
|
||||
"Plains_underground",
|
||||
"MesaPlateauF_underground",
|
||||
|
@ -290,7 +286,6 @@ mcl_mobs:spawn_specific(
|
|||
"Forest",
|
||||
"Plains",
|
||||
"ColdTaiga",
|
||||
"MushroomIsland",
|
||||
"IcePlainsSpikes",
|
||||
"SunflowerPlains",
|
||||
"IcePlains",
|
||||
|
@ -317,7 +312,6 @@ mcl_mobs:spawn_specific(
|
|||
"ExtremeHills_beach",
|
||||
"ColdTaiga_beach",
|
||||
"Swampland_shore",
|
||||
"MushroomIslandShore",
|
||||
"JungleM_shore",
|
||||
"Jungle_shore",
|
||||
"MesaPlateauFM_sandlevel",
|
||||
|
|
|
@ -134,7 +134,8 @@ mcl_mobs:spawn_specific(
|
|||
"nether",
|
||||
"ground",
|
||||
{
|
||||
"Nether"
|
||||
"Nether",
|
||||
"CrimsonForest",
|
||||
},
|
||||
0,
|
||||
minetest.LIGHT_MAX+1,
|
||||
|
|
Loading…
Reference in a new issue