Implement per-class mob cap
This commit is contained in:
parent
8e06e4e8b2
commit
47cda09073
42 changed files with 96 additions and 18 deletions
|
@ -6,6 +6,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:agent", {
|
||||
type = "npc",
|
||||
spawn_class = "passive",
|
||||
passive = true,
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
|
|
|
@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:bat", {
|
||||
type = "animal",
|
||||
spawn_class = "ambient",
|
||||
can_despawn = true,
|
||||
passive = true,
|
||||
hp_min = 6,
|
||||
|
|
|
@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:blaze", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.79, 0.3},
|
||||
|
|
|
@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:chicken", {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
|
||||
hp_min = 4,
|
||||
hp_max = 4,
|
||||
|
|
|
@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
local cow_def = {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
hp_min = 10,
|
||||
hp_max = 10,
|
||||
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.39, 0.45},
|
||||
|
|
|
@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:creeper", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.69, 0.3},
|
||||
|
|
|
@ -6,6 +6,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:enderdragon", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
pathfinding = 1,
|
||||
attacks_animals = true,
|
||||
walk_chance = 100,
|
||||
|
|
|
@ -168,6 +168,7 @@ local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
|||
mobs:register_mob("mobs_mc:enderman", {
|
||||
-- TODO: Endermen should be classified as passive
|
||||
type = "monster",
|
||||
spawn_class = "passive",
|
||||
passive = false,
|
||||
pathfinding = 1,
|
||||
hp_min = 40,
|
||||
|
|
|
@ -6,6 +6,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:endermite", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
passive = false,
|
||||
hp_min = 8,
|
||||
hp_max = 8,
|
||||
|
|
|
@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:ghast", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
pathfinding = 1,
|
||||
group_attack = true,
|
||||
hp_min = 10,
|
||||
|
|
|
@ -8,6 +8,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:guardian", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 30,
|
||||
hp_max = 30,
|
||||
breath_max = -1,
|
||||
|
|
|
@ -8,6 +8,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:guardian_elder", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 80,
|
||||
hp_max = 80,
|
||||
breath_max = -1,
|
||||
|
|
|
@ -84,6 +84,7 @@ end
|
|||
-- Horse
|
||||
local horse = {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
visual = "mesh",
|
||||
mesh = "mobs_mc_horse.b3d",
|
||||
visual_size = {x=3.0, y=3.0},
|
||||
|
|
|
@ -13,6 +13,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:iron_golem", {
|
||||
type = "npc",
|
||||
spawn_class = "passive",
|
||||
passive = true,
|
||||
hp_min = 100,
|
||||
hp_max = 100,
|
||||
|
|
|
@ -26,6 +26,7 @@ local carpets = {
|
|||
|
||||
mobs:register_mob("mobs_mc:llama", {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
hp_min = 15,
|
||||
hp_max = 30,
|
||||
passive = false,
|
||||
|
|
|
@ -28,6 +28,7 @@ end
|
|||
-- Ocelot
|
||||
local ocelot = {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
can_despawn = true,
|
||||
hp_min = 10,
|
||||
hp_max = 10,
|
||||
|
|
|
@ -13,6 +13,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:parrot", {
|
||||
type = "npc",
|
||||
spawn_class = "passive",
|
||||
pathfinding = 1,
|
||||
hp_min = 6,
|
||||
hp_max = 6,
|
||||
|
|
|
@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:pig", {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
runaway = true,
|
||||
hp_min = 10,
|
||||
hp_max = 10,
|
||||
|
|
|
@ -9,6 +9,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:polar_bear", {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
runaway = false,
|
||||
passive = false,
|
||||
hp_min = 30,
|
||||
|
|
|
@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
local rabbit = {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
passive = true,
|
||||
reach = 1,
|
||||
|
||||
|
@ -74,6 +75,7 @@ mobs:register_mob("mobs_mc:rabbit", rabbit)
|
|||
-- The killer bunny (Only with spawn egg)
|
||||
local killer_bunny = table.copy(rabbit)
|
||||
killer_bunny.type = "monster"
|
||||
killer_bunny.spawn_class = "hostile"
|
||||
killer_bunny.attack_type = "dogfight"
|
||||
killer_bunny.specific_attack = { "player", "mobs_mc:wolf", "mobs_mc:dog" }
|
||||
killer_bunny.damage = 8
|
||||
|
|
|
@ -44,6 +44,7 @@ local gotten_texture = { "blank.png", "mobs_mc_sheep.png" }
|
|||
--mcsheep
|
||||
mobs:register_mob("mobs_mc:sheep", {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
hp_min = 8,
|
||||
hp_max = 8,
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:shulker", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
attack_type = "shoot",
|
||||
shoot_interval = 0.5,
|
||||
arrow = "mobs_mc:shulkerbullet",
|
||||
|
|
|
@ -6,6 +6,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:silverfish", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
passive = false,
|
||||
group_attack = true,
|
||||
reach = 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
|
|||
|
||||
local skeleton = {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
breath_max = -1,
|
||||
|
|
|
@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:witherskeleton", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
breath_max = -1,
|
||||
|
|
|
@ -57,6 +57,7 @@ end
|
|||
-- Slime
|
||||
local slime_big = {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
pathfinding = 1,
|
||||
group_attack = { "mobs_mc:slime_big", "mobs_mc:slime_small", "mobs_mc:slime_tiny" },
|
||||
hp_min = 16,
|
||||
|
@ -156,6 +157,7 @@ mobs:spawn_specific("mobs_mc:slime_big", mobs_mc.spawn.solid, {"air"}, 0, minete
|
|||
-- Magma cube
|
||||
local magma_cube_big = {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 16,
|
||||
hp_max = 16,
|
||||
collisionbox = {-1.02, -0.01, -1.02, 1.02, 2.03, 1.02},
|
||||
|
|
|
@ -22,6 +22,7 @@ local gotten_texture = {
|
|||
|
||||
mobs:register_mob("mobs_mc:snowman", {
|
||||
type = "npc",
|
||||
spawn_class = "passive",
|
||||
passive = true,
|
||||
hp_min = 4,
|
||||
hp_max = 4,
|
||||
|
|
|
@ -14,6 +14,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
local spider = {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
passive = false,
|
||||
docile_by_day = true,
|
||||
attack_type = "dogfight",
|
||||
|
|
|
@ -8,6 +8,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:squid", {
|
||||
type = "animal",
|
||||
spawn_class = "water",
|
||||
can_despawn = true,
|
||||
passive = true,
|
||||
hp_min = 10,
|
||||
|
|
|
@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:vex", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
pathfinding = 1,
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
|
|
|
@ -908,6 +908,7 @@ end)
|
|||
|
||||
mobs:register_mob("mobs_mc:villager", {
|
||||
type = "npc",
|
||||
spawn_class = "passive",
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
||||
|
|
|
@ -13,6 +13,7 @@ local pr = PseudoRandom(os.time()*666)
|
|||
|
||||
mobs:register_mob("mobs_mc:evoker", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
physical = true,
|
||||
pathfinding = 1,
|
||||
hp_min = 24,
|
||||
|
|
|
@ -8,6 +8,7 @@ local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
|
|||
|
||||
mobs:register_mob("mobs_mc:illusioner", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
attack_type = "shoot",
|
||||
shoot_interval = 2.5,
|
||||
shoot_offset = 1.5,
|
||||
|
|
|
@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:vindicator", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
physical = false,
|
||||
pathfinding = 1,
|
||||
hp_min = 24,
|
||||
|
|
|
@ -14,6 +14,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:villager_zombie", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
breath_max = -1,
|
||||
|
|
|
@ -14,6 +14,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:witch", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 26,
|
||||
hp_max = 26,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
||||
|
|
|
@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
mobs:register_mob("mobs_mc:wither", {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_max = 300,
|
||||
hp_min = 300,
|
||||
armor = 80,
|
||||
|
|
|
@ -20,6 +20,7 @@ end
|
|||
-- Wolf
|
||||
local wolf = {
|
||||
type = "animal",
|
||||
spawn_class = "passive",
|
||||
can_despawn = true,
|
||||
hp_min = 8,
|
||||
hp_max = 8,
|
||||
|
|
|
@ -40,6 +40,7 @@ table.insert(drops_zombie, {
|
|||
|
||||
local zombie = {
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
breath_max = -1,
|
||||
|
|
|
@ -14,6 +14,7 @@ local pigman = {
|
|||
-- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked
|
||||
type = "animal",
|
||||
passive = false,
|
||||
spawn_class = "passive",
|
||||
hp_min = 20,
|
||||
hp_max = 20,
|
||||
breath_max = -1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue