New mobs_redo and update railcart, beds

This commit is contained in:
Maksim Gamarnik 2016-05-19 21:35:02 +03:00
parent 2ef5a77786
commit 43e19ede49
154 changed files with 2126 additions and 1871 deletions

View File

@ -41,10 +41,12 @@ function beds.save_spawns()
if not beds.spawn then
return
end
local data = {}
local output = io.open(org_file, "w")
for i, v in pairs(beds.spawn) do
output:write(v.x .. " " .. v.y .. " " .. v.z .. " " .. i .. "\n")
for k, v in pairs(beds.spawn) do
table.insert(data, string.format("%.1f %.1f %.1f %s\n", v.x, v.y, v.z, k))
end
output:write(table.concat(data))
io.close(output)
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

After

Width:  |  Height:  |  Size: 425 B

View File

@ -15,7 +15,6 @@ Changes in builtin HUD items:
- Uses better textures for Hotbar
- Uses texture for crosshair
- Positions of builtin statbars can be changed via "hud.conf" file
- Experimental "ItemWheel" that replaces the hotbar (must be enabled by adding "hud_item_wheel = true" in minetest.conf)
This mod gets provided as Modpack aswell, which includes the hunger mod (https://github.com/BlockMen/hunger)
More information concerning the hunger mechanics can be get there.

View File

@ -15,19 +15,6 @@ HUD_HUNGER_OFFSET = {x = 6, y = -124}
HUD_ARMOR_POS = {x = 0.5, y = 1}
HUD_ARMOR_OFFSET = {x = -248, y = -124}
-- Reorder everything when using ItemWeel
hud.item_wheel = minetest.setting_getbool("hud_item_wheel")
if hud.item_wheel then
HUD_HEALTH_POS = {x = 0.5,y = 1}
HUD_HEALTH_OFFSET = {x = -385, y = -77}
HUD_AIR_POS = {x = 0.5, y = 1}
HUD_AIR_OFFSET = {x = 150, y = -77}
HUD_HUNGER_POS = {x = 0.5, y = 1}
HUD_HUNGER_OFFSET = {x = 180, y = -44}
HUD_ARMOR_POS = {x = 0.5, y = 1}
HUD_ARMOR_OFFSET = {x = -415, y = -44}
end
-- read hud.conf settings
hud.read_conf()

View File

@ -5,7 +5,3 @@ dofile(modpath .. "/api.lua")
dofile(modpath .. "/functions.lua")
dofile(modpath .. "/builtin.lua")
dofile(modpath .. "/legacy.lua")
if hud.item_wheel then
dofile(modpath .. "/itemwheel.lua")
end

View File

@ -1,67 +0,0 @@
-= MOBS-MOD for MINETEST =-
by PilzAdam, KrupnovPavel, Zeg9, TenPlus1, kaadmy and MoNTE48
https://forum.minetest.net/viewtopic.php?f=9&t=9917
This mod contains the following additions:
- Giant Spiders (found in desert caves, drop string when killed)
- Bee's (found around flowers, drop honey when killed, right-click to pick up, also Beehives)
- Chicken (lays eggs, added fried egg, raw & cooked chicken, right-click to pick up)
- Cow (right-click with empty bucket to get bucket of milk, feed 8 wheat to replenish milk)
- Sheep (right-click for wool, feed 8 wheat to replenish wool)
- Warthog (the local pig that gives raw and cooked port)
- Rats (right-click to pick up and place, cook for a tasty treat)
- Sand, Dirt, Stone, Tree Monsters, Oerkki and Dungeon Masters as standard
- Lava Flan, Mese Monsters added to spice things up a bit
- Cook milk in furnace to get cheese wedge, 9 wedges make 1 cheese block
..with the following new features:
- Hitting a mob has knock-back effect like in minecraft, and with blood effect
- Mobs float in water, so monsters can still chase you
- Mobs can die from falling from a height
- Mobs have better health and drops
- Hitting a mob also puts them into fight mode (apart from animals)
- Compatible with Ethereal mod, mobs now spawn on ethereal worlds
Changelog:
1.26- Pathfinding feature added thanks to rnd, when monsters attack they become scary smart in finding you :) also, beehive produces honey now :)
1.25- Mobs no longer spawn within 12 blocks of player or despawn within same range, spawners now have player detection, Code tidy and tweak.
1.24- Added feature where certain animals run away when punched (runaway = true in mob definition)
1.23- Added mob spawner block for admin to setup spawners in-game (place and right click to enter settings)
1.22- Added ability to name tamed animals and npc using nametags, also npc will attack anyone who punches them apart from owner
1.21- Added some more error checking to reduce serialize.h error and added height checks for falling off cliffs (thanks cmdskp)
1.20- Error checking added to remove bad mobs, out of map limit mobs and stop serialize.h error
1.19- Chickens now drop egg items instead of placing the egg, also throwing eggs result in 1/8 chance of spawning chick
1.18- Added docile_by_day flag so that monsters will not attack automatically during daylight hours unless hit first
1.17- Added 'dogshoot' attack type, shoots when out of reach, melee attack when in reach, also api tweaks and self.reach added
1.16- Mobs follow multiple items now, Npc's can breed
1.15- Added Feeding/Taming/Breeding function, right-click to pick up any sheep with X mark on them and replace with new one to fix compatibility.
1.14- All .self variables saved in staticdata, Fixed self.health bug
1.13- Added capture function (thanks blert2112) chance of picking up mob with hand; net; magic lasso, replaced some .x models with newer .b3d one's
1.12- Added animal ownership so that players cannot steal your tamed animals
1.11- Added flying mobs (and swimming), fly=true and fly_in="air" or "deafult:water_source" for fishy
1,10- Footstep removed (use replace), explosion routine added for exploding mobs.
1.09- reworked breeding routine, added mob rotation value, added footstep feature, added jumping mobs with sounds feature, added magic lasso for picking up animals
1.08- Mob throwing attack has been rehauled so that they can damage one another, also drops and on_die function added
1.07- Npc's can now be set to follow player or stand by using self.order and self.owner variables
beta- Npc mob added, kills monsters, attacks player when punched, right click with food to heal or gold lump for drop
1.06- Changed recovery times after breeding, and time taken to grow up (can be sped up by feeding baby animal)
1.05- Added ExeterDad's bunny's which can be picked up and tamed with 4 carrots from farming redo or farming_plus, also shears added to get wool from sheep and lastly Jordach/BSD's kitten
1.04- Added mating for sheep, cows and hogs... feed animals to make horny and hope for a baby which is half size, will grow up quick though :)
1.03- Added mob drop/replace feature so that chickens can drop eggs, cow/sheep can eat grass/wheat etc.
1.02- Sheared sheep are remembered and spawn shaven, Warthogs will attack when threatened, Api additions
1.01- Mobs that suffer fall damage or die in water/lava/sunlight will now drop items
1.0 - more work on Api so that certain mobs can float in water while some sink like a brick :)
0.9 - Spawn eggs added for all mobs (admin only, cannot be placed in protected areas)... Api tweaked
0.8 - Added sounds to monster mobs (thanks Cyberpangolin for the sfx) and also chicken sound
0.7 - mobs.protected switch added to api.lua, when set to 1 mobs no longer spawn in protected areas, also bug fixes
0.6 - Api now supports multi-textured mobs, e.g oerkki, dungeon master, rats and chickens have random skins when spawning (sheep fix TODO), also new Honey block
0.5 - Mobs now float in water, die from falling, and some code improvements
0.4 - Dungeon Masters and Mese Monsters have much better aim due to shoot_offset, also they can both shoot through nodes that aren't walkable (flowers, grass etc) plus new sheep sound :)
0.3 - Added LOTT's Spider mob, made Cobwebs, added KPavel's Bee with Honey and Beehives (made texture), Warthogs now have sound and can be tamed, taming of shaved sheep or milked cow with 8 wheat so it will not despawn, many bug fixes :)
0.2 - Cooking bucket of milk into cheese now returns empty bucket
0.1 - Initial Release

View File

@ -1,120 +0,0 @@
-- Chicken by JK Murray
mobs:register_mob("mobs:chicken", {
type = "animal",
passive = true,
reach = 1,
hp_min = 3,
hp_max = 6,
armor = 100,
collisionbox = {-0.3, -0.75, -0.3, 0.3, 0.1, 0.3},
visual = "mesh",
mesh = "mobs_chicken.x",
-- seems a lot of textures but this fixes the problem with the model
textures = {
{"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png",
"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png"},
{"mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png",
"mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png"},
},
child_texture = {
{"mobs_chick.png", "mobs_chick.png", "mobs_chick.png", "mobs_chick.png",
"mobs_chick.png", "mobs_chick.png", "mobs_chick.png", "mobs_chick.png", "mobs_chick.png"},
},
makes_footstep_sound = true,
sounds = {
random = "mobs_chicken",
},
walk_velocity = 1,
jump = true,
drops = {
{name = "mobs:chicken_raw",
chance = 1, min = 1, max = 2},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fall_damage = 0,
fall_speed = -8,
animation = {
speed_normal = 15,
stand_start = 0,
stand_end = 1, -- 20
walk_start = 20,
walk_end = 40,
},
follow = {"farming:seed_wheat", "farming:seed_cotton"},
view_range = 5,
replace_rate = 8000,
replace_what = {"air"},
replace_with = "mobs:egg",
on_rightclick = function(self, clicker)
mobs:feed_tame(self, clicker, 8, true, true)
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
end,
})
mobs:spawn_specific("mobs:chicken",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
5, 20, 0, 4000, 1, 1, 31000
)
mobs:register_egg("mobs:chicken", "Chicken", "mobs_chicken_inv.png", 0)
-- egg
minetest.register_node("mobs:egg", {
description = "Chicken Egg",
tiles = {"mobs_chicken_egg.png"},
inventory_image = "mobs_chicken_egg.png",
visual_scale = 0.7,
drawtype = "plantlike",
wield_image = "mobs_chicken_egg.png",
paramtype = "light",
walkable = false,
is_ground_content = true,
sunlight_propagates = true,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
},
groups = {snappy=2, dig_immediate=3},
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name = "mobs:egg", param2 = 1})
end
end
})
-- fried egg
minetest.register_craftitem("mobs:chicken_egg_fried", {
description = "Fried Egg",
inventory_image = "mobs_chicken_egg_fried.png",
on_use = minetest.item_eat(2),
})
minetest.register_craft({
type = "cooking",
recipe = "mobs:egg",
output = "mobs:chicken_egg_fried",
})
-- raw chicken
minetest.register_craftitem("mobs:chicken_raw", {
description = "Raw Chicken",
inventory_image = "mobs_chicken_raw.png",
on_use = minetest.item_eat(2),
})
-- cooked chicken
minetest.register_craftitem("mobs:chicken_cooked", {
description = "Cooked Chicken",
inventory_image = "mobs_chicken_cooked.png",
on_use = minetest.item_eat(6),
})
minetest.register_craft({
type = "cooking",
recipe = "mobs:chicken_raw",
output = "mobs:chicken_cooked",
})

View File

@ -1,32 +0,0 @@
local path = minetest.get_modpath("mobs")
-- Mob Api
dofile(path.."/api.lua")
-- Animals
dofile(path.."/chicken.lua") -- JKmurray
dofile(path.."/cow.lua") -- KrupnoPavel
dofile(path.."/rat.lua") -- PilzAdam
dofile(path.."/sheep.lua") -- PilzAdam
dofile(path.."/bunny.lua") -- ExeterDad
dofile(path.."/bear.lua") -- KrupnoPavel
dofile(path.."/dog.lua") -- KrupnoPavel
dofile(path.."/pig.lua") -- KrupnoPavel
dofile(path.."/kitten.lua") -- Jordach/BFD
-- Monsters
dofile(path.."/spider.lua") -- AspireMint
dofile(path.."/zombie.lua") -- Blockmen
dofile(path.."/skeleton.lua") -- Blockmen
-- Mob Items
dofile(path.."/crafts.lua")
-- Spawner
dofile(path.."/spawner.lua")
-- Remove
dofile(path.."/npc.lua")

View File

@ -1,3 +0,0 @@
mobs:register_mob("mobs:npc", {
lifetimer = 1,
})

View File

