1
0
Fork 0

Add mob descriptions

This commit is contained in:
Lizzy Fleckenstein 2021-04-25 17:30:15 +02:00
parent aeaec68c1b
commit b2407e407a
40 changed files with 264 additions and 211 deletions

View File

@ -3771,6 +3771,7 @@ minetest.register_entity(name, {
use_texture_alpha = def.use_texture_alpha, use_texture_alpha = def.use_texture_alpha,
stepheight = def.stepheight or 0.6, stepheight = def.stepheight or 0.6,
name = name, name = name,
description = def.description,
type = def.type, type = def.type,
attack_type = def.attack_type, attack_type = def.attack_type,
fly = def.fly, fly = def.fly,

View File

@ -3,6 +3,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:bat", { mobs:register_mob("mobs_mc:bat", {
description = S("Bat"),
type = "animal", type = "animal",
spawn_class = "ambient", spawn_class = "ambient",
can_despawn = true, can_despawn = true,

View File

@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:blaze", { mobs:register_mob("mobs_mc:blaze", {
description = S("Blaze"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 20, hp_min = 20,

View File

@ -9,6 +9,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:chicken", { mobs:register_mob("mobs_mc:chicken", {
description = S("Chicken"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
@ -95,14 +96,14 @@ mobs:register_mob("mobs_mc:chicken", {
gain = 1.0, gain = 1.0,
max_hear_distance = 16, max_hear_distance = 16,
}, true) }, true)
end, end,
}) })
--spawn --spawn
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:chicken", "mobs_mc:chicken",
"overworld", "overworld",
"ground", "ground",
{ {
"FlowerForest", "FlowerForest",
@ -122,10 +123,10 @@ mobs:spawn_specific(
"ExtremeHillsM", "ExtremeHillsM",
"BirchForestM", "BirchForestM",
}, },
9, 9,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 17000, 30, 17000,
3, 3,
mobs_mc.spawn_height.water, mobs_mc.spawn_height.water,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)

View File

