Compare commits

...

9 Commits

52 changed files with 710 additions and 190 deletions

View File

@ -260,6 +260,8 @@ function mcl_mobs.register_mob(name, def)
-- MCL2 extensions
shooter_avoid_enemy = def.shooter_avoid_enemy,
strafes = def.strafes,
light_min = def.light_min,
light_max = def.light_max,
avoid_distance = def.avoid_distance or 9,
do_teleport = def.do_teleport,
spawn_class = def.spawn_class,
@ -503,6 +505,16 @@ function mcl_mobs.register_egg(mob, desc, background_color, overlay_color, addeg
local name = placer:get_player_name()
local privs = minetest.get_player_privs(name)
local dim = mcl_worlds.pos_to_dimension(placer:get_pos())
-- the attribute in the light_levels table for mobs is "the_end" instead of "end"
if dim == "end" then
dim = "the_end"
end
local mob_light_level = {
light_max = mcl_mobs.registered_mobs[itemstack:get_name()].light_max,
light_min = mcl_mobs.registered_mobs[itemstack:get_name()].light_min
}
if under.name == "mcl_mobspawners:spawner" then
if minetest.is_protected(pointed_thing.under, name) then
minetest.record_protection_violation(pointed_thing.under, name)
@ -512,7 +524,7 @@ function mcl_mobs.register_egg(mob, desc, background_color, overlay_color, addeg
minetest.chat_send_player(name, S("You need the “maphack” privilege to change the mob spawner."))
return itemstack
end
mcl_mobspawners.setup_spawner(pointed_thing.under, itemstack:get_name())
mcl_mobspawners.setup_spawner(pointed_thing.under, itemstack:get_name(), mob_light_level.light_min[dim], mob_light_level.light_max[dim])
if not minetest.is_creative_enabled(name) then
itemstack:take_item()
end

View File

@ -532,8 +532,12 @@ local function spawn_check(pos,spawn_def,ignore_caps)
and not is_bedrock then
--only need to poll for node light if everything else worked
local gotten_light = get_node_light(pos)
if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then
return true
--gotten_light is a table sometimes, causing a crash. Don't know the cause.
if type(gotten_light) ~= "table" then
if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then
return true
end
end
end
return false

View File

@ -9,7 +9,16 @@ local axolotl = {
hp_max = 14,
xp_min = 1,
xp_max = 7,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
head_swivel = "head.control",
bone_eye_height = -1,
head_eye_height = -0.5,
@ -169,8 +178,8 @@ mcl_mobs:spawn_specific(
"JungleEdgeM_underground",
"LushCaves",
},
0,
minetest.LIGHT_MAX+1,
axolotl.light_min.overworld,
axolotl.light_max.overworld,
30,
4000,
3,

View File

@ -2,7 +2,19 @@
local S = minetest.get_translator("mobs_mc")
mcl_mobs.register_mob("mobs_mc:bat", {
-- Spawning
--[[ If the game has been launched between the 20th of October and the 3rd of November system time,
-- the maximum spawn light level is increased. ]]
local date = os.date("*t")
local maxlight
if (date.month == 10 and date.day >= 20) or (date.month == 11 and date.day <= 3) then
maxlight = 6
else
maxlight = 3
end
local bat = {
description = S("Bat"),
type = "animal",
spawn_class = "ambient",
@ -11,6 +23,17 @@ mcl_mobs.register_mob("mobs_mc:bat", {
passive = true,
hp_min = 6,
hp_max = 6,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = maxlight,
nether = maxlight,
the_end = maxlight
},
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.89, 0.25},
visual = "mesh",
mesh = "mobs_mc_bat.b3d",
@ -50,20 +73,8 @@ mcl_mobs.register_mob("mobs_mc:bat", {
jump = false,
fly = true,
makes_footstep_sound = false,
})
-- Spawning
--[[ If the game has been launched between the 20th of October and the 3rd of November system time,
-- the maximum spawn light level is increased. ]]
local date = os.date("*t")
local maxlight
if (date.month == 10 and date.day >= 20) or (date.month == 11 and date.day <= 3) then
maxlight = 6
else
maxlight = 3
end
}
mcl_mobs.register_mob("mobs_mc:bat", bat)
-- Spawn on solid blocks at or below Sea level and the selected light level
mcl_mobs:spawn_specific(
@ -134,8 +145,8 @@ mcl_mobs:spawn_specific(
"JungleEdge",
"SavannaM",
},
0,
maxlight,
bat.light_min.overworld,
bat.light_max.overworld,
20,
5000,
2,

View File

@ -11,8 +11,7 @@ local mod_target = minetest.get_modpath("mcl_target")
--################### BLAZE
--###################
mcl_mobs.register_mob("mobs_mc:blaze", {
local blaze = {
description = S("Blaze"),
type = "monster",
spawn_class = "hostile",
@ -22,6 +21,16 @@ mcl_mobs.register_mob("mobs_mc:blaze", {
hp_max = 20,
xp_min = 10,
xp_max = 10,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 11,
nether = 11,
the_end = 11
},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.79, 0.3},
rotate = -180,
visual = "mesh",
@ -58,8 +67,8 @@ mcl_mobs.register_mob("mobs_mc:blaze", {
animation = {
stand_speed = 25,
stand_start = 0,
stand_end = 100,
walk_speed = 25,
stand_end = 100,
walk_speed = 25,
walk_start = 0,
walk_end = 100,
run_speed = 50,
@ -137,15 +146,16 @@ mcl_mobs.register_mob("mobs_mc:blaze", {
},
})
end,
})
}
mcl_mobs.register_mob("mobs_mc:blaze", blaze)
mcl_mobs:spawn_specific(
"mobs_mc:blaze",
"nether",
"ground",
{"Nether"},
0,
minetest.LIGHT_MAX+1,
blaze.light_min.nether,
blaze.light_max.nether,
30,
5000,
3,

View File

@ -6,9 +6,7 @@ local S = minetest.get_translator("mobs_mc")
--################### CHICKEN
--###################
mcl_mobs.register_mob("mobs_mc:chicken", {
local chicken = {
description = S("Chicken"),
type = "animal",
spawn_class = "passive",
@ -18,6 +16,16 @@ mcl_mobs.register_mob("mobs_mc:chicken", {
hp_max = 4,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 9,
nether = 9,
the_end = 9
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.69, 0.2},
floats = 1,
head_swivel = "head.control",
@ -111,8 +119,9 @@ mcl_mobs.register_mob("mobs_mc:chicken", {
max_hear_distance = 16,
}, true)
end,
}
})
mcl_mobs.register_mob("mobs_mc:chicken", chicken)
--spawn
mcl_mobs:spawn_specific(
@ -155,8 +164,8 @@ mcl_mobs:spawn_specific(
"Swampland",
"Swampland_shore"
},
9,
minetest.LIGHT_MAX+1,
chicken.light_min.overworld,
chicken.light_max.overworld,
30, 17000,
3,
mobs_mc.water_level,

View File

@ -38,6 +38,16 @@ local cod = {
hp_max = 3,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
armor = 100,
rotate = 180,
spawn_in_group_min = 3,
@ -263,8 +273,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
cod.light_min.overworld,
cod.light_max.overworld,
30,
4000,
3,

View File

@ -12,6 +12,16 @@ local cow_def = {
hp_max = 10,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 9,
nether = 9,
the_end = 9
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.39, 0.45},
spawn_in_group = 4,
spawn_in_group_min = 3,
@ -204,8 +214,8 @@ mcl_mobs:spawn_specific(
"Swampland",
"Swampland_shore"
},
9,
minetest.LIGHT_MAX+1,
cow_def.light_min.overworld,
cow_def.light_max.overworld,
30,
17000,
10,
@ -222,8 +232,8 @@ mcl_mobs:spawn_specific(
"MushroomIslandShore",
"MushroomIsland"
},
9,
minetest.LIGHT_MAX+1,
cow_def.light_min,
cow_def.light_max,
30,
17000,
5,

View File

@ -7,9 +7,7 @@ local S = minetest.get_translator("mobs_mc")
--###################
mcl_mobs.register_mob("mobs_mc:creeper", {
local creeper = {
type = "monster",
spawn_class = "hostile",
spawn_in_group = 1,
@ -17,6 +15,16 @@ mcl_mobs.register_mob("mobs_mc:creeper", {
hp_max = 20,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7
},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.69, 0.3},
pathfinding = 1,
visual = "mesh",
@ -131,9 +139,11 @@ mcl_mobs.register_mob("mobs_mc:creeper", {
floats = 1,
fear_height = 4,
view_range = 16,
})
}
mcl_mobs.register_mob("mobs_mc:creeper_charged", {
mcl_mobs.register_mob("mobs_mc:creeper", creeper)
local creeper_charged = {
description = S("Creeper"),
type = "monster",
spawn_class = "hostile",
@ -260,7 +270,8 @@ mcl_mobs.register_mob("mobs_mc:creeper_charged", {
--Having trouble when fire is placed with lightning
fire_resistant = true,
glow = 3,
})
}
mcl_mobs.register_mob("mobs_mc:creeper_charged", creeper_charged)
mcl_mobs:spawn_specific(
"mobs_mc:creeper",
@ -402,8 +413,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
7,
creeper.light_min.overworld,
creeper.light_max.overworld,
20,
16500,
2,

View File

@ -38,6 +38,16 @@ local dolphin = {
hp_max = 10,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
armor = 100,
walk_chance = 100,
breath_max = 120,
@ -241,8 +251,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
dolphin.light_min.overworld,
dolphin.light_max.overworld,
30,
4000,
3,

View File

@ -48,7 +48,7 @@ local function check_pos(self)
end
end
mcl_mobs.register_mob("mobs_mc:enderdragon", {
local enderdragon = {
description = S("Ender Dragon"),
type = "monster",
spawn_class = "hostile",
@ -59,6 +59,16 @@ mcl_mobs.register_mob("mobs_mc:enderdragon", {
hp_min = 200,
xp_min = 500,
xp_max = 500,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
collisionbox = {-2, 3, -2, 2, 5, 2},
physical = false,
visual = "mesh",
@ -136,7 +146,8 @@ mcl_mobs.register_mob("mobs_mc:enderdragon", {
end
end,
fire_resistant = true,
})
}
mcl_mobs.register_mob("mobs_mc:enderdragon", enderdragon)
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false

View File

@ -255,7 +255,7 @@ local psdefs = {{
texture = "mcl_portals_particle"..math.random(1, 5)..".png",
}}
mcl_mobs.register_mob("mobs_mc:enderman", {
local enderman = {
description = S("Enderman"),
type = "monster",
spawn_class = "passive",
@ -266,6 +266,16 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
hp_max = 40,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 11,
the_end = minetest.LIGHT_MAX+1,
},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 2.89, 0.3},
visual = "mesh",
mesh = "mobs_mc_enderman.b3d",
@ -631,7 +641,8 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
view_range = 64,
fear_height = 4,
attack_type = "dogfight",
})
}
mcl_mobs.register_mob("mobs_mc:enderman", enderman)
-- End spawn
mcl_mobs:spawn_specific(
@ -646,8 +657,8 @@ mcl_mobs:spawn_specific(
"EndBorder",
"EndSmallIslands"
},
0,
minetest.LIGHT_MAX+1,
enderman.light_min.the_end,
enderman.light_max.the_end,
30,
3000,
12,
@ -794,8 +805,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
7,
enderman.light_min.overworld,
enderman.light_max.overworld,
30,
19000,
2,
@ -811,8 +822,8 @@ mcl_mobs:spawn_specific(
"Nether",
"SoulsandValley",
},
0,
11,
enderman.light_min.nether,
enderman.light_max.nether,
30,
27500,
4,
@ -827,8 +838,8 @@ mcl_mobs:spawn_specific(
{
"WarpedForest"
},
0,
11,
enderman.light_min.nether,
enderman.light_max.nether,
30,
5000,
4,

View File

@ -3,8 +3,7 @@
--###################
local S = minetest.get_translator("mobs_mc")
mcl_mobs.register_mob("mobs_mc:endermite", {
local endermite = {
description = S("Endermite"),
type = "monster",
spawn_class = "hostile",
@ -13,6 +12,16 @@ mcl_mobs.register_mob("mobs_mc:endermite", {
hp_max = 8,
xp_min = 3,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7
},
armor = {fleshy = 100, arthropod = 100},
group_attack = true,
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.29, 0.2},
@ -36,6 +45,8 @@ mcl_mobs.register_mob("mobs_mc:endermite", {
view_range = 16,
damage = 2,
reach = 1,
})
}
mcl_mobs.register_mob("mobs_mc:endermite", endermite)
mcl_mobs.register_egg("mobs_mc:endermite", S("Endermite"), "#161616", "#6d6d6d", 0)

View File

@ -9,8 +9,7 @@ local S = minetest.get_translator("mobs_mc")
--################### GHAST
--###################
mcl_mobs.register_mob("mobs_mc:ghast", {
local ghast = {
description = S("Ghast"),
type = "monster",
spawn_class = "hostile",
@ -20,6 +19,16 @@ mcl_mobs.register_mob("mobs_mc:ghast", {
hp_max = 10,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7
},
collisionbox = {-2, 5, -2, 2, 9, 2},
visual = "mesh",
mesh = "mobs_mc_ghast.b3d",
@ -82,7 +91,8 @@ mcl_mobs.register_mob("mobs_mc:ghast", {
self.object:set_properties({textures=self.base_texture})
end
end,
})
}
mcl_mobs.register_mob("mobs_mc:ghast", ghast)
mcl_mobs:spawn_specific(
@ -94,8 +104,8 @@ mcl_mobs:spawn_specific(
"SoulsandValley",
"BasaltDelta",
},
0,
7,
ghast.light_min.nether,
ghast.light_max.nether,
30,
72000,
2,

View File

@ -29,7 +29,7 @@ for i=1,4 do
table.insert(psdefs,p)
end
mcl_mobs.register_mob("mobs_mc:glow_squid", {
local glow_squid = {
type = "animal",
spawn_class = "water",
can_despawn = true,
@ -38,6 +38,16 @@ mcl_mobs.register_mob("mobs_mc:glow_squid", {
hp_max = 10,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX + 1,
nether = minetest.LIGHT_MAX + 1,
the_end = minetest.LIGHT_MAX + 1
},
armor = 100,
rotate = 0,
-- tilt_swim breaks the animations.
@ -84,7 +94,8 @@ mcl_mobs.register_mob("mobs_mc:glow_squid", {
glow = minetest.LIGHT_MAX,
particlespawners = psdefs,
})
}
mcl_mobs.register_mob("mobs_mc:glow_squid", glow_squid)
-- spawning
local water = mobs_mc.water_level - 1
@ -234,8 +245,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX + 1,
glow_squid.light_min.overworld,
glow_squid.light_max.overworld,
30,
10000,
3,

View File

@ -3,8 +3,7 @@
--###################
local S = minetest.get_translator("mobs_mc")
mcl_mobs.register_mob("mobs_mc:guardian", {
local guardian = {
description = S("Guardian"),
type = "monster",
spawn_class = "hostile",
@ -14,6 +13,16 @@ mcl_mobs.register_mob("mobs_mc:guardian", {
hp_max = 30,
xp_min = 10,
xp_max = 10,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = minetest.LIGHT_MAX+1,
the_end = 7,
},
breath_max = -1,
passive = false,
attack_type = "dogfight",
@ -97,7 +106,8 @@ mcl_mobs.register_mob("mobs_mc:guardian", {
fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" },
jump = false,
view_range = 16,
})
}
mcl_mobs.register_mob("mobs_mc:guardian", guardian)
-- Spawning disabled due to size issues
-- TODO: Re-enable spawning

View File

@ -6,7 +6,7 @@
local S = minetest.get_translator("mobs_mc")
mcl_mobs.register_mob("mobs_mc:guardian_elder", {
local guardian_elder = {
description = S("Elder Guardian"),
type = "monster",
spawn_class = "hostile",
@ -14,6 +14,16 @@ mcl_mobs.register_mob("mobs_mc:guardian_elder", {
hp_max = 80,
xp_min = 10,
xp_max = 10,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = minetest.LIGHT_MAX+1,
the_end = 7,
},
breath_max = -1,
passive = false,
attack_type = "dogfight",
@ -105,7 +115,8 @@ mcl_mobs.register_mob("mobs_mc:guardian_elder", {
fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" },
jump = false,
view_range = 16,
})
}
mcl_mobs.register_mob("mobs_mc:guardian_elder", guardian_elder)
-- Spawning disabled due to size issues <- what do you mean? -j4i
-- TODO: Re-enable spawning

View File

@ -17,6 +17,16 @@ local hoglin = {
hp_max = 40,
xp_min = 9,
xp_max = 9,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 4,
@ -123,8 +133,8 @@ mcl_mobs:spawn_specific(
"Nether",
"CrimsonForest"
},
0,
minetest.LIGHT_MAX+1,
hoglin.light_min.nether,
hoglin.light_max.nether,
30,
6000,
3,

View File

@ -167,6 +167,16 @@ local horse = {
hp_max = 30,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
floats = 1,
makes_footstep_sound = true,
jump = true,
@ -609,8 +619,8 @@ mcl_mobs:spawn_specific(
"Savanna_beach",
"Plains_beach",
},
0,
minetest.LIGHT_MAX+1,
horse.light_min.overworld,
horse.light_max.overworld,
30,
15000,
4,
@ -632,8 +642,8 @@ mcl_mobs:spawn_specific(
"Savanna_beach",
"Plains_beach",
},
9,
minetest.LIGHT_MAX+1,
donkey.light_min.overworld,
donkey.light_max.overworld,
30,
15000,
4,

View File

@ -10,14 +10,23 @@ local S = minetest.get_translator("mobs_mc")
--###################
local etime = 0
mcl_mobs.register_mob("mobs_mc:iron_golem", {
local iron_golem = {
description = S("Iron Golem"),
type = "npc",
spawn_class = "passive",
passive = false,
hp_min = 100,
hp_max = 100,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
breath_max = -1,
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.69, 0.7},
visual = "mesh",
@ -93,7 +102,8 @@ mcl_mobs.register_mob("mobs_mc:iron_golem", {
end
end
end,
})
}
mcl_mobs.register_mob("mobs_mc:iron_golem", iron_golem)
-- spawn eggs

View File

@ -46,8 +46,7 @@ local function get_drops(self)
max = 1,})
end
end
mcl_mobs.register_mob("mobs_mc:llama", {
local llama = {
description = S("Llama"),
type = "animal",
spawn_class = "passive",
@ -70,6 +69,16 @@ mcl_mobs.register_mob("mobs_mc:llama", {
hp_max = 30,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.86, 0.45},
visual = "mesh",
mesh = "mobs_mc_llama.b3d",
@ -249,7 +258,8 @@ mcl_mobs.register_mob("mobs_mc:llama", {
end
end
end,
})
}
mcl_mobs.register_mob("mobs_mc:llama", llama)
mcl_entity_invs.register_inv("mobs_mc:llama","Llama",nil,true)
@ -288,8 +298,8 @@ mcl_mobs:spawn_specific(
"ExtremeHills_beach",
"ExtremeHillsM",
}, --FIXME: Needs Windswept Forest when that is added.
0,
minetest.LIGHT_MAX+1,
llama.light_min.overworld,
llama.light_max.overworld,
30,
15000,
5,

View File

@ -36,6 +36,16 @@ local ocelot = {
hp_max = 10,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
head_swivel = "head.control",
bone_eye_height = 6.2,
head_eye_height = 0.4,
@ -183,8 +193,8 @@ mcl_mobs:spawn_specific(
"JungleM",
"JungleEdge",
},
0,
minetest.LIGHT_MAX+1,
ocelot.light_min.overworld,
ocelot.light_max.overworld,
30,
15000,
5,

View File

@ -124,8 +124,7 @@ local function check_perch(self,dtime)
end
end
end
mcl_mobs.register_mob("mobs_mc:parrot", {
local parrot = {
description = S("Parrot"),
type = "animal",
spawn_class = "passive",
@ -135,6 +134,16 @@ mcl_mobs.register_mob("mobs_mc:parrot", {
hp_max = 6,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
head_swivel = "head.control",
bone_eye_height = 1.1,
horrizonatal_head_height=0,
@ -219,7 +228,9 @@ mcl_mobs.register_mob("mobs_mc:parrot", {
return false --return false explicitly here. mcl_mobs checks for that
end
end,
})
}
mcl_mobs.register_mob("mobs_mc:parrot", parrot)
-- Parrots spawn rarely in jungles. TODO: Also check for jungle *biome* <- I'll get to this eventually -j4i
mcl_mobs:spawn_specific(
@ -232,8 +243,8 @@ mcl_mobs:spawn_specific(
"JungleM",
"JungleEdge",
},
0,
minetest.LIGHT_MAX+1,
parrot.light_min.overworld,
parrot.light_max.overworld,
7,
30000,
1,

View File

@ -1,8 +1,7 @@
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
mcl_mobs.register_mob("mobs_mc:pig", {
local pig = {
description = S("Pig"),
type = "animal",
spawn_class = "passive",
@ -12,6 +11,16 @@ mcl_mobs.register_mob("mobs_mc:pig", {
hp_max = 10,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
collisionbox = {-0.45, -0.01, -0.45, 0.45, 0.865, 0.45},
visual = "mesh",
mesh = "mobs_mc_pig.b3d",
@ -195,7 +204,8 @@ mcl_mobs.register_mob("mobs_mc:pig", {
return false
end
end,
})
}
mcl_mobs.register_mob("mobs_mc:pig", pig)
mcl_mobs:spawn_specific(
"mobs_mc:pig",
@ -234,8 +244,8 @@ mcl_mobs:spawn_specific(
"Swampland",
"Swampland_shore"
},
9,
minetest.LIGHT_MAX+1,
pig.light_min.overworld,
pig.light_max.overworld,
30,
15000,
8,

View File

@ -42,6 +42,16 @@ local piglin = {
hp_max = 16,
xp_min = 9,
xp_max = 9,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = minetest.LIGHT_MAX+1,
the_end = 7
},
armor = {fleshy = 90},
damage = 4,
reach = 3,
@ -292,8 +302,8 @@ mcl_mobs:spawn_specific(
"Nether",
"CrimsonForest"
},
0,
minetest.LIGHT_MAX+1,
piglin.light_min.nether,
piglin.light_max.nether,
30,
6000,
3,
@ -308,8 +318,8 @@ mcl_mobs:spawn_specific(
"Nether",
"CrimsonForest"
},
0,
minetest.LIGHT_MAX+1,
sword_piglin.light_min.nether,
sword_piglin.light_max.nether,
30,
6000,
3,

View File

@ -23,6 +23,16 @@ pillager = {
hp_max = 24,
xp_min = 6,
xp_max = 6,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7,
},
breath_max = -1,
eye_height = 1.5,
shoot_interval = 3,

View File

@ -6,8 +6,7 @@ local S = minetest.get_translator("mobs_mc")
--################### POLARBEAR
--###################
mcl_mobs.register_mob("mobs_mc:polar_bear", {
local polar_bear = {
description = S("Polar Bear"),
type = "animal",
spawn_class = "passive",
@ -17,7 +16,17 @@ mcl_mobs.register_mob("mobs_mc:polar_bear", {
hp_max = 30,
xp_min = 1,
xp_max = 3,
breath_max = -1,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
breath_max = -1,
collisionbox = {-0.7, -0.01, -0.7, 0.7, 1.39, 0.7},
visual = "mesh",
mesh = "mobs_mc_polarbear.b3d",
@ -71,7 +80,8 @@ mcl_mobs.register_mob("mobs_mc:polar_bear", {
},
view_range = 16,
})
}
mcl_mobs.register_mob("mobs_mc:polar_bear", polar_bear)
mcl_mobs:spawn_specific(
@ -83,8 +93,8 @@ mcl_mobs:spawn_specific(
"IcePlainsSpikes",
"IcePlains",
},
0,
minetest.LIGHT_MAX+1,
polar_bear.light_min.overworld,
polar_bear.light_max.overworld,
30,
7000,
3,

View File

@ -14,6 +14,16 @@ local rabbit = {
hp_max = 3,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 9,
nether = 9,
the_end = 9
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.49, 0.2},
head_swivel = "head.control",
bone_eye_height = 2,
@ -145,8 +155,8 @@ mcl_mobs:spawn_specific(
"MegaTaiga",
"ColdTaiga",
},
9,
minetest.LIGHT_MAX+1,
rabbit.light_min.overworld,
rabbit.light_max.overworld,
30,
15000,
8,

View File

@ -18,6 +18,16 @@ local salmon = {
hp_max = 3,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1,
},
armor = 100,
spawn_in_group = 5,
tilt_swim = true,
@ -217,8 +227,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
salmon.light_min.overworld,
salmon.light_max.overworld,
30,
4000,
3,

View File

@ -51,8 +51,7 @@ end
local gotten_texture = { "blank.png", "mobs_mc_sheep.png" }
--mcsheep
mcl_mobs.register_mob("mobs_mc:sheep", {
local sheep = {
description = S("Sheep"),
type = "animal",
spawn_class = "passive",
@ -61,6 +60,16 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
hp_max = 8,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 9,
nether = 9,
the_end = 9
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1,
},
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.29, 0.45},
head_swivel = "head.control",
bone_eye_height = 3.3,
@ -314,7 +323,9 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
return false
end
end,
})
}
--mcsheep
mcl_mobs.register_mob("mobs_mc:sheep", sheep)
mcl_mobs:spawn_specific(
"mobs_mc:sheep",
"overworld",
@ -357,8 +368,8 @@ mcl_mobs:spawn_specific(
"Swampland",
"Swampland_shore"
},
9,
minetest.LIGHT_MAX+1,
sheep.light_min.overworld,
sheep.light_max.overworld,
30,
15000,
3,

View File

@ -29,8 +29,7 @@ local function check_spot(pos)
return false
end
local pr = PseudoRandom(os.time()*(-334))
-- animation 45-80 is transition between passive and attack stance
mcl_mobs.register_mob("mobs_mc:shulker", {
local shulker = {
description = S("Shulker"),
type = "monster",
spawn_class = "hostile",
@ -43,6 +42,16 @@ mcl_mobs.register_mob("mobs_mc:shulker", {
hp_max = 30,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1,
},
armor = 150,
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.99, 0.5},
visual = "mesh",
@ -149,7 +158,9 @@ mcl_mobs.register_mob("mobs_mc:shulker", {
end
end
end,
})
}
-- animation 45-80 is transition between passive and attack stance
mcl_mobs.register_mob("mobs_mc:shulker", shulker)
-- bullet arrow (weapon)
mcl_mobs.register_arrow("mobs_mc:shulkerbullet", {

View File

@ -15,6 +15,16 @@ mcl_mobs.register_mob("mobs_mc:silverfish", {
hp_max = 8,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 11,
nether = 11,
the_end = 11,
},
armor = {fleshy = 100, arthropod = 100},
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.44, 0.4},
visual = "mesh",

View File

@ -20,6 +20,16 @@ local skeleton = {
hp_max = 20,
xp_min = 6,
xp_max = 6,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = minetest.LIGHT_MAX+1,
the_end = 7,
},
breath_max = -1,
armor = {undead = 100, fleshy = 100},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.98, 0.3},
@ -309,8 +319,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
7,
skeleton.light_min.overworld,
skeleton.light_max.overworld,
20,
17000,
2,
@ -326,8 +336,8 @@ mcl_mobs:spawn_specific(
{
"SoulsandValley",
},
0,
minetest.LIGHT_MAX+1,
skeleton.light_min.nether,
skeleton.light_max.nether,
30,
10000,
3,
@ -346,8 +356,8 @@ mcl_mobs:spawn_specific(
"IcePlains",
"ExtremeHills+_snowtop",
},
0,
7,
stray.light_min.overworld,
stray.light_max.overworld,
20,
19000,
2,

View File

@ -9,7 +9,7 @@ local S = minetest.get_translator("mobs_mc")
--################### WITHER SKELETON
--###################
mcl_mobs.register_mob("mobs_mc:witherskeleton", {
local witherskeleton = {
description = S("Wither Skeleton"),
type = "monster",
spawn_class = "hostile",
@ -17,6 +17,16 @@ mcl_mobs.register_mob("mobs_mc:witherskeleton", {
hp_max = 20,
xp_min = 6,
xp_max = 6,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7,
},
breath_max = -1,
armor = {undead = 100, fleshy = 100},
pathfinding = 1,
@ -96,7 +106,8 @@ mcl_mobs.register_mob("mobs_mc:witherskeleton", {
fear_height = 4,
harmed_by_heal = true,
fire_resistant = true,
})
}
mcl_mobs.register_mob("mobs_mc:witherskeleton", witherskeleton)
--spawn
--[[]

View File

@ -70,6 +70,17 @@ local slime_big = {
hp_max = 16,
xp_min = 4,
xp_max = 4,
swamp_light_max = 7,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
collisionbox = {-1.02, -0.01, -1.02, 1.02, 2.03, 1.02},
visual_size = {x=12.5, y=12.5},
textures = {{"mobs_mc_slime.png", "mobs_mc_slime.png"}},
@ -197,7 +208,7 @@ local cave_min = mcl_vars.mg_overworld_min
local cave_max = water_level - 23
local swampy_biomes = {"Swampland", "MangroveSwamp"}
local swamp_light_max = 7
local swamp_min = water_level
local swamp_max = water_level + 27
@ -206,8 +217,8 @@ mcl_mobs:spawn_specific(
"overworld",
"ground",
cave_biomes,
0,
minetest.LIGHT_MAX+1,
slime_tiny.light_min.overworld,
slime_tiny.light_max.overworld,
30,
12000,
4,
@ -220,7 +231,7 @@ mcl_mobs:spawn_specific(
"ground",
swampy_biomes,
0,
swamp_light_max,
slime_tiny.swamp_light_max,
30,
12000,
4,
@ -232,8 +243,8 @@ mcl_mobs:spawn_specific(
"overworld",
"ground",
cave_biomes,
0,
minetest.LIGHT_MAX+1,
slime_small.light_min.overworld,
slime_small.light_max.overworld,
30,
8500,
4,
@ -246,7 +257,7 @@ mcl_mobs:spawn_specific(
"ground",
swampy_biomes,
0,
swamp_light_max,
slime_small.swamp_light_max,
30,
8500,
4,
@ -258,8 +269,8 @@ mcl_mobs:spawn_specific(
"overworld",
"ground",
cave_biomes,
0,
minetest.LIGHT_MAX+1,
slime_big.light_min.overworld,
slime_big.light_max.overworld,
30,
10000,
4,
@ -272,7 +283,7 @@ mcl_mobs:spawn_specific(
"ground",
swampy_biomes,
0,
swamp_light_max,
slime_big.swamp_light_max,
30,
10000,
4,
@ -288,6 +299,16 @@ local magma_cube_big = {
hp_max = 16,
xp_min = 4,
xp_max = 4,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1
},
collisionbox = {-1.02, -0.01, -1.02, 1.02, 2.03, 1.02},
visual_size = {x=12.5, y=12.5},
textures = {{ "mobs_mc_magmacube.png", "mobs_mc_magmacube.png" }},
@ -394,8 +415,8 @@ mcl_mobs:spawn_specific(
"nether",
"ground",
magma_cube_biomes,
0,
minetest.LIGHT_MAX+1,
magma_cube_tiny.light_min.nether,
magma_cube_tiny.light_max.nether,
30,
15000,
4,
@ -407,8 +428,8 @@ mcl_mobs:spawn_specific(
"nether",
"ground",
magma_cube_biomes,
0,
minetest.LIGHT_MAX+1,
magma_cube_small.light_min.nether,
magma_cube_small.light_max.nether,
30,
15500,
4,
@ -419,8 +440,8 @@ mcl_mobs:spawn_specific(
"mobs_mc:magma_cube_big",
"nether",
"ground",
magma_cube_biomes,
0,
magma_cube_big.light_min.nether,
magma_cube_big.light_max.nether,
minetest.LIGHT_MAX+1,
30,
16000,

View File

@ -20,7 +20,7 @@ local gotten_texture = {
"blank.png",
}
mcl_mobs.register_mob("mobs_mc:snowman", {
local snowman = {
description = S("Snow Golem"),
type = "npc",
spawn_class = "passive",
@ -135,7 +135,9 @@ mcl_mobs.register_mob("mobs_mc:snowman", {
end
end
end,
})
}
mcl_mobs.register_mob("mobs_mc:snowman", snowman)
local summon_particles = function(obj)
local lua = obj:get_luaentity()

View File

@ -43,6 +43,16 @@ local spider = {
hp_max = 16,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7,
},
armor = {fleshy = 100, arthropod = 100},
on_spawn = function(self)
self.object:set_properties({visual_size={x=1,y=1}})
@ -284,8 +294,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
7,
spider.light_min.overworld,
spider.light_max.overworld,
30,
17000,
2,

View File

@ -6,7 +6,7 @@
local S = minetest.get_translator("mobs_mc")
mcl_mobs.register_mob("mobs_mc:squid", {
local squid = {
description = S("Squid"),
type = "animal",
spawn_class = "water",
@ -16,6 +16,16 @@ mcl_mobs.register_mob("mobs_mc:squid", {
hp_max = 10,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1,
},
armor = 100,
-- FIXME: If the squid is near the floor, it turns black
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.9, 0.4},
@ -55,7 +65,9 @@ mcl_mobs.register_mob("mobs_mc:squid", {
view_range = 16,
runaway = true,
fear_height = 4,
})
}
mcl_mobs.register_mob("mobs_mc:squid", squid)
-- TODO: Behaviour: squirt
@ -208,8 +220,8 @@ mcl_mobs:spawn_specific(
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
squid.light_min.overworld,
squid.light_max.overworld,
30,
5500,
3,

View File

@ -18,6 +18,16 @@ local strider = {
hp_max = 20,
xp_min = 9,
xp_max = 9,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1,
},
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,

View File

@ -66,6 +66,16 @@ local tropical_fish = {
hp_max = 3,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1,
},
armor = 100,
spawn_in_group = 9,
tilt_swim = true,
@ -180,8 +190,8 @@ mcl_mobs:spawn_specific(
"JungleM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
tropical_fish.light_min.overworld,
tropical_fish.light_max.overworld,
30,
4000,
3,

View File

@ -8,8 +8,7 @@ local S = minetest.get_translator("mobs_mc")
--###################
--################### VEX
--###################
mcl_mobs.register_mob("mobs_mc:vex", {
local vex = {
description = S("Vex"),
type = "monster",
spawn_class = "hostile",
@ -90,7 +89,8 @@ mcl_mobs.register_mob("mobs_mc:vex", {
end,
fly = true,
makes_footstep_sound = false,
})
}
mcl_mobs.register_mob("mobs_mc:vex", vex)
-- spawn eggs

View File

@ -1931,13 +1931,23 @@ end)
--[=======[ MOB REGISTRATION AND SPAWNING ]=======]
mcl_mobs.register_mob("mobs_mc:villager", {
local villager = {
description = S("Villager"),
type = "npc",
spawn_class = "passive",
passive = true,
hp_min = 20,
hp_max = 20,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1,
},
head_swivel = "head.control",
bone_eye_height = 6.3,
head_eye_height = 2.2,
@ -2155,7 +2165,9 @@ mcl_mobs.register_mob("mobs_mc:villager", {
mcl_util.replace_mob(self.object, "mobs_mc:witch")
return true
end,
})
}
mcl_mobs.register_mob("mobs_mc:villager", villager)
--[[

View File

@ -13,7 +13,7 @@ local pr = PseudoRandom(os.time()*666)
local spawned_vexes = {} --this is stored locally so the mobs engine doesn't try to store it in staticdata
mcl_mobs.register_mob("mobs_mc:evoker", {
local evoker = {
description = S("Evoker"),
type = "monster",
spawn_class = "hostile",
@ -24,6 +24,16 @@ mcl_mobs.register_mob("mobs_mc:evoker", {
hp_max = 24,
xp_min = 10,
xp_max = 10,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7,
},
head_swivel = "head.control",
bone_eye_height = 6.3,
head_eye_height = 2.2,
@ -86,7 +96,8 @@ mcl_mobs.register_mob("mobs_mc:evoker", {
},
view_range = 16,
fear_height = 4,
})
}
mcl_mobs.register_mob("mobs_mc:evoker", evoker)
-- spawn eggs
mcl_mobs.register_egg("mobs_mc:evoker", S("Evoker"), "#959b9b", "#1e1c1a", 0)

View File

@ -6,7 +6,7 @@
local S = minetest.get_translator("mobs_mc")
local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
mcl_mobs.register_mob("mobs_mc:illusioner", {
local illusioner = {
description = S("Illusioner"),
type = "monster",
spawn_class = "hostile",
@ -25,6 +25,16 @@ mcl_mobs.register_mob("mobs_mc:illusioner", {
hp_max = 32,
xp_min = 6,
xp_max = 6,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7,
},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
visual = "mesh",
mesh = "mobs_mc_illusioner.b3d",
@ -63,6 +73,7 @@ mcl_mobs.register_mob("mobs_mc:illusioner", {
},
view_range = 16,
fear_height = 4,
})
}
mcl_mobs.register_mob("mobs_mc:illusioner", illusioner)
mcl_mobs.register_egg("mobs_mc:illusioner", S("Illusioner"), "#3f5cbb", "#8a8686", 0)

View File

@ -9,8 +9,7 @@ local S = minetest.get_translator("mobs_mc")
--################### VINDICATOR
--###################
mcl_mobs.register_mob("mobs_mc:vindicator", {
local vindicator = {
description = S("Vindicator"),
type = "monster",
spawn_class = "hostile",
@ -20,6 +19,16 @@ mcl_mobs.register_mob("mobs_mc:vindicator", {
hp_max = 24,
xp_min = 6,
xp_max = 6,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7,
},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
visual = "mesh",
mesh = "mobs_mc_vindicator.b3d",
@ -74,7 +83,9 @@ mcl_mobs.register_mob("mobs_mc:vindicator", {
},
view_range = 16,
fear_height = 4,
})
}
mcl_mobs.register_mob("mobs_mc:vindicator", vindicator)
-- spawn eggs
mcl_mobs.register_egg("mobs_mc:vindicator", S("Vindicator"), "#959b9b", "#275e61", 0)

View File

@ -25,7 +25,7 @@ local professions = {
nitwit = "mobs_mc_villager.png",
}
mcl_mobs.register_mob("mobs_mc:villager_zombie", {
local villager_zombie = {
description = S("Zombie Villager"),
type = "monster",
spawn_class = "hostile",
@ -34,6 +34,16 @@ mcl_mobs.register_mob("mobs_mc:villager_zombie", {
hp_max = 20,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7,
},
breath_max = -1,
armor = {undead = 90, fleshy = 90},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
@ -138,7 +148,8 @@ mcl_mobs.register_mob("mobs_mc:villager_zombie", {
fear_height = 4,
harmed_by_heal = true,
attack_npcs = true,
})
}
mcl_mobs.register_mob("mobs_mc:villager_zombie", villager_zombie)
mcl_mobs:spawn_specific(
"mobs_mc:villager_zombie",
@ -222,8 +233,8 @@ mcl_mobs:spawn_specific(
"MesaBryce_sandlevel",
"Mesa_sandlevel",
},
0,
7,
villager_zombie.light_min.overworld,
villager_zombie.light_max.overworld,
30,
4090,
4,

View File

@ -21,6 +21,16 @@ mcl_mobs.register_mob("mobs_mc:witch", {
hp_max = 26,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7,
},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
visual = "mesh",
mesh = "mobs_mc_witch.b3d",

View File

@ -17,6 +17,16 @@ mcl_mobs.register_mob("mobs_mc:wither", {
hp_min = 300,
xp_min = 50,
xp_max = 50,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7
},
armor = {undead = 80, fleshy = 100},
-- This deviates from MC Wiki's size, which makes no sense
collisionbox = {-0.9, 0.4, -0.9, 0.9, 2.45, 0.9},

View File

@ -16,6 +16,16 @@ local wolf = {
hp_max = 8,
xp_min = 1,
xp_max = 3,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = minetest.LIGHT_MAX+1,
nether = minetest.LIGHT_MAX+1,
the_end = minetest.LIGHT_MAX+1,
},
passive = false,
group_attack = true,
spawn_in_group = 8,
@ -226,8 +236,8 @@ mcl_mobs:spawn_specific(
minetest.LIGHT_MAX+1,
30,
9000,
7,
mobs_mc.water_level+3,
wolf.light_min.overworld,
wolf.light_max.overworld,
mcl_vars.mg_overworld_max)
mcl_mobs.register_egg("mobs_mc:wolf", S("Wolf"), "#d7d3d3", "#ceaf96", 0)

View File

@ -53,6 +53,16 @@ local zombie = {
hp_max = 20,
xp_min = 5,
xp_max = 5,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = 7,
the_end = 7
},
head_swivel = "head.control",
bone_eye_height = 6.3,
head_eye_height = 2.2,
@ -240,8 +250,8 @@ mcl_mobs:spawn_specific(
"MesaBryce_sandlevel",
"Mesa_sandlevel",
},
0,
7,
zombie.light_min.overworld,
zombie.light_max.overworld,
30,
6000,
4,
@ -329,8 +339,8 @@ mcl_mobs:spawn_specific(
"MesaBryce_sandlevel",
"Mesa_sandlevel",
},
0,
7,
baby_zombie.light_min.overworld,
baby_zombie.light_max.overworld,
30,
60000,
4,
@ -345,8 +355,8 @@ mcl_mobs:spawn_specific(
{
"Desert",
},
0,
7,
husk.light_min.overworld,
husk.light_max.overworld,
30,
6500,
4,
@ -359,8 +369,8 @@ mcl_mobs:spawn_specific(
{
"Desert",
},
0,
7,
baby_husk.light_min.overworld,
baby_husk.light_max.overworld,
30,
65000,
4,

View File

@ -20,6 +20,16 @@ local pigman = {
hp_max = 20,
xp_min = 6,
xp_max = 6,
light_min = {
overworld = 0,
nether = 0,
the_end = 0
},
light_max = {
overworld = 7,
nether = minetest.LIGHT_MAX+1,
the_end = 7
},
armor = {undead = 90, fleshy = 90},
attack_type = "dogfight",
group_attack = { "mobs_mc:pigman", "mobs_mc:baby_pigman" },

View File

@ -317,7 +317,11 @@ minetest.register_node("mcl_mobspawners:spawner", {
if obj then
obj:remove()
end
mcl_experience.throw_xp(pos, math.random(15, 43))
--Make sure the player is not in creative mode before
--giving them xp
if not minetest.is_creative_enabled(name) then
mcl_experience.throw_xp(pos, math.random(15, 43))
end
end,
on_punch = function(pos)