@ -1,63 +0,0 @@
-- Warthog(Boar) by KrupnoPavel (MIT)
-- Changed to Boar and tweaked by Kaadmy (WTFPL) and MoNTE48 (LGPLv3)
mobs:register_mob("mobs:pig", {
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 2,
damage = 2,
hp_min = 5,
hp_max = 15,
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.1, 0.4},
visual = "mesh",
mesh = "mobs_pig.x",
textures = {
{"mobs_pig.png"},
},
makes_footstep_sound = true,
sounds = {
random = "mobs_pig",
attack = "mobs_pig_angry",
death = "mobs_pig_angry",
},
walk_velocity = 2,
run_velocity = 3,
jump = true,
follow = {"default:apple", "farming:potato"},
view_range = 10,
drops = {
{name = "mobs:pork_raw",
chance = 1, min = 1, max = 1},
{name = "mobs:pork_raw",
chance = 2, min = 1, max = 1},
{name = "mobs:pork_raw",
chance = 2, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 2,
animation = {
speed_normal = 20,
stand_start = 0,
stand_end = 60,
walk_start = 61,
walk_end = 80,
punch_start = 90,
punch_end = 110,
},
on_rightclick = function(self, clicker)
mobs:feed_tame(self, clicker, 8, true, true)
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
end,
})
mobs:spawn_specific("mobs:pig",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
0, 20, 0, 5000, 1, -31000, 31000
)
mobs:register_egg("mobs:pig", "Pig", "wool_pink.png", 1)

View File

@ -1,60 +0,0 @@
-- Rat by PilzAdam
mobs:register_mob("mobs:rat", {
type = "animal",
passive = true,
hp_min = 1,
hp_max = 4,
armor = 100,
collisionbox = {-0.25, -1, -0.25, 0.25, -0.8, 0.25},
visual = "mesh",
mesh = "mobs_rat.b3d",
textures = {
{"mobs_rat.png"},
{"mobs_rat2.png"},
},
makes_footstep_sound = false,
sounds = {
random = "mobs_rat",
},
drops = {
{name = "mobs:rat_meat",
chance = 1, min = 1, max = 1},
},
walk_velocity = 1,
run_velocity = 2,
runaway = true,
jump = true,
water_damage = 0,
lava_damage = 4,
light_damage = 0,
fear_height = 2,
})
mobs:spawn_specific("mobs:rat",
{"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
0, 20, 0, 4000, 1, -31000, 31000
)
mobs:register_egg("mobs:rat", "Rat", "mobs_rat_inventory.png", 0)
minetest.register_craftitem("mobs:rat_cooked", {
description = "Cooked Rat",
inventory_image = "mobs_cooked_rat.png",
on_use = minetest.item_eat(3),
})
minetest.register_craftitem("mobs:rat_meat", {
description = "Meat Rat",
inventory_image = "mobs_rat_inventory.png",
on_use = minetest.item_eat(1),
})
minetest.register_craft({
type = "cooking",
output = "mobs:rat_cooked",
recipe = "mobs:rat",
cooktime = 5,
})

View File

@ -1,142 +0,0 @@
local all_colours = {
"grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta",
"white", "orange", "violet", "brown", "pink", "dark_grey", "dark_green"
}
-- Sheep by PilzAdam
for _, col in ipairs(all_colours) do
mobs:register_mob("mobs:sheep_"..col, {
type = "animal",
passive = true,
hp_min = 6,
hp_max = 10,
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.3, 0.4},
visual = "mesh",
mesh = "mobs_sheep.b3d",
textures = {
{"mobs_sheep_"..col..".png"},
},
gotten_texture = {"mobs_sheep_shaved.png"},
gotten_mesh = "mobs_sheep_shaved.b3d",
makes_footstep_sound = true,
sounds = {
random = "mobs_sheep",
damage = "mobs_sheep_angry",
death = "mobs_sheep_angry",
},
walk_velocity = 1,
jump = true,
drops = {
{name = "mobs:meat_raw",
chance = 1, min = 1, max = 2},
{name = "wool:"..col,
chance = 1, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 2,
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 80,
walk_start = 81,
walk_end = 100,
},
follow = {"farming:wheat", "default:grass_5"},
view_range = 8,
replace_rate = 10,
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_with = "air",
replace_offset = -1,
on_rightclick = function(self, clicker)
local shpcolor = string.split(self.name,"_")[2]
if shpcolor =="dark" then
shpcolor = shpcolor.."_"..string.split(self.name,"_")[3]
end
--are we feeding?
if mobs:feed_tame(self, clicker, 8, true, true) then
--if full grow fuzz
if self.gotten == false then
self.object:set_properties({
textures = {"mobs_sheep_"..shpcolor..".png"},
mesh = "mobs_sheep.b3d",
})
end
return
end
local item = clicker:get_wielded_item()
local itemname = item:get_name()
--are we giving a haircut>
if itemname == "mobs:shears" then
if self.gotten == false and self.child == false then
self.gotten = true -- shaved
if minetest.get_modpath("wool") then
local pos = self.object:getpos()
pos.y = pos.y + 0.5
local obj = minetest.add_item(pos, ItemStack("wool:"..shpcolor.." "..math.random(1,3)))
if obj then
obj:setvelocity({
x = math.random(-1,1),
y = 5,
z = math.random(-1,1)
})
end
item:add_wear(650) -- 100 uses
clicker:set_wielded_item(item)
end
self.object:set_properties({
textures = {"mobs_sheep_shaved.png"},
mesh = "mobs_sheep_shaved.b3d",
})
end
return
end
local name = clicker:get_player_name()
--are we coloring?
if itemname:find("dye:") then
if self.gotten == false and self.child == false and self.tamed == true and name == self.owner then
local col = string.split(itemname,":")[2]
for _,c in pairs(all_colours) do
if c == col then
local pos = self.object:getpos()
self.object:remove()
local mob = minetest.add_entity(pos, "mobs:sheep_"..col)
local ent = mob:get_luaentity()
ent.owner = name
ent.tamed = true
-- take item
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
break
end
end
end
return
end
--are we capturing?
mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
end
})
mobs:register_egg("mobs:sheep_"..col, "Sheep ("..col..")", "wool_"..col..".png", 1)
end
mobs:spawn_specific("mobs:sheep_white",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
0, 20, 0, 5000, 1, -31000, 31000
)

View File

@ -1,157 +0,0 @@
-- mob spawner
local spawner_default = "mobs:pumba 10 15 0 0"
minetest.register_node("mobs:spawner", {
tiles = {"mob_spawner.png"},
drawtype = "glasslike",
paramtype = "light",
walkable = true,
description = "Mob Spawner",
groups = {cracky = 1},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
-- text entry formspec
meta:set_string("formspec", "field[text;Mob MinLight MaxLight Amount PlayerDist;${command}]")
meta:set_string("infotext", "Spawner Not Active (enter settings)")
meta:set_string("command", spawner_default)
end,
on_right_click = function(pos, placer)
if minetest.is_protected(pos, placer:get_player_name()) then
return
end
-- local meta = minetest.get_meta(pos)
end,
on_receive_fields = function(pos, formname, fields, sender)
if not fields.text or fields.text == "" then
return
end
local meta = minetest.get_meta(pos)
local comm = fields.text:split(" ")
local name = sender:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local mob = comm[1] -- mob to spawn
local mlig = tonumber(comm[2]) -- min light
local xlig = tonumber(comm[3]) -- max light
local num = tonumber(comm[4]) -- total mobs in area
local pla = tonumber(comm[5])-- player distance (0 to disable)
if mob and mob ~= "" and mobs.spawning_mobs[mob] == true
and num and num >= 0 and num <= 10
and mlig and mlig >= 0 and mlig <= 15
and xlig and xlig >= 0 and xlig <= 15
and pla and pla >=0 and pla <= 20 then
meta:set_string("command", fields.text)
meta:set_string("infotext", "Spawner Active (" .. mob .. ")")
else
minetest.chat_send_player(name, "Mob Spawner settings failed!")
end
end,
})
-- spawner abm
minetest.register_abm({
nodenames = {"mobs:spawner"},
interval = 10,
chance = 4,
catch_up = false,
action = function(pos, node, active_object_count, active_object_count_wider)
-- check objects inside 9x9 area around spawner
local objs = minetest.get_objects_inside_radius(pos, 9)
-- get meta and command
local meta = minetest.get_meta(pos)
local comm = meta:get_string("command"):split(" ")
-- get settings from command
local mob = comm[1]
local mlig = tonumber(comm[2])
local xlig = tonumber(comm[3])
local num = tonumber(comm[4])
local pla = tonumber(comm[5]) or 0
-- if amount is 0 then do nothing
if num == 0 then
return
end
local count = 0
local ent = nil
-- count mob objects of same type in area
for k, obj in pairs(objs) do
ent = obj:get_luaentity()
if ent and ent.name == mob then
count = count + 1
end
end
-- is there too many of same type?
if count >= num then
return
end
-- spawn mob if player detected and in range
if pla > 0 then
local in_range = 0
local objs = minetest.get_objects_inside_radius(pos, pla)
for _,oir in pairs(objs) do
if oir:is_player() then
in_range = 1
break
end
end
-- player not found
if in_range == 0 then
return
end
end
-- find air blocks within 5 nodes of spawner
local air = minetest.find_nodes_in_area(
{x = pos.x - 5, y = pos.y, z = pos.z - 5},
{x = pos.x + 5, y = pos.y, z = pos.z + 5},
{"air"})
-- spawn in random air block
if air and #air > 0 then
local pos2 = air[math.random(#air)]
local lig = minetest.get_node_light(pos2) or 0
pos2.y = pos2.y + 0.5
-- only if light levels are within range
if lig >= mlig and lig <= xlig then
minetest.add_entity(pos2, mob)
end
end
end
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

View File

@ -1,76 +0,0 @@
mobs:register_mob("mobs:zombie", {
type = "monster",
visual = "mesh",
mesh = "zombie.x",
textures = {
{"mobs_zombie.png"},
},
collisionbox = {-0.25, -1, -0.3, 0.25, 0.75, 0.3},
animation = {
speed_normal = 10, speed_run = 15,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 188,
run_start = 168, run_end = 188
},
makes_footstep_sound = true,
sounds = {
random = "mobs_zombie.1",
war_cry = "mobs_zombie.3",
attack = "mobs_zombie.2",
damage = "mobs_zombie_hit",
death = "mobs_zombie_death",
},
hp_min = 15,
hp_max = 25,
armor = 100,
knock_back = 1,
light_damage = 1,
lava_damage = 10,
fear_height = 2,
damage = 2,
reach = 2,
attack_type = "dogfight",
group_attack = true,
view_range = 15,
walk_chance = 75,
walk_velocity = 0.5,
run_velocity = 0.5,
jump = false,
drops = {
{name = "mobs:rotten_flesh", chance = 1, min = 1, max = 3,}
},
})
--name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs:zombie",
{"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
{"air"},
0, 7, 0, 4000, 1, -31000, 31000
)
mobs:register_egg("mobs:zombie", "Zombie", "zombie_head.png", 0)
-- rotten flesh
minetest.register_craftitem("mobs:rotten_flesh", {
description = "Rotten Flesh",
inventory_image = "mobs_rotten_flesh.png",
on_use = minetest.item_eat(1),
})
-- spawner block
minetest.register_node("mobs:zombie_spawner", {
description = "Zombie Spawner",
tiles = {"zombie_head.png"},
is_ground_content = false,
groups = {cracky=3, stone=1, mob_spawner=1},
sounds = default.node_sound_stone_defaults({
dug = {name="mobs_zombie_death", gain=0.25}
})
})
minetest.register_abm({
nodenames = {"mobs:zombie_spawner"},
interval = 60.0,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.add_entity(pos, "mobs:zombie")
end
})

View File

@ -1,5 +1,5 @@
-- bear
mobs:register_mob("mobs:bear", {
mobs:register_mob("mobs_animal:bear", {
type = "npc",
visual = "mesh",
mesh = "mobs_bear.x",
@ -7,12 +7,12 @@
{"mobs_bear.png"},
},
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1.49, 0.5},
animation = {
speed_normal = 15, speed_run = 24,
stand_start = 0, stand_end = 30,
walk_start = 35, walk_end = 65,
run_start = 105, run_end = 135,
punch_start = 70, punch_end = 100
animation = {
speed_normal = 15, speed_run = 24,
stand_start = 0, stand_end = 30,
walk_start = 35, walk_end = 65,
run_start = 105, run_end = 135,
punch_start = 70, punch_end = 100
},
makes_footstep_sound = true,
sounds = {
@ -20,14 +20,14 @@
attack = "mobs_bear_angry",
},
reach = 2,
hp_min= 10,
hp_max = 15,
hp_min = 8,
hp_max = 12,
armor = 100,
knock_back = 1,
lava_damage = 10,
fall_damage = 5,
fear_height = 2,
damage = 6,
damage = 4,
reach = 3,
attack_type = "dogfight",
attacks_monsters = true,
@ -35,8 +35,8 @@
stepheight = 1.1,
jump = false,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 3, max = 6},
{name = "mobs:leather", chance = 1, min = 1, max = 2}
{name = "mobs:meat_raw", chance = 1, min = 2, max = 4},
{name = "mobs:leather", chance = 1, min = 1, max = 2}
},
follow = {"mobs:honey", "farming:raspberries", "farming:blueberries", "farming_plus:strawberry_item",
"bushes:strawberry", "bushes:blackberry", "bushes:blueberry", "bushes:raspberry",
@ -46,7 +46,7 @@
"bushes:strawberry_bush", "bushes:blackberry_bush", "bushes:blueberry_bush", "bushes:raspberry_bush",
"bushes:gooseberry_bush", "bushes:mixed_berry_bush"},
replace_with = "air",
on_rightclick = function(self, clicker)
on_rightclick = function (self, clicker)
if mobs:feed_tame(self, clicker, 10, true) then
return
end
@ -69,16 +69,17 @@
end
})
local l_spawn_elevation_min = minetest.setting_get("water_level")
if l_spawn_elevation_min then
l_spawn_elevation_min = l_spawn_elevation_min - 10
else
l_spawn_elevation_min = -10
end
--name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs:bear",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
5, 20, 0, 6000, 1, 1, 31000
)
mobs:register_egg("mobs:bear", "Bear", "wool_brown.png", 1)
local l_spawn_elevation_min = minetest.setting_get("water_level")
if l_spawn_elevation_min then
l_spawn_elevation_min = l_spawn_elevation_min - 10
else
l_spawn_elevation_min = -10
end
mobs:register_spawn("mobs_animal:bear",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 4000, 1, 31000, true)
mobs:register_egg("mobs_animal:bear", "Bear", "wool_brown.png", 1)
-- compatibility
mobs:alias_mob("mobs:bear", "mobs_animal:bear")

View File

@ -1,7 +1,7 @@
-- Bunny by ExeterDad
mobs:register_mob("mobs:bunny", {
mobs:register_mob("mobs_animal:bunny", {
type = "animal",
passive = true,
reach = 1,
@ -40,7 +40,7 @@ mobs:register_mob("mobs:bunny", {
punch_end = 24,
},
follow = {"farming:carrot", "farming_plus:carrot_item"},
view_range = 10,
view_range = 8,
replace_rate = 10,
replace_what = {"farming:carrot_7", "farming:carrot_8", "farming_plus:carrot"},
replace_with = "air",
@ -59,8 +59,8 @@ mobs:register_mob("mobs:bunny", {
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
end
self.object:set_properties({
textures = {"mobs_bunny_evil.png"},
})
@ -73,15 +73,15 @@ mobs:register_mob("mobs:bunny", {
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
end,
attack_type = "dogfight",
damage = 5,
})
mobs:register_spawn("mobs_animal:bunny",
{"default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 0, 3000, 2, 31000, true)
mobs:spawn_specific("mobs:bunny",
{"default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
0, 20, 0, 4000, 1, 1, 31000
)
mobs:register_egg("mobs_animal:bunny", "Bunny", "mobs_bunny_inv.png", 0)
mobs:register_egg("mobs:bunny", "Bunny", "mobs_bunny_inv.png", 0)
-- compatibility
mobs:alias_mob("mobs:bunny", "mobs_animal:bunny")

View File

@ -0,0 +1,253 @@
-- Chicken by JK Murray
mobs:register_mob("mobs_animal:chicken", {
type = "animal",
passive = true,
hp_min = 3,
hp_max = 6,
armor = 100,
collisionbox = {-0.3, -0.75, -0.3, 0.3, 0.1, 0.3},
visual = "mesh",
mesh = "mobs_chicken.x",
-- seems a lot of textures but this fixes the problem with the model
textures = {
{"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png",
"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png"},
},
child_texture = {
{"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png",
"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png"},
},
makes_footstep_sound = true,
sounds = {
random = "mobs_chicken",
},
walk_velocity = 1,
run_velocity = 3,
runaway = true,
jump = true,
drops = {
{name = "mobs:chicken_raw", chance = 1, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fall_damage = 0,
fall_speed = -8,
fear_height = 5,
animation = {
speed_normal = 15,
stand_start = 0,
stand_end = 1, -- 20
walk_start = 20,
walk_end = 40,
},
follow = {"farming:seed_wheat", "farming:seed_cotton"},
view_range = 5,
on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 8, true, true) then
return
end
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
end,
do_custom = function(self)
if not self.child
and math.random(1, 500) == 1 then
local pos = self.object:getpos()
minetest.add_item(pos, "mobs:egg")
minetest.sound_play("default_place_node_hard", {
pos = pos,
gain = 1.0,
max_hear_distance = 5,
})
end
end,
})
mobs:register_spawn("mobs_animal:chicken",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 3000, 1, 31000, true)
mobs:register_egg("mobs_animal:chicken", "Chicken", "mobs_chicken_inv.png", 0)
-- compatibility
mobs:alias_mob("mobs:chicken", "mobs_animal:chicken")
-- egg entity
mobs:register_arrow("mobs_animal:egg_entity", {
visual = "sprite",
visual_size = {x=.5, y=.5},
textures = {"mobs_chicken_egg.png"},
velocity = 6,
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 1},
}, nil)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 1},
}, nil)
end,
hit_node = function(self, pos, node)
local num = math.random(1, 5)
if num == 1 then
pos.y = pos.y + 1
local nod = minetest.get_node_or_nil(pos)
if not nod
or not minetest.registered_nodes[nod.name]
or minetest.registered_nodes[nod.name].walkable == true then
return
end
local mob = minetest.add_entity(pos, "mobs_animal:chicken")
local ent2 = mob:get_luaentity()
mob:set_properties({
textures = ent2.child_texture[1],
visual_size = {
x = ent2.base_size.x / 2,
y = ent2.base_size.y / 2
},
collisionbox = {
ent2.base_colbox[1] / 2,
ent2.base_colbox[2] / 2,
ent2.base_colbox[3] / 2,
ent2.base_colbox[4] / 2,
ent2.base_colbox[5] / 2,
ent2.base_colbox[6] / 2
},
})
ent2.child = true
ent2.tamed = true
ent2.owner = self.playername
end
end
})
-- egg throwing item
local egg_GRAVITY = 9
local egg_VELOCITY = 19
-- shoot egg
local mobs_shoot_egg = function (item, player, pointed_thing)
local playerpos = player:getpos()
minetest.sound_play("default_place_node_hard", {
pos = playerpos,
gain = 1.0,
max_hear_distance = 5,
})
local obj = minetest.add_entity({
x = playerpos.x,
y = playerpos.y +1.5,
z = playerpos.z
}, "mobs_animal:egg_entity")
local ent = obj:get_luaentity()
local dir = player:get_look_dir()
ent.velocity = egg_VELOCITY -- needed for api internal timing
ent.switch = 1 -- needed so that egg doesn't despawn straight away
obj:setvelocity({
x = dir.x * egg_VELOCITY,
y = dir.y * egg_VELOCITY,
z = dir.z * egg_VELOCITY
})
obj:setacceleration({
x = dir.x * -3,
y = -egg_GRAVITY,
z = dir.z * -3
})
-- pass player name to egg for chick ownership
local ent2 = obj:get_luaentity()
ent2.playername = player:get_player_name()
item:take_item()
return item
end
-- egg
minetest.register_node(":mobs:egg", {
description = "Chicken Egg",
tiles = {"mobs_chicken_egg.png"},
inventory_image = "mobs_chicken_egg.png",
visual_scale = 0.7,
drawtype = "plantlike",
wield_image = "mobs_chicken_egg.png",
paramtype = "light",
walkable = false,
is_ground_content = true,
sunlight_propagates = true,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
},
groups = {snappy = 2, dig_immediate = 3},
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name = "mobs:egg", param2 = 1})
end
end,
on_use = mobs_shoot_egg
})
-- fried egg
minetest.register_craftitem(":mobs:chicken_egg_fried", {
description = "Fried Egg",
inventory_image = "mobs_chicken_egg_fried.png",
on_use = minetest.item_eat(2),
})
minetest.register_craft({
type = "cooking",
recipe = "mobs:egg",
output = "mobs:chicken_egg_fried",
})
-- raw chicken
minetest.register_craftitem(":mobs:chicken_raw", {
description = "Raw Chicken",
inventory_image = "mobs_chicken_raw.png",
on_use = minetest.item_eat(2),
})
-- cooked chicken
minetest.register_craftitem(":mobs:chicken_cooked", {
description = "Cooked Chicken",
inventory_image = "mobs_chicken_cooked.png",
on_use = minetest.item_eat(6),
})
minetest.register_craft({
type = "cooking",
recipe = "mobs:chicken_raw",
output = "mobs:chicken_cooked",
})

View File

@ -1,18 +1,21 @@
-- Cow by Krupnovpavel
mobs:register_mob("mobs:cow", {
-- Cow by Krupnopavel (additional texture by JurajVajda)
mobs:register_mob("mobs_animal:cow", {
type = "animal",
passive = false,
attack_type = "dogfight",
reach = 2,
damage = 4,
hp_min = 10,
hp_max = 15,
damage = 2,
hp_min = 8,
hp_max = 12,
armor = 100,
collisionbox = {-0.8, -0.01, -0.8, 0.8, 1.3, 0.8},
visual = "mesh",
mesh = "mobs_cow.x",
textures = {
{"mobs_cow.png"},
{"mobs_cow2.png"},
},
makes_footstep_sound = true,
sounds = {
@ -22,10 +25,8 @@ mobs:register_mob("mobs:cow", {
run_velocity = 2,
jump = true,
drops = {
{name = "mobs:meat_raw",
chance = 1, min = 1, max = 3},
{name = "mobs:leather",
chance = 1, min = 0, max = 2},
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
water_damage = 1,
lava_damage = 5,
@ -45,7 +46,7 @@ mobs:register_mob("mobs:cow", {
follow = "farming:wheat",
view_range = 7,
replace_rate = 10,
replace_what = {"farming:wheat_8"},
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_with = "air",
fear_height = 2,
on_rightclick = function(self, clicker)
@ -92,16 +93,16 @@ mobs:register_mob("mobs:cow", {
end,
})
mobs:spawn_specific("mobs:cow",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
5, 20, 0, 6000, 1, 1, 31000
)
mobs:register_spawn("mobs_animal:cow",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 4000, 1, 31000, true)
mobs:register_egg("mobs:cow", "Cow", "default_grass.png", 1)
mobs:register_egg("mobs_animal:cow", "Cow", "default_grass.png", 1)
-- compatibility
mobs:alias_mob("mobs:cow", "mobs_animal:cow")
-- bucket of milk
minetest.register_craftitem("mobs:bucket_milk", {
minetest.register_craftitem(":mobs:bucket_milk", {
description = "Bucket of Milk",
inventory_image = "mobs_bucket_milk.png",
stack_max = 1,
@ -109,7 +110,7 @@ minetest.register_craftitem("mobs:bucket_milk", {
})
-- cheese wedge
minetest.register_craftitem("mobs:cheese", {
minetest.register_craftitem(":mobs:cheese", {
description = "Cheese",
inventory_image = "mobs_cheese.png",
on_use = minetest.item_eat(4),
@ -124,7 +125,7 @@ minetest.register_craft({
})
-- cheese block
minetest.register_node("mobs:cheeseblock", {
minetest.register_node(":mobs:cheeseblock", {
description = "Cheese Block",
tiles = {"mobs_cheeseblock.png"},
is_ground_content = false,
@ -146,4 +147,4 @@ minetest.register_craft({
recipe = {
{'mobs:cheeseblock'},
}
})
})

View File

@ -0,0 +1,2 @@
default
mobs

View File

@ -1,8 +1,6 @@
if mobs.mod and mobs.mod == "redo" then
-- wolf
mobs:register_mob("mobs:wolf", {
mobs:register_mob("mobs_animal:wolf", {
type = "animal",
visual = "mesh",
mesh = "mobs_wolf.x",
@ -11,18 +9,18 @@ if mobs.mod and mobs.mod == "redo" then
},
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
animation = {
speed_normal = 20, speed_run = 30,
stand_start = 10, stand_end = 20,
walk_start = 75, walk_end = 100,
run_start = 100, run_end = 130,
punch_start = 135, punch_end = 155
speed_normal = 20, speed_run = 30,
stand_start = 10, stand_end = 20,
walk_start = 75, walk_end = 100,
run_start = 100, run_end = 130,
punch_start = 135, punch_end = 155
},
makes_footstep_sound = true,
sounds = {
war_cry = "mobs_wolf_attack"
},
reach = 2,
hp_min = 6,
hp_min = 8,
hp_max = 10,
armor = 100,
lava_damage = 5,
@ -36,10 +34,10 @@ if mobs.mod and mobs.mod == "redo" then
run_velocity = 3,
stepheight = 1.1,
follow = "mobs:meat_raw",
on_rightclick = function(self, clicker)
on_rightclick = function (self, clicker)
if mobs:feed_tame(self, clicker, 2, false) then
if self.food == 0 then
local mob = minetest.add_entity(self.object:getpos(), "mobs:dog")
local mob = minetest.add_entity(self.object:getpos(), "mobs_animal:dog")
local ent = mob:get_luaentity()
ent.owner = clicker:get_player_name()
ent.following = clicker
@ -52,22 +50,20 @@ if mobs.mod and mobs.mod == "redo" then
end
})
local l_spawn_elevation_min = minetest.setting_get("water_level")
if l_spawn_elevation_min then
l_spawn_elevation_min = l_spawn_elevation_min - 5
else
l_spawn_elevation_min = -5
end
--name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs:wolf",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
0, 20, 0, 6000, 1, 1, 31000
)
mobs:register_egg("mobs:wolf", "Wolf", "wool_grey.png", 1)
local l_spawn_elevation_min = minetest.setting_get("water_level")
if l_spawn_elevation_min then
l_spawn_elevation_min = l_spawn_elevation_min - 5
else
l_spawn_elevation_min = -5
end
mobs:register_spawn("mobs_animal:wolf",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 0, 4000, 1, 31000, true)
mobs:register_egg("mobs_animal:wolf", "Wolf", "wool_grey.png", 1)
-- Dog
mobs:register_mob("mobs:dog", {
mobs:register_mob("mobs_animal:dog", {
type = "npc",
visual = "mesh",
mesh = "mobs_wolf.x",
@ -76,11 +72,11 @@ if mobs.mod and mobs.mod == "redo" then
},
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
animation = {
speed_normal = 20, speed_run = 30,
stand_start = 10, stand_end = 20,
walk_start = 75, walk_end = 100,
run_start = 100, run_end = 130,
punch_start = 135, punch_end = 155
speed_normal = 20, speed_run = 30,
stand_start = 10, stand_end = 20,
walk_start = 75, walk_end = 100,
run_start = 100, run_end = 130,
punch_start = 135, punch_end = 155
},
makes_footstep_sound = true,
sounds = {
@ -100,8 +96,8 @@ if mobs.mod and mobs.mod == "redo" then
walk_velocity = 2,
run_velocity = 4,
stepheight = 1.1,
follow = "mobs:raw_meat",
on_rightclick = function(self, clicker)
follow = "mobs_animal:raw_meat",
on_rightclick = function (self, clicker)
if mobs:feed_tame(self, clicker, 6, true) then
return
end
@ -124,6 +120,8 @@ if mobs.mod and mobs.mod == "redo" then
end
})
mobs:register_egg("mobs:dog", "Dog", "wool_brown.png", 1)
mobs:register_egg("mobs_animal:dog", "Dog", "wool_brown.png", 1)
end
-- compatibility
mobs:alias_mob("mobs:wolf", "mobs_animal:wolf")
mobs:alias_mob("mobs:dog", "mobs_animal:dog")

View File

@ -0,0 +1,17 @@
local path = minetest.get_modpath("mobs_animal")
-- Animals
dofile(path .. "/chicken.lua") -- JKmurray
dofile(path .. "/cow.lua") -- KrupnoPavel
dofile(path .. "/sheep.lua") -- PilzAdam
dofile(path .. "/bunny.lua") -- ExeterDad
dofile(path .. "/kitten.lua") -- Jordach/BFD
dofile(path .. "/dog.lua") -- KrupnoPavel
dofile(path .. "/pig.lua") -- KrupnoPavel
dofile(path .. "/bear.lua") -- KrupnoPavel
-- Removed
dofile(path .. "/rat.lua") -- Jordach/BFD

View File

@ -1,11 +1,10 @@
-- Kitten by Jordach / BFD
mobs:register_mob("mobs:kitten", {
mobs:register_mob("mobs_animal:kitten", {
type = "animal",
passive = true,
reach = 2,
hp_min = 5,
hp_min = 8,
hp_max = 10,
armor = 100,
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.1, 0.3},
@ -26,10 +25,9 @@ mobs:register_mob("mobs:kitten", {
run_velocity = 2,
runaway = true,
jump = false,
drops = {
{name = "farming:string",
chance = 1, min = 1, max = 1},
},
--drops = {
-- {name = "farming:string", chance = 1, min = 1, max = 1},
--},
water_damage = 1,
lava_damage = 5,
fear_height = 3,
@ -40,22 +38,22 @@ mobs:register_mob("mobs:kitten", {
walk_start = 0,
walk_end = 96,
},
follow = {"mobs:rat"},
follow = {"mobs:rat", "default:fish_raw"},
view_range = 8,
on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 4, true, true) then
return
end
mobs:capture_mob(self, clicker, 50, 50, 90, false, nil)
end
})
--name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs:kitten",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
{"air"},
5, 20, 0, 5000, 1, 1, 31000
)
mobs:register_egg("mobs:kitten", "Kitten", "mobs_kitten_inv.png", 0)
mobs:register_spawn("mobs_animal:kitten",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 5000, 1, 31000, true)
mobs:register_egg("mobs_animal:kitten", "Kitten", "mobs_kitten_inv.png", 0)
-- compatibility
mobs:alias_mob("mobs:kitten", "mobs_animal:kitten")

View File

@ -0,0 +1,63 @@
-- Warthog(Boar) by KrupnoPavel (MIT)
-- Changed to Boar and tweaked by Kaadmy (WTFPL) and MoNTE48 (LGPLv3)
mobs:register_mob("mobs_animal:pig", {
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 2,
damage = 2,
hp_min = 5,
hp_max = 15,
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.1, 0.4},
visual = "mesh",
mesh = "mobs_pig.x",
textures = {
{"mobs_pig.png"},
},
makes_footstep_sound = true,
sounds = {
random = "mobs_pig",
attack = "mobs_pig_angry",
},
walk_velocity = 2,
run_velocity = 3,
jump = true,
follow = {"default:apple", "farming:potato"},
view_range = 5,
drops = {
{name = "mobs:pork_raw",
chance = 1, min = 1, max = 1},
{name = "mobs:pork_raw",
chance = 2, min = 1, max = 1},
{name = "mobs:pork_raw",
chance = 2, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 2,
animation = {
speed_normal = 20,
stand_start = 0,
stand_end = 60,
walk_start = 61,
walk_end = 80,
punch_start = 90,
punch_end = 110,
},
on_rightclick = function (self, clicker)
mobs:feed_tame(self, clicker, 8, true, true)
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
end,
})
mobs:register_spawn("mobs_animal:pig",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 4000, 1, 31000, true)
mobs:register_egg("mobs_animal:pig", "Pig", "wool_pink.png", 1)
-- compatibility
mobs:alias_mob("mobs:pig", "mobs_animal:pig")

View File

@ -0,0 +1,8 @@
mobs:register_mob("mobs_animal:rat", {
lifetimer = 1,
})
-- compatibility
mobs:alias_mob("mobs:rat", "mobs_animal:rat")
mobs:alias_mob("mobs:rat_meat", "mobs:meat_raw")
mobs:alias_mob("mobs:rat_cooked", "mobs:meat")

View File

@ -0,0 +1,36 @@
ANIMAL MOBS
Bee
- Tends to buzz around flowers and gives honey when killed, you can also right-click a bee to pick it up and place in inventory. 3x bee's in a row can craft a beehive.
Bunny
- Bunnies appear in green grass areas (prairie biome in ethereal) and can be tamed with 4 carrots. Can also be picked up and placed in inventory and gives 1-2 meat when killed.
Chicken
- Found in green areas (bamboo biome in ethereal) and lays eggs on flat ground, Can be picked up and placed in inventory and gives 1-2 raw chicken when killed. Feed 8x wheat seed to breed.
Cow
- Wanders around eating grass/wheat and can be right-clicked with empty bucket to get milk. Cows will defend themselves when hit and can be right-clicked with 8x wheat to tame and breed.
Kitten
- Found on green grass these cute cats walk around and can be picked up and placed in inventory as pets or right-clicked with 4x raw fish (found in ethereal) and tamed.
Rat
- Typically found around stone they can be picked up and cooked for eating.
Sheep
- Green grass and wheat munchers that can be clipped using shears to give 1-3 wool. Feed sheep 8x wheat to regrow wool, tame and breed. Will drop 1-3 meat when killed.
Warthog
- Warthogs unlike pigs defend themselves when hit and give 1-3 raw pork when killed, they can also be right-clicked with 8x apples to tame or breed.
Note: After breeding animals need to rest for 4 minutes, baby animals take 4 minutes to grow up and feeding them helps them grow quicker...

View File

@ -0,0 +1,196 @@
local all_colours = {
{"black", "Black" },
{"blue", "Blue" },
{"brown", "Brown" },
{"cyan", "Cyan" },
{"dark_green", "Dark Green"},
{"dark_grey", "Dark Grey" },
{"green", "Green" },
{"grey", "Grey" },
{"magenta", "Magenta" },
{"orange", "Orange" },
{"pink", "Pink" },
{"red", "Red" },
{"violet", "Violet" },
{"white", "White" },
{"yellow", "Yellow" },
}
-- Sheep by PilzAdam
for _, col in pairs(all_colours) do
mobs:register_mob("mobs_animal:sheep_"..col[1], {
type = "animal",
passive = true,
hp_min = 6,
hp_max = 10,
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.3, 0.4},
visual = "mesh",
mesh = "mobs_sheep.b3d",
textures = {
{"mobs_sheep_" .. col[1] .. ".png"},
},
gotten_texture = {"mobs_sheep_shaved.png"},
gotten_mesh = "mobs_sheep_shaved.b3d",
makes_footstep_sound = true,
sounds = {
random = "mobs_sheep",
damage = "mobs_sheep_angry",
},
walk_velocity = 1,
run_velocity = 2,
runaway = true,
jump = true,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 2},
{name = "wool:"..col[1], chance = 1, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 80,
walk_start = 81,
walk_end = 100,
},
follow = {"farming:wheat", "default:grass_5"},
view_range = 8,
replace_rate = 10,
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_with = "air",
replace_offset = -1,
fear_height = 3,
on_rightclick = function(self, clicker)
--are we feeding?
if mobs:feed_tame(self, clicker, 8, true, true) then
--if full grow fuzz
if self.gotten == false then
self.object:set_properties({
textures = {"mobs_sheep_"..col[1]..".png"},
mesh = "mobs_sheep.b3d",
})
end
return
end
local item = clicker:get_wielded_item()
local itemname = item:get_name()
--are we giving a haircut>
if itemname == "mobs:shears" then
if self.gotten ~= false
and self.child ~= false
and not minetest.get_modpath("wool") then
return
end
self.gotten = true -- shaved
local obj = minetest.add_item(
self.object:getpos(),
ItemStack( "wool:" .. col[1] .. " " .. math.random(1, 3) )
)
if obj then
obj:setvelocity({
x = math.random(-1, 1),
y = 5,
z = math.random(-1, 1)
})
end
item:add_wear(650) -- 100 uses
clicker:set_wielded_item(item)
self.object:set_properties({
textures = {"mobs_sheep_shaved.png"},
mesh = "mobs_sheep_shaved.b3d",
})
return
end
local name = clicker:get_player_name()
--are we coloring?
if itemname:find("dye:") then
if self.gotten == false
and self.child == false
and self.tamed == true
and name == self.owner then
local colr = string.split(itemname, ":")[2]
for _,c in pairs(all_colours) do
if c[1] == colr then
local pos = self.object:getpos()
self.object:remove()
local mob = minetest.add_entity(pos, "mobs_animal:sheep_" .. colr)
local ent = mob:get_luaentity()
ent.owner = name
ent.tamed = true
-- take item
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
break
end
end
end
return
end
--are we capturing?
mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
end
})
mobs:register_egg("mobs_animal:sheep_"..col[1], col[2] .. " Sheep", "wool_"..col[1]..".png", 1)
-- compatibility
mobs:alias_mob("mobs:sheep_" .. col[1], "mobs_animal:sheep_" .. col[1])
end
mobs:register_spawn("mobs_animal:sheep_white",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 12000, 1, 31000, true)
mobs:register_spawn("mobs_animal:sheep_grey",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 12000, 1, 31000, true)
mobs:register_spawn("mobs_animal:sheep_dark_grey",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 12000, 1, 31000, true)
mobs:register_spawn("mobs_animal:sheep_black",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 12000, 1, 31000, true)
mobs:register_spawn("mobs_animal:sheep_brown",
{"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 5, 12000, 1, 31000, true)
-- compatibility
mobs:alias_mob("mobs:sheep", "mobs_animal:sheep_white")

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

View File

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

View File

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

View File

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

View File

Before

Width:  |  Height:  |  Size: 601 B

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

View File

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 364 B

View File

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

View File

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

View File

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 355 B

View File

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 401 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

View File

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 1017 B

View File

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 360 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 620 B

View File

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 338 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Some files were not shown because too many files have changed in this diff Show More