@ -3,6 +3,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
local cow_def = { local cow_def = {
description = S("Cow"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
hp_min = 10, hp_min = 10,
@ -43,7 +44,7 @@ local cow_def = {
stand_speed = 25, walk_speed = 40, stand_speed = 25, walk_speed = 40,
run_speed = 60, stand_start = 0, run_speed = 60, stand_start = 0,
stand_end = 0, walk_start = 0, stand_end = 0, walk_start = 0,
walk_end = 40, run_start = 0, walk_end = 40, run_start = 0,
run_end = 40, run_end = 40,
}, },
follow = mobs_mc.follow.cow, follow = mobs_mc.follow.cow,
@ -81,7 +82,7 @@ mobs:register_mob("mobs_mc:cow", cow_def)
-- Mooshroom -- Mooshroom
local mooshroom_def = table.copy(cow_def) local mooshroom_def = table.copy(cow_def)
mooshroom_def.description = S("Mooshroom")
mooshroom_def.mesh = "mobs_mc_cow.b3d" mooshroom_def.mesh = "mobs_mc_cow.b3d"
mooshroom_def.textures = { {"mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png"}, {"mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } } 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) mooshroom_def.on_rightclick = function(self, clicker)
@ -147,7 +148,7 @@ mobs:register_mob("mobs_mc:mooshroom", mooshroom_def)
-- Spawning -- Spawning
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:cow", "mobs_mc:cow",
"overworld", "overworld",
"ground", "ground",
{ {
"FlowerForest", "FlowerForest",
@ -167,30 +168,30 @@ mobs:spawn_specific(
"ExtremeHillsM", "ExtremeHillsM",
"BirchForestM", "BirchForestM",
}, },
9, 9,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
17000, 17000,
10, 10,
mobs_mc.spawn_height.water, mobs_mc.spawn_height.water,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:mooshroom", "mobs_mc:mooshroom",
"overworld", "overworld",
"ground", "ground",
{ {
"MushroomIslandShore", "MushroomIslandShore",
"MushroomIsland" "MushroomIsland"
}, },
9, 9,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
17000, 17000,
5, 5,
mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_min,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- spawn egg -- spawn egg

View File

@ -130,6 +130,7 @@ mobs:register_mob("mobs_mc:creeper", {
}) })
mobs:register_mob("mobs_mc:creeper_charged", { mobs:register_mob("mobs_mc:creeper_charged", {
description = S("Creeper"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 20, hp_min = 20,
@ -142,7 +143,7 @@ mobs:register_mob("mobs_mc:creeper_charged", {
mesh = "mobs_mc_creeper.b3d", mesh = "mobs_mc_creeper.b3d",
--BOOM --BOOM
textures = { textures = {
{"mobs_mc_creeper.png", {"mobs_mc_creeper.png",
"mobs_mc_creeper_charge.png"}, "mobs_mc_creeper_charge.png"},
@ -254,8 +255,8 @@ mobs:register_mob("mobs_mc:creeper_charged", {
}) })
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:creeper", "mobs_mc:creeper",
"overworld", "overworld",
"ground", "ground",
{ {
"Mesa", "Mesa",
@ -398,12 +399,12 @@ mobs:spawn_specific(
"ExtremeHillsM_underground", "ExtremeHillsM_underground",
"JungleEdgeM_underground", "JungleEdgeM_underground",
}, },
0, 0,
7, 7,
20, 20,
16500, 16500,
2, 2,
mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_min,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs

View File

@ -5,6 +5,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:enderdragon", { mobs:register_mob("mobs_mc:enderdragon", {
description = S("Ender Dragon"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
pathfinding = 1, pathfinding = 1,

View File

@ -190,6 +190,7 @@ end
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
mobs:register_mob("mobs_mc:enderman", { mobs:register_mob("mobs_mc:enderman", {
description = S("Enderman"),
type = "monster", type = "monster",
spawn_class = "passive", spawn_class = "passive",
passive = true, passive = true,
@ -330,7 +331,7 @@ mobs:register_mob("mobs_mc:enderman", {
end end
-- Check to see if people are near by enough to look at us. -- Check to see if people are near by enough to look at us.
for _,obj in pairs(minetest.get_connected_players()) do for _,obj in pairs(minetest.get_connected_players()) do
--check if they are within radius --check if they are within radius
local player_pos = obj:get_pos() local player_pos = obj:get_pos()
if player_pos then -- prevent crashing in 1 in a million scenario if player_pos then -- prevent crashing in 1 in a million scenario
@ -355,7 +356,7 @@ mobs:register_mob("mobs_mc:enderman", {
local ender_eye_pos = vector.new(enderpos.x, enderpos.y + 2.75, enderpos.z) local ender_eye_pos = vector.new(enderpos.x, enderpos.y + 2.75, enderpos.z)
local eye_distance_from_player = vector.distance(ender_eye_pos, look_pos) local eye_distance_from_player = vector.distance(ender_eye_pos, look_pos)
look_pos = vector.add(look_pos, vector.multiply(look_dir, eye_distance_from_player)) look_pos = vector.add(look_pos, vector.multiply(look_dir, eye_distance_from_player))
--if looking in general head position, turn hostile --if looking in general head position, turn hostile
if minetest.line_of_sight(ender_eye_pos, look_pos_base) and vector.distance(look_pos, ender_eye_pos) <= 0.4 then if minetest.line_of_sight(ender_eye_pos, look_pos_base) and vector.distance(look_pos, ender_eye_pos) <= 0.4 then
self.provoked = "staring" self.provoked = "staring"
@ -364,7 +365,7 @@ mobs:register_mob("mobs_mc:enderman", {
else -- I'm not sure what this part does, but I don't want to break anything - jordan4ibanez else -- I'm not sure what this part does, but I don't want to break anything - jordan4ibanez
if self.provoked == "staring" then if self.provoked == "staring" then
self.provoked = "broke_contact" self.provoked = "broke_contact"
end end
end end
end end
@ -562,23 +563,23 @@ mobs:register_mob("mobs_mc:enderman", {
-- End spawn -- End spawn
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:enderman", "mobs_mc:enderman",
"end", "end",
"ground", "ground",
{ {
"End" "End"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
3000, 3000,
12, 12,
mobs_mc.spawn_height.end_min, mobs_mc.spawn_height.end_min,
mobs_mc.spawn_height.end_max) mobs_mc.spawn_height.end_max)
-- Overworld spawn -- Overworld spawn
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:enderman", "mobs_mc:enderman",
"overworld", "overworld",
"ground", "ground",
{ {
"Mesa", "Mesa",
@ -721,28 +722,28 @@ mobs:spawn_specific(
"ExtremeHillsM_underground", "ExtremeHillsM_underground",
"JungleEdgeM_underground", "JungleEdgeM_underground",
}, },
0, 0,
7, 7,
30, 30,
19000, 19000,
2, 2,
mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_min,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- Nether spawn (rare) -- Nether spawn (rare)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:enderman", "mobs_mc:enderman",
"nether", "nether",
"ground", "ground",
{ {
"Nether" "Nether"
}, },
0, 0,
7, 7,
30, 30,
27500, 27500,
4, 4,
mobs_mc.spawn_height.nether_min, mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max) mobs_mc.spawn_height.nether_max)
-- spawn eggs -- spawn eggs

View File

@ -5,6 +5,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:endermite", { mobs:register_mob("mobs_mc:endermite", {
description = S("Endermite"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
passive = false, passive = false,

View File

@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:ghast", { mobs:register_mob("mobs_mc:ghast", {
description = S("Ghast"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
pathfinding = 1, pathfinding = 1,

View File

@ -5,6 +5,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:guardian", { mobs:register_mob("mobs_mc:guardian", {
description = S("Guardian"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 30, hp_min = 30,

View File

@ -7,6 +7,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:guardian_elder", { mobs:register_mob("mobs_mc:guardian_elder", {
description = S("Elder Guardian"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 80, hp_min = 80,

View File

@ -83,6 +83,7 @@ end
-- Horse -- Horse
local horse = { local horse = {
description = S("Horse"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
visual = "mesh", visual = "mesh",
@ -418,6 +419,7 @@ mobs:register_mob("mobs_mc:horse", horse)
-- Skeleton horse -- Skeleton horse
local skeleton_horse = table.copy(horse) local skeleton_horse = table.copy(horse)
skeleton_horse.description = S("Skeleton Horse")
skeleton_horse.breath_max = -1 skeleton_horse.breath_max = -1
skeleton_horse.armor = {undead = 100, fleshy = 100} skeleton_horse.armor = {undead = 100, fleshy = 100}
skeleton_horse.textures = {{"blank.png", "mobs_mc_horse_skeleton.png", "blank.png"}} skeleton_horse.textures = {{"blank.png", "mobs_mc_horse_skeleton.png", "blank.png"}}
@ -440,6 +442,7 @@ mobs:register_mob("mobs_mc:skeleton_horse", skeleton_horse)
-- Zombie horse -- Zombie horse
local zombie_horse = table.copy(horse) local zombie_horse = table.copy(horse)
zombie_horse.description = S("Zombie Horse")
zombie_horse.breath_max = -1 zombie_horse.breath_max = -1
zombie_horse.armor = {undead = 100, fleshy = 100} zombie_horse.armor = {undead = 100, fleshy = 100}
zombie_horse.textures = {{"blank.png", "mobs_mc_horse_zombie.png", "blank.png"}} zombie_horse.textures = {{"blank.png", "mobs_mc_horse_zombie.png", "blank.png"}}
@ -464,6 +467,7 @@ mobs:register_mob("mobs_mc:zombie_horse", zombie_horse)
-- Donkey -- Donkey
local d = 0.86 -- donkey scale local d = 0.86 -- donkey scale
local donkey = table.copy(horse) local donkey = table.copy(horse)
donkey.description = S("Donkey")
donkey.textures = {{"blank.png", "mobs_mc_donkey.png", "blank.png"}} donkey.textures = {{"blank.png", "mobs_mc_donkey.png", "blank.png"}}
donkey.animation = { donkey.animation = {
speed_normal = 25, speed_normal = 25,
@ -494,6 +498,7 @@ mobs:register_mob("mobs_mc:donkey", donkey)
-- Mule -- Mule
local m = 0.94 local m = 0.94
local mule = table.copy(donkey) local mule = table.copy(donkey)
mule.description = S("Mule")
mule.textures = {{"blank.png", "mobs_mc_mule.png", "blank.png"}} mule.textures = {{"blank.png", "mobs_mc_mule.png", "blank.png"}}
mule.visual_size = { x=horse.visual_size.x*m, y=horse.visual_size.y*m } mule.visual_size = { x=horse.visual_size.x*m, y=horse.visual_size.y*m }
mule.sounds = table.copy(donkey.sounds) mule.sounds = table.copy(donkey.sounds)
@ -532,18 +537,18 @@ mobs:spawn_specific(
"ExtremeHillsM", "ExtremeHillsM",
"BirchForestM", "BirchForestM",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15000, 15000,
4, 4,
mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.water+3,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:donkey", "mobs_mc:donkey",
"overworld", "overworld",
"ground", "ground",
{ {
"Mesa", "Mesa",
@ -553,12 +558,12 @@ mobs:spawn_specific(
"MesaPlateauF_grasstop", "MesaPlateauF_grasstop",
"MesaBryce", "MesaBryce",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15000, 15000,
4, 4,
mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.water+3,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs

View File

@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:iron_golem", { mobs:register_mob("mobs_mc:iron_golem", {
description = S("Iron Golem"),
type = "npc", type = "npc",
spawn_class = "passive", spawn_class = "passive",
passive = true, passive = true,

View File

@ -25,6 +25,7 @@ local carpets = {
} }
mobs:register_mob("mobs_mc:llama", { mobs:register_mob("mobs_mc:llama", {
description = S("Llama"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
hp_min = 15, hp_min = 15,
@ -229,12 +230,12 @@ mobs:spawn_specific(
"MesaPlateauF_grasstop", "MesaPlateauF_grasstop",
"MesaBryce", "MesaBryce",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15000, 15000,
5, 5,
mobs_mc.spawn_height.water+15, mobs_mc.spawn_height.water+15,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs

View File

@ -27,6 +27,7 @@ end
-- Ocelot -- Ocelot
local ocelot = { local ocelot = {
description = S("Ocelot"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
can_despawn = true, can_despawn = true,
@ -102,6 +103,7 @@ mobs:register_mob("mobs_mc:ocelot", ocelot)
-- Cat -- Cat
local cat = table.copy(ocelot) local cat = table.copy(ocelot)
cat.description = S("Cat")
cat.textures = {{"mobs_mc_cat_black.png"}, {"mobs_mc_cat_red.png"}, {"mobs_mc_cat_siamese.png"}} cat.textures = {{"mobs_mc_cat_black.png"}, {"mobs_mc_cat_red.png"}, {"mobs_mc_cat_siamese.png"}}
cat.can_despawn = false cat.can_despawn = false
cat.owner = "" cat.owner = ""
@ -154,8 +156,8 @@ local base_spawn_chance = 5000
-- Spawn ocelot -- Spawn ocelot
--they get the same as the llama because I'm trying to rework so much of this code right now -j4i --they get the same as the llama because I'm trying to rework so much of this code right now -j4i
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:ocelot", "mobs_mc:ocelot",
"overworld", "overworld",
"ground", "ground",
{ {
"Jungle", "Jungle",
@ -163,12 +165,12 @@ mobs:spawn_specific(
"JungleM", "JungleM",
"JungleEdge", "JungleEdge",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15000, 15000,
5, 5,
mobs_mc.spawn_height.water+15, mobs_mc.spawn_height.water+15,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
--[[ --[[
mobs:spawn({ mobs:spawn({
@ -183,7 +185,7 @@ mobs:spawn({
max_height = mobs_mc.spawn_height.overworld_max, max_height = mobs_mc.spawn_height.overworld_max,
on_spawn = function(self, pos) on_spawn = function(self, pos)
Note: Minecraft has a 1/3 spawn failure rate. Note: Minecraft has a 1/3 spawn failure rate.
In this mod it is emulated by reducing the spawn rate accordingly (see above). In this mod it is emulated by reducing the spawn rate accordingly (see above).
-- 1/7 chance to spawn 2 ocelot kittens -- 1/7 chance to spawn 2 ocelot kittens
if pr:next(1,7) == 1 then if pr:next(1,7) == 1 then

View File

@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:parrot", { mobs:register_mob("mobs_mc:parrot", {
description = S("Parrot"),
type = "npc", type = "npc",
spawn_class = "passive", spawn_class = "passive",
pathfinding = 1, pathfinding = 1,
@ -93,7 +94,7 @@ mobs:register_mob("mobs_mc:parrot", {
-- Parrots spawn rarely in jungles. TODO: Also check for jungle *biome* <- I'll get to this eventually -j4i -- Parrots spawn rarely in jungles. TODO: Also check for jungle *biome* <- I'll get to this eventually -j4i
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:parrot", "mobs_mc:parrot",
"overworld", "overworld",
"ground", "ground",
{ {
"Jungle", "Jungle",
@ -101,12 +102,12 @@ mobs:spawn_specific(
"JungleM", "JungleM",
"JungleEdge", "JungleEdge",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
7, 7,
30000, 30000,
1, 1,
mobs_mc.spawn_height.water+7, mobs_mc.spawn_height.water+7,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs

View File

@ -3,6 +3,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:pig", { mobs:register_mob("mobs_mc:pig", {
description = S("Pig"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
runaway = true, runaway = true,
@ -183,8 +184,8 @@ mobs:register_mob("mobs_mc:pig", {
}) })
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:pig", "mobs_mc:pig",
"overworld", "overworld",
"ground", "ground",
{ {
"FlowerForest", "FlowerForest",
@ -204,12 +205,12 @@ mobs:spawn_specific(
"ExtremeHillsM", "ExtremeHillsM",
"BirchForestM", "BirchForestM",
}, },
9, 9,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15000, 15000,
8, 8,
mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_min,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs

View File

@ -8,6 +8,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:polar_bear", { mobs:register_mob("mobs_mc:polar_bear", {
description = S("Polar Bear"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
runaway = false, runaway = false,
@ -37,7 +38,7 @@ mobs:register_mob("mobs_mc:polar_bear", {
chance = 2, chance = 2,
min = 0, min = 0,
max = 2, max = 2,
looting = "common",}, looting = "common",},
-- 1/4 to drop raw salmon -- 1/4 to drop raw salmon
{name = mobs_mc.items.salmon_raw, {name = mobs_mc.items.salmon_raw,
chance = 4, chance = 4,

View File

@ -3,6 +3,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
local rabbit = { local rabbit = {
description = S("Rabbit"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
passive = true, passive = true,
@ -83,6 +84,7 @@ mobs:register_mob("mobs_mc:rabbit", rabbit)
-- The killer bunny (Only with spawn egg) -- The killer bunny (Only with spawn egg)
local killer_bunny = table.copy(rabbit) local killer_bunny = table.copy(rabbit)
killer_bunny.description = S("Killer Bunny")
killer_bunny.type = "monster" killer_bunny.type = "monster"
killer_bunny.spawn_class = "hostile" killer_bunny.spawn_class = "hostile"
killer_bunny.attack_type = "dogfight" killer_bunny.attack_type = "dogfight"
@ -110,8 +112,8 @@ mobs:register_mob("mobs_mc:killer_bunny", killer_bunny)
-- Different skins depending on spawn location <- we'll get to this when the spawning algorithm is fleshed out -- Different skins depending on spawn location <- we'll get to this when the spawning algorithm is fleshed out
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:rabbit", "mobs_mc:rabbit",
"overworld", "overworld",
"ground", "ground",
{ {
"FlowerForest", "FlowerForest",
@ -131,12 +133,12 @@ mobs:spawn_specific(
"ExtremeHillsM", "ExtremeHillsM",
"BirchForestM", "BirchForestM",
}, },
9, 9,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15000, 15000,
8, 8,
mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_min,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
--[[ --[[

View File

@ -56,6 +56,7 @@ local gotten_texture = { "blank.png", "mobs_mc_sheep.png" }
--mcsheep --mcsheep
mobs:register_mob("mobs_mc:sheep", { mobs:register_mob("mobs_mc:sheep", {
description = S("Sheep"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
hp_min = 8, hp_min = 8,
@ -325,12 +326,12 @@ mobs:spawn_specific(
"ExtremeHillsM", "ExtremeHillsM",
"BirchForestM", "BirchForestM",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15000, 15000,
3, 3,
mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_min,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs

View File

@ -10,8 +10,9 @@ local S = minetest.get_translator("mobs_mc")
--################### --###################
-- animation 45-80 is transition between passive and attack stance -- animation 45-80 is transition between passive and attack stance
mobs:register_mob("mobs_mc:shulker", { mobs:register_mob("mobs_mc:shulker", {
description = S("Shulker"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
attack_type = "shoot", attack_type = "shoot",
@ -82,16 +83,16 @@ mobs:register_arrow("mobs_mc:shulkerbullet", {
mobs:register_egg("mobs_mc:shulker", S("Shulker"), "mobs_mc_spawn_icon_shulker.png", 0) mobs:register_egg("mobs_mc:shulker", S("Shulker"), "mobs_mc_spawn_icon_shulker.png", 0)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:shulker", "mobs_mc:shulker",
"end", "end",
"ground", "ground",
{ {
"End" "End"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
5000, 5000,
2, 2,
mobs_mc.spawn_height.end_min, mobs_mc.spawn_height.end_min,
mobs_mc.spawn_height.end_max) mobs_mc.spawn_height.end_max)

View File

@ -5,6 +5,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:silverfish", { mobs:register_mob("mobs_mc:silverfish", {
description = S("Silverfish"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
passive = false, passive = false,

View File

@ -13,6 +13,7 @@ local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
local skeleton = { local skeleton = {
description = S("Skeleton"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 20, hp_min = 20,
@ -109,6 +110,7 @@ mobs:register_mob("mobs_mc:skeleton", skeleton)
--################### --###################
local stray = table.copy(skeleton) local stray = table.copy(skeleton)
stray.description = S("Stray")
stray.mesh = "mobs_mc_skeleton.b3d" stray.mesh = "mobs_mc_skeleton.b3d"
stray.textures = { stray.textures = {
{ {

View File

@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
--################### --###################
mobs:register_mob("mobs_mc:witherskeleton", { mobs:register_mob("mobs_mc:witherskeleton", {
description = S("Wither Skeleton"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 20, hp_min = 20,

View File

@ -56,6 +56,7 @@ end
-- Slime -- Slime
local slime_big = { local slime_big = {
description = S("Slime"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
pathfinding = 1, pathfinding = 1,
@ -158,8 +159,8 @@ local smin = mobs_mc.spawn_height.overworld_min
local smax = mobs_mc.spawn_height.water - 23 local smax = mobs_mc.spawn_height.water - 23
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:slime_tiny", "mobs_mc:slime_tiny",
"overworld", "overworld",
"ground", "ground",
{ {
"FlowerForest_underground", "FlowerForest_underground",
@ -193,17 +194,17 @@ mobs:spawn_specific(
"ExtremeHillsM_underground", "ExtremeHillsM_underground",
"JungleEdgeM_underground", "JungleEdgeM_underground",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
12000, 12000,
4, 4,
smin, smin,
smax) smax)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:slime_small", "mobs_mc:slime_small",
"overworld", "overworld",
"ground", "ground",
{ {
"FlowerForest_underground", "FlowerForest_underground",
@ -236,19 +237,19 @@ mobs:spawn_specific(
"JungleM_underground", "JungleM_underground",
"ExtremeHillsM_underground", "ExtremeHillsM_underground",
"JungleEdgeM_underground", "JungleEdgeM_underground",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
8500, 8500,
4, 4,
smin, smin,
smax) smax)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:slime_big", "mobs_mc:slime_big",
"overworld", "overworld",
"ground", "ground",
{ {
"FlowerForest_underground", "FlowerForest_underground",
"JungleEdge_underground", "JungleEdge_underground",
@ -281,16 +282,17 @@ mobs:spawn_specific(
"ExtremeHillsM_underground", "ExtremeHillsM_underground",
"JungleEdgeM_underground", "JungleEdgeM_underground",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
10000, 10000,
4, 4,
smin, smin,
smax) smax)
-- Magma cube -- Magma cube
local magma_cube_big = { local magma_cube_big = {
description = S("Magma Cube"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 16, hp_min = 16,
@ -401,49 +403,49 @@ local mmin = mobs_mc.spawn_height.nether_min
local mmax = mobs_mc.spawn_height.nether_max local mmax = mobs_mc.spawn_height.nether_max
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:magma_cube_tiny", "mobs_mc:magma_cube_tiny",
"nether", "nether",
"ground", "ground",
{ {
"Nether" "Nether"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15000, 15000,
4, 4,
mmin, mmin,
mmax) mmax)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:magma_cube_small", "mobs_mc:magma_cube_small",
"nether", "nether",
"ground", "ground",
{ {
"Nether" "Nether"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
15500, 15500,
4, 4,
mmin, mmin,
mmax) mmax)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:magma_cube_big", "mobs_mc:magma_cube_big",
"nether", "nether",
"ground", "ground",
{ {
"Nether" "Nether"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
16000, 16000,
4, 4,
mmin, mmin,
mmax) mmax)
--mobs:spawn_specific("mobs_mc:magma_cube_tiny", mobs_mc.spawn.nether_fortress, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 11000, 4, mmin, mmax) --mobs:spawn_specific("mobs_mc:magma_cube_tiny", mobs_mc.spawn.nether_fortress, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 11000, 4, mmin, mmax)

View File

@ -21,6 +21,7 @@ local gotten_texture = {
} }
mobs:register_mob("mobs_mc:snowman", { mobs:register_mob("mobs_mc:snowman", {
description = S("Snow Golem"),
type = "npc", type = "npc",
spawn_class = "passive", spawn_class = "passive",
passive = true, passive = true,

View File

@ -13,6 +13,7 @@ local S = minetest.get_translator("mobs_mc")
-- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture) -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
local spider = { local spider = {
description = S("Spider"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
passive = false, passive = false,
@ -72,6 +73,7 @@ mobs:register_mob("mobs_mc:spider", spider)
-- Cave spider -- Cave spider
local cave_spider = table.copy(spider) local cave_spider = table.copy(spider)
cave_spider.description = S("Cave Spider")
cave_spider.textures = { {"mobs_mc_cave_spider.png^(mobs_mc_spider_eyes.png^[makealpha:0,0,0)"} } cave_spider.textures = { {"mobs_mc_cave_spider.png^(mobs_mc_spider_eyes.png^[makealpha:0,0,0)"} }
-- TODO: Poison damage -- TODO: Poison damage
-- TODO: Revert damage to 2 -- TODO: Revert damage to 2
@ -88,8 +90,8 @@ mobs:register_mob("mobs_mc:cave_spider", cave_spider)
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:spider", "mobs_mc:spider",
"overworld", "overworld",
"ground", "ground",
{ {
"Mesa", "Mesa",
@ -232,12 +234,12 @@ mobs:spawn_specific(
"ExtremeHillsM_underground", "ExtremeHillsM_underground",
"JungleEdgeM_underground", "JungleEdgeM_underground",
}, },
0, 0,
7, 7,
30, 30,
17000, 17000,
2, 2,
mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_min,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs

View File

@ -7,6 +7,7 @@
local S = minetest.get_translator("mobs_mc") local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:squid", { mobs:register_mob("mobs_mc:squid", {
description = S("Squid"),
type = "animal", type = "animal",
spawn_class = "water", spawn_class = "water",
can_despawn = true, can_despawn = true,

View File

@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
--################### --###################
mobs:register_mob("mobs_mc:vex", { mobs:register_mob("mobs_mc:vex", {
description = S("Vex"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
pathfinding = 1, pathfinding = 1,

View File

@ -927,6 +927,7 @@ end)
--[=======[ MOB REGISTRATION AND SPAWNING ]=======] --[=======[ MOB REGISTRATION AND SPAWNING ]=======]
mobs:register_mob("mobs_mc:villager", { mobs:register_mob("mobs_mc:villager", {
description = S("Villager"),
type = "npc", type = "npc",
spawn_class = "passive", spawn_class = "passive",
hp_min = 20, hp_min = 20,

View File

@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
local pr = PseudoRandom(os.time()*666) local pr = PseudoRandom(os.time()*666)
mobs:register_mob("mobs_mc:evoker", { mobs:register_mob("mobs_mc:evoker", {
description = S("Evoker"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
physical = true, physical = true,

View File

@ -7,6 +7,7 @@ local S = minetest.get_translator("mobs_mc")
local mod_bows = minetest.get_modpath("mcl_bows") ~= nil local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
mobs:register_mob("mobs_mc:illusioner", { mobs:register_mob("mobs_mc:illusioner", {
description = S("Illusioner"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
attack_type = "shoot", attack_type = "shoot",

View File

@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:vindicator", { mobs:register_mob("mobs_mc:vindicator", {
description = S("Vindicator"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
physical = false, physical = false,

View File

@ -26,6 +26,7 @@ local professions = {
} }
mobs:register_mob("mobs_mc:villager_zombie", { mobs:register_mob("mobs_mc:villager_zombie", {
description = S("Zombie Villager"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 20, hp_min = 20,

View File

@ -13,6 +13,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:witch", { mobs:register_mob("mobs_mc:witch", {
description = S("Witch"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 26, hp_min = 26,

View File

@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
--################### --###################
mobs:register_mob("mobs_mc:wither", { mobs:register_mob("mobs_mc:wither", {
description = S("Wither"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_max = 300, hp_max = 300,

View File

@ -19,6 +19,7 @@ end
-- Wolf -- Wolf
local wolf = { local wolf = {
description = S("Wolf"),
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
can_despawn = true, can_despawn = true,
@ -138,7 +139,7 @@ dog.owner = ""
-- TODO: Start sitting by default -- TODO: Start sitting by default
dog.order = "roam" dog.order = "roam"
dog.owner_loyal = true dog.owner_loyal = true
dog.follow_velocity = 3.2 dog.follow_velocity = 3.2
-- Automatically teleport dog to owner -- Automatically teleport dog to owner
dog.do_custom = mobs_mc.make_owner_teleport_function(12) dog.do_custom = mobs_mc.make_owner_teleport_function(12)
dog.follow = mobs_mc.follow.dog dog.follow = mobs_mc.follow.dog
@ -254,12 +255,12 @@ mobs:spawn_specific(
"ExtremeHillsM", "ExtremeHillsM",
"BirchForestM", "BirchForestM",
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
9000, 9000,
7, 7,
mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.water+3,
mobs_mc.spawn_height.overworld_max) mobs_mc.spawn_height.overworld_max)
mobs:register_egg("mobs_mc:wolf", S("Wolf"), "mobs_mc_spawn_icon_wolf.png", 0) mobs:register_egg("mobs_mc:wolf", S("Wolf"), "mobs_mc_spawn_icon_wolf.png", 0)

View File

@ -46,6 +46,7 @@ table.insert(drops_zombie, {
}) })
local zombie = { local zombie = {
description = S("Zombie"),
type = "monster", type = "monster",
spawn_class = "hostile", spawn_class = "hostile",
hp_min = 20, hp_min = 20,
@ -102,6 +103,7 @@ mobs:register_mob("mobs_mc:zombie", zombie)
-- A smaller and more dangerous variant of the zombie -- A smaller and more dangerous variant of the zombie
local baby_zombie = table.copy(zombie) local baby_zombie = table.copy(zombie)
baby_zombie.description = S("Baby Zombie")
baby_zombie.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25} baby_zombie.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25}
baby_zombie.xp_min = 12 baby_zombie.xp_min = 12
baby_zombie.xp_max = 12 baby_zombie.xp_max = 12
@ -115,6 +117,7 @@ mobs:register_mob("mobs_mc:baby_zombie", baby_zombie)
-- Husk. -- Husk.
-- Desert variant of the zombie -- Desert variant of the zombie
local husk = table.copy(zombie) local husk = table.copy(zombie)
husk.description = S("Husk")
husk.textures = { husk.textures = {
{ {
"mobs_mc_empty.png", -- armor "mobs_mc_empty.png", -- armor
@ -132,6 +135,7 @@ mobs:register_mob("mobs_mc:husk", husk)
-- Baby husk. -- Baby husk.
-- A smaller and more dangerous variant of the husk -- A smaller and more dangerous variant of the husk
local baby_husk = table.copy(husk) local baby_husk = table.copy(husk)
baby_husk.description = S("Baby Husk")
baby_husk.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25} baby_husk.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25}
baby_husk.xp_min = 12 baby_husk.xp_min = 12
baby_husk.xp_max = 12 baby_husk.xp_max = 12

View File

@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
local pigman = { local pigman = {
description = S("Zombie Pigman"),
-- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked -- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked
type = "animal", type = "animal",
passive = false, passive = false,
@ -94,6 +95,7 @@ mobs:register_mob("mobs_mc:pigman", pigman)
-- A smaller and more dangerous variant of the pigman -- A smaller and more dangerous variant of the pigman
local baby_pigman = table.copy(pigman) local baby_pigman = table.copy(pigman)
baby_pigman.description = S("Baby Zombie Pigman")
baby_pigman.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25} baby_pigman.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25}
baby_pigman.xp_min = 13 baby_pigman.xp_min = 13
baby_pigman.xp_max = 13 baby_pigman.xp_max = 13
@ -112,33 +114,33 @@ mobs:register_mob("mobs_mc:baby_pigman", baby_pigman)
-- Regular spawning in the Nether -- Regular spawning in the Nether
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:pigman", "mobs_mc:pigman",
"nether", "nether",
"ground", "ground",
{ {
"Nether" "Nether"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
6000, 6000,
3, 3,
mobs_mc.spawn_height.nether_min, mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max) mobs_mc.spawn_height.nether_max)
-- Baby zombie is 20 times less likely than regular zombies -- Baby zombie is 20 times less likely than regular zombies
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:baby_pigman", "mobs_mc:baby_pigman",
"nether", "nether",
"ground", "ground",
{ {
"Nether" "Nether"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
100000, 100000,
4, 4,
mobs_mc.spawn_height.nether_min, mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max) mobs_mc.spawn_height.nether_max)
-- Spawning in Nether portals in the Overworld -- Spawning in Nether portals in the Overworld