Update the mobs mod

- Fixed racist sheep
- Mobs fall slower in water
- Can only dye sheep if you own it
- Cannot dye a dye'd sheep :)
- Added coloured sheep
- Blast tweak
- Tweak and Tidy code
- tweaked env_damage
- Re-fixed mob arrow
- Fixed mob arrow
- Added evil bunny texture
- Code tidy
- Tidied code
- Replaced some models with .b3d variants, tweaked env_damage routine
- Fixed ability to take animal owned by another player bug
- Added female NPC skin
- Fixed typo
- hear distance added to mobs
- Npc works with new pickup function
- Added capture routine (thanks blert2112)
- explosion function cannot damage protected or unbreakable nodes
- water swimmers cannot move out of water
- updated npc health restoration
This commit is contained in:
Ombridride 2015-07-15 23:31:54 +02:00
parent 4f2837a4a7
commit c93567ef87
42 changed files with 261 additions and 34745 deletions

View File

@ -28,6 +28,7 @@ This mod contains the following additions:
Changelog:
1.13- Added capture function (thanks blert2112) chance of picking up mob with hand, net and magic lasso
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.

View File

@ -1,4 +1,4 @@
-- Mobs Api (29th May 2015)
-- Mobs Api (29th June 2015)
mobs = {}
mobs.mod = "redo"
@ -9,6 +9,7 @@ mobs.protected = 0
local damage_enabled = minetest.setting_getbool("enable_damage")
local peaceful_only = minetest.setting_getbool("only_peaceful_mobs")
local enable_blood = minetest.setting_getbool("mobs_enable_blood") or true
mobs.protected = tonumber(minetest.setting_get("mobs_spawn_protected")) or 0
function mobs:register_mob(name, def)
minetest.register_entity(name, {
@ -16,13 +17,14 @@ function mobs:register_mob(name, def)
name = name,
fly = def.fly,
fly_in = def.fly_in or "air",
owner = def.owner,
owner = def.owner or "",
order = def.order or "",
on_die = def.on_die,
do_custom = def.do_custom,
jump_height = def.jump_height or 6,
jump_chance = def.jump_chance or 0,
rotate = def.rotate or 0, -- 0=front, 1.5=side, 3.0=back, 4.5=side2
lifetimer = def.lifetimer or 600,
lifetimer = def.lifetimer or 600, -- default is 180 now
hp_min = def.hp_min or 5,
hp_max = def.hp_max or 10,
physical = true,
@ -76,13 +78,15 @@ function mobs:register_mob(name, def)
hornytimer = 0,
child = false,
gotten = false,
owner = "",
health = 0,
do_attack = function(self, player, dist)
if self.state ~= "attack" then
if math.random(0,100) < 90 and self.sounds.war_cry then
minetest.sound_play(self.sounds.war_cry,{object = self.object})
minetest.sound_play(self.sounds.war_cry,{
object = self.object,
max_hear_distance = self.sounds.distance
})
end
self.state = "attack"
self.attack.player = player
@ -244,7 +248,10 @@ function mobs:register_mob(name, def)
end
if self.sounds.random and math.random(1, 100) <= 1 then
minetest.sound_play(self.sounds.random, {object = self.object})
minetest.sound_play(self.sounds.random, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
local do_env_damage = function(self)
@ -303,7 +310,10 @@ function mobs:register_mob(name, def)
v.z = v.z * 2.2
self.object:setvelocity(v)
if self.sounds.jump then
minetest.sound_play(self.sounds.jump, {object = self.object})
minetest.sound_play(self.sounds.jump, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
end
end
@ -467,9 +477,14 @@ function mobs:register_mob(name, def)
end
end
if self.type == "npc" and self.order == "follow" and self.owner and self.owner ~= "" and self.state ~= "attack" then --/MFF (Crabman|07/14/2015) follow diamond if has not owner
-- custom function (defined in mob lua file)
if self.do_custom then
self.do_custom(self)
end
if self.type == "npc" and self.order == "follow" and self.state ~= "attack" then
-- npc stop following player if not owner
if self.following and self.owner and self.owner ~= self.following:get_player_name() then
if self.following and self.type == "npc" and self.owner and self.owner ~= self.following:get_player_name() then
self.following = nil
end
else
@ -503,7 +518,7 @@ function mobs:register_mob(name, def)
self.object:setyaw(yaw)
-- anyone but standing npc's can move along
if dist > 4 and self.order ~= "stand" then --/MFF (Crabman|07/14/2015) follow but at distance
if dist > 4 and self.order ~= "stand" then --/MFF (Crabman|07/14/2015) follow but at distance, default value is 2
if (self.jump and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0)
or (self.object:getvelocity().y == 0 and self.jump_chance > 0) then
self.direction = {x = math.sin(yaw)*-1, y = -20, z = math.cos(yaw)}
@ -579,6 +594,15 @@ function mobs:register_mob(name, def)
elseif self.state == "walk" then
local s = self.object:getpos()
local lp = minetest.find_node_near(s, 1, {"group:water"})
-- water swimmers cannot move out of water
if self.fly and self.fly_in == "default:water_source" and not lp then
print ("out of water")
self.set_velocity(self, 0)
self.state = "flop" -- change to undefined state so nothing more happens
self:set_animation("stand")
return
end
-- if water nearby then turn away
if lp then
local vec = {x=lp.x-s.x, y=lp.y-s.y, z=lp.z-s.z}
@ -674,7 +698,11 @@ function mobs:register_mob(name, def)
or minetest.is_protected(pos, "") then
self.object:remove()
if self.sounds.explode ~= "" then
minetest.sound_play(self.sounds.explode, {pos = pos, gain = 1.0, max_hear_distance = 16})
minetest.sound_play(self.sounds.explode, {
pos = pos,
gain = 1.0,
max_hear_distance = 16
})
end
pos.y = pos.y + 1
effect(pos, 15, "tnt_smoke.png", 5)
@ -760,7 +788,10 @@ function mobs:register_mob(name, def)
s2.y = s2.y + 1.5
if minetest.line_of_sight(p2,s2) == true then
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {object = self.object})
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
self.attack.player:punch(self.object, 1.0, {
full_punch_interval=1.0,
@ -776,11 +807,6 @@ function mobs:register_mob(name, def)
elseif self.state == "attack" and self.attack_type == "shoot" then
if not self.attack.player or not self.attack.player:is_player() then
self.state = "stand"
self:set_animation("stand")
return
end
local s = self.object:getpos()
local p = self.attack.player:getpos()
p.y = p.y - .5
@ -789,9 +815,6 @@ function mobs:register_mob(name, def)
if dist > self.view_range or self.attack.player:get_hp() <= 0 then
self.state = "stand"
self.set_velocity(self, 0)
if self.type ~= "npc" then
self.attack = {player=nil, dist=nil}
end
self:set_animation("stand")
return
else
@ -812,7 +835,10 @@ function mobs:register_mob(name, def)
self:set_animation("punch")
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {object = self.object})
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
local p = self.object:getpos()
@ -844,6 +870,8 @@ function mobs:register_mob(name, def)
self.old_y = self.object:getpos().y
self.object:setyaw(math.random(1, 360)/180*math.pi)
if not self.sounds.distance then self.sounds.distance = 10 end
if staticdata then
local tmp = minetest.deserialize(staticdata)
if tmp then
@ -950,10 +978,12 @@ function mobs:register_mob(name, def)
local s = math.random(0,#weapon:get_definition().sounds)
minetest.sound_play(weapon:get_definition().sounds[s], {
object=hitter,
max_hear_distance = 8
})
else
minetest.sound_play("default_punch", {
object = hitter,
max_hear_distance = 5
})
end
@ -1093,7 +1123,15 @@ function mobs:explosion(pos, radius, fire, smoke, sound)
local c_brick = minetest.get_content_id("default:obsidianbrick")
local c_chest = minetest.get_content_id("default:chest_locked")
if sound and sound ~= "" then
minetest.sound_play(sound, {pos = pos, gain = 1.0, max_hear_distance = 16})
minetest.sound_play(sound, {
pos = pos,
gain = 1.0,
max_hear_distance = 16
})
end
-- if area protected then no blast damage
if minetest.is_protected(pos, "") then
return
end
for z = -radius, radius do
for y = -radius, radius do
@ -1141,7 +1179,10 @@ function check_for_death(self)
local hp = self.object:get_hp()
if hp > 0 then
if self.sounds.damage ~= nil then
minetest.sound_play(self.sounds.damage,{object = self.object})
minetest.sound_play(self.sounds.damage,{
object = self.object,
max_hear_distance = self.sounds.distance
})
self.health = hp
end
return
@ -1159,7 +1200,10 @@ function check_for_death(self)
end
end
if self.sounds.death ~= nil then
minetest.sound_play(self.sounds.death,{object = self.object})
minetest.sound_play(self.sounds.death,{
object = self.object,
max_hear_distance = self.sounds.distance
})
end
if self.on_die then
pos.y = pos.y - 0.5
@ -1187,13 +1231,13 @@ function entity_physics(pos, radius, self) --/MFF (Crabman|06/23/2015)add self t
for _, obj in pairs(objs) do
obj_pos = obj:getpos()
obj_vel = obj:getvelocity()
--dist = math.max(1, vector.distance(pos, obj_pos))
dist = math.max(1, vector.distance(pos, obj_pos))
if obj_vel ~= nil then
obj:setvelocity(calc_velocity(pos, obj_pos, obj_vel, radius * 10))
end
--local damage = (4 / dist) * radius
local damage = (4 / dist) * radius
obj:punch(self.object, 1.0,{full_punch_interval=1.0, damage_groups = {fleshy=self.damage} })--/MFF (Crabman|06/23/2015) use punch
--obj:set_hp(obj:get_hp() - damage)
obj:set_hp(obj:get_hp() - damage)
end
end
@ -1277,3 +1321,53 @@ function mobs:register_egg(mob, desc, background, addegg)
end,
})
end
-- capture critter (thanks to blert2112 for idea)
function mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso, force_take, replacewith)
if clicker:is_player() and clicker:get_inventory() and not self.child then
-- get name of clicked mob
local mobname = self.name
-- if not nil change what will be added to inventory
if replacewith then
mobname = replacewith
end
--print ("taking by force is", force_take)
local name = clicker:get_player_name()
if self.owner == "" and force_take == false then
minetest.chat_send_player(name, "Not tamed!")
return
-- cannot pick up if not owner
elseif self.owner ~= name and force_take == false then
minetest.chat_send_player(name, "Not owner!")
return
end
if clicker:get_inventory():room_for_item("main", mobname) then
-- was mob clicked with hand, net, or lasso?
local tool = clicker:get_wielded_item()
local chance = 0
if tool:is_empty() then
chance = chance_hand
elseif tool:get_name() == "mobs:net" then
chance = chance_net
tool:add_wear(4000) -- 17 uses
clicker:set_wielded_item(tool)
elseif tool:get_name() == "mobs:magic_lasso" then
-- pick up if owner
chance = chance_lasso
tool:add_wear(650) -- 100 uses
clicker:set_wielded_item(tool)
end
-- return if no chance
if chance == 0 then return end
-- calculate chance.. was capture successful?
if math.random(100) <= chance then
-- successful capture.. add to inventory
clicker:get_inventory():add_item("main", mobname)
self.object:remove()
else
minetest.chat_send_player(name, "Missed!")
end
end
end
end

View File

@ -46,13 +46,7 @@ mobs:register_mob("mobs:bee", {
},
-- right click to pick up bee
on_rightclick = function(self, clicker)
if clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:bee") then
clicker:get_inventory():add_item("main", "mobs:bee")
self.object:remove()
end
mobs:capture_mob(self, clicker, 25, 80, 0, true, nil)
end,
})
-- spawn on group:flowers between 4 and 20 light, 1 in 5000 chance, 1 bee in area up to 31000 in height

View File

@ -17,6 +17,7 @@ mobs:register_mob("mobs:bunny", {
{"mobs_bunny_grey.png"},
{"mobs_bunny_brown.png"},
{"mobs_bunny_white.png"},
{"mobs_bunny_evil.png"},
},
-- sounds
sounds = {},
@ -65,12 +66,13 @@ mobs:register_mob("mobs:bunny", {
self.food = 0
self.tamed = true
-- make owner
if not self.owner or self.owner == "" then
if self.owner == "" then
self.owner = name
end
end
return
end
-- Monty Python tribute
if item:get_name() == "mobs:lava_orb" then
-- take item
@ -87,23 +89,7 @@ mobs:register_mob("mobs:bunny", {
return
end
if clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:bunny") then
-- pick up if owner
if self.owner == name then
clicker:get_inventory():add_item("main", "mobs:bunny")
self.object:remove()
-- cannot pick up if not tamed
elseif not self.owner or self.owner == "" then
minetest.chat_send_player(name, "Not tamed!")
-- cannot pick up if not owner
elseif self.owner ~= name then
minetest.chat_send_player(name, "Not owner!")
end
end
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
end,
attack_type = "dogfight",
damage = 5,

View File

@ -53,15 +53,9 @@ mobs:register_mob("mobs:chicken", {
-- follows wheat
follow = "farming:seed_wheat",
view_range = 8,
-- replace air with egg (lay)
replacements = {
{
replace_rate = 2000,
replace_what = {"air"},
replace_with = "mobs:egg",
}
},
-- right click to pick up chicken
replace_rate = 2000,
replace_what = {"air"},
replace_with = "mobs:egg",
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
local name = clicker:get_player_name()
@ -86,7 +80,7 @@ mobs:register_mob("mobs:chicken", {
end
self.tamed = true
-- make owner
if not self.owner or self.owner == "" then
if self.owner == "" then
self.owner = name
end
minetest.sound_play("mobs_chicken", {
@ -98,23 +92,7 @@ mobs:register_mob("mobs:chicken", {
return
end
if clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:chicken") then
-- pick up if owner
if self.owner == name then
clicker:get_inventory():add_item("main", "mobs:chicken")
self.object:remove()
-- cannot pick up if not tamed
elseif not self.owner or self.owner == "" then
minetest.chat_send_player(name, "Not tamed!")
-- cannot pick up if not owner
elseif self.owner ~= name then
minetest.chat_send_player(name, "Not owner!")
end
end
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
end,
})
-- spawn on default or bamboo grass between 8 and 20 light, 1 in 10000 change, 1 chicken in area up to 31000 in height

View File

@ -18,7 +18,7 @@ mobs:register_mob("mobs:cow", {
mesh = "mobs_cow.x",
textures = {
{"mobs_cow.png"},
--{"mobs_cow_brown.png"}, -- d<EFBFBD>-commenter quand "mobs_cow_brown.png" sera compatible
--{"mobs_cow_brown.png"}, -- dé-commenter quand "mobs_cow_brown.png" sera compatible
},
blood_texture = "mobs_blood.png",
visual_size = {x=1,y=1},
@ -52,23 +52,11 @@ mobs:register_mob("mobs:cow", {
run_start = 105, run_end = 135,
punch_start = 70, punch_end = 100,
},
-- follows wheat
follow = "farming:wheat", view_range = 8,
-- replace grass/wheat with air (eat) -- Modif MFF /DEBUT
replacements = {
{
replace_rate = 50,
replace_what = {"default:grass_3", "default:grass_4",
"default:grass_5", "farming:wheat_8"},
replace_with = "air",
},
{
replace_rate = 2000,
replace_what = {"air"},
replace_with = "mobs:dung",
}
}, -- Modif MFF /FIN
-- right-click cow with empty bucket to get milk, then feed 8 wheat to replenish milk
follow = "farming:wheat",
view_range = 8,
replace_rate = 50,
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_with = "air",
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
local name = clicker:get_player_name()
@ -89,6 +77,7 @@ mobs:register_mob("mobs:cow", {
minetest.add_item(pos, {name = "mobs:bucket_milk"})
end
self.gotten = true -- milked
return
end
if tool:get_name() == "farming:wheat" then
@ -112,7 +101,7 @@ mobs:register_mob("mobs:cow", {
self.gotten = false -- ready to be milked again
self.tamed = true
-- make owner
if not self.owner or self.owner == "" then
if self.owner == "" then
self.owner = name
end
minetest.sound_play("mobs_cow", {
@ -125,13 +114,11 @@ mobs:register_mob("mobs:cow", {
return
end
if tool:get_name() == "mobs:magic_lasso"
and clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:cow") then
mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
end,
})
-- pick up if owner
--[[ -- pick up if owner
if self.owner == name then
clicker:get_inventory():add_item("main", "mobs:cow")
self.object:remove()
@ -147,7 +134,7 @@ mobs:register_mob("mobs:cow", {
end
end,
})
})--]]
-- spawn on default;green;prairie grass between 0 and 20 light, 1 in 11000 chance, 1 cow in area up to 31000 in height
mobs:register_spawn("mobs:cow", {"default:dirt_with_grass"}, 20, 8, 10000, 1, 31000)
-- register spawn egg
@ -208,7 +195,6 @@ minetest.register_craft({
})
-- Dung
-- O_o?
minetest.register_node("mobs:dung", {
description = "Cow dung",

53
mods/mobs/crafts.lua Executable file
View File

@ -0,0 +1,53 @@
-- Meat & Cooked Meat
minetest.register_craftitem("mobs:meat_raw", {
description = "Raw Meat",
inventory_image = "mobs_meat_raw.png",
on_use = minetest.item_eat(3),
})
minetest.register_craftitem("mobs:meat", {
description = "Meat",
inventory_image = "mobs_meat.png",
on_use = minetest.item_eat(8),
})
minetest.register_craft({
type = "cooking",
output = "mobs:meat",
recipe = "mobs:meat_raw",
cooktime = 5,
})
-- Golden Lasso
minetest.register_tool("mobs:magic_lasso", {
description = "Magic Lasso (right-click animal to put in inventory)",
inventory_image = "mobs_magic_lasso.png",
})
minetest.register_craft({
output = "mobs:magic_lasso",
recipe = {
{"farming:string", "default:gold_lump", "farming:string"},
{"default:gold_lump", "default:diamondblock", "default:gold_lump"},
{"farming:string", "default:gold_lump", "farming:string"},
}
})
-- Net
minetest.register_tool("mobs:net", {
description = "Net (right-click animal to put in inventory)",
inventory_image = "mobs_net.png",
})
minetest.register_craft({
output = "mobs:net",
recipe = {
{"default:stick", "", "default:stick"},
{"default:stick", "", "default:stick"},
{"farming:string", "default:stick", "farming:string"},
}
})

View File

@ -21,7 +21,7 @@ mobs:register_mob("mobs:dungeon_master", {
-- textures and model
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.6, 0.7},
visual = "mesh",
mesh = "mobs_dungeon_master.x",
mesh = "mobs_dungeon_master.b3d",
textures = {
{"mobs_dungeon_master.png"},
{"mobs_dungeon_master_cobblestone.png"},

View File

@ -1,37 +1,39 @@
local path = minetest.get_modpath("mobs")
-- Mob Api
dofile(minetest.get_modpath("mobs").."/api.lua")
dofile(path.."/api.lua")
-- Animals
dofile(minetest.get_modpath("mobs").."/chicken.lua") -- JKmurray
dofile(minetest.get_modpath("mobs").."/cow.lua") -- KrupnoPavel
dofile(minetest.get_modpath("mobs").."/rat.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/sheep.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/warthog.lua") -- KrupnoPavel
dofile(minetest.get_modpath("mobs").."/bee.lua") -- KrupnoPavel
dofile(minetest.get_modpath("mobs").."/bunny.lua") -- ExeterDad
dofile(minetest.get_modpath("mobs").."/kitten.lua") -- Jordach/BFD
dofile(minetest.get_modpath("mobs").."/goat.lua") -- ???
dofile(path.."/chicken.lua") -- JKmurray
dofile(path.."/cow.lua") -- KrupnoPavel
dofile(path.."/rat.lua") -- PilzAdam
dofile(path.."/sheep.lua") -- PilzAdam
dofile(path.."/warthog.lua") -- KrupnoPavel
dofile(path.."/bee.lua") -- KrupnoPavel
dofile(path.."/bunny.lua") -- ExeterDad
dofile(path.."/kitten.lua") -- Jordach/BFD
dofile(path.."/goat.lua") -- ???
-- Monsters
dofile(minetest.get_modpath("mobs").."/dirtmonster.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/dungeonmaster.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/oerkki.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/sandmonster.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/stonemonster.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/treemonster.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/wolf.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/dog.lua") -- CProgrammerRU
--dofile(minetest.get_modpath("mobs").."/lava_flan.lua") -- Zeg9 --Remplaced by Lava Slimes
dofile(minetest.get_modpath("mobs").."/mese_monster.lua") -- Zeg9
dofile(minetest.get_modpath("mobs").."/spider.lua") -- AspireMint
dofile(minetest.get_modpath("mobs").."/greenslimes.lua") -- davedevils/TomasJLuis/TenPlus1
dofile(minetest.get_modpath("mobs").."/lavaslimes.lua") -- davedevils/TomasJLuis/TenPlus1
dofile(minetest.get_modpath("mobs").."/zombie.lua") -- ???
dofile(minetest.get_modpath("mobs").."/yeti.lua") -- ???
dofile(minetest.get_modpath("mobs").."/minotaur.lua") -- Kalabasa
dofile(path.."/dirtmonster.lua") -- PilzAdam
dofile(path.."/dungeonmaster.lua") -- PilzAdam
dofile(path.."/oerkki.lua") -- PilzAdam
dofile(path.."/sandmonster.lua") -- PilzAdam
dofile(path.."/stonemonster.lua") -- PilzAdam
dofile(path.."/treemonster.lua") -- PilzAdam
dofile(path.."/wolf.lua") -- PilzAdam
dofile(path.."/dog.lua") -- CProgrammerRU
--dofile(path.."/lava_flan.lua") -- Zeg9 --Remplaced by Lava Slimes
dofile(path.."/mese_monster.lua") -- Zeg9
dofile(path.."/spider.lua") -- AspireMint
dofile(path.."/greenslimes.lua") -- davedevils/TomasJLuis/TenPlus1
dofile(path.."/lavaslimes.lua") -- davedevils/TomasJLuis/TenPlus1
dofile(path.."/zombie.lua") -- ???
dofile(path.."/yeti.lua") -- ???
dofile(path.."/minotaur.lua") -- Kalabasa
-- begin slimes mobs compatibility changes
-- cannot find mesecons?, craft glue instead
@ -46,47 +48,13 @@ if minetest.setting_get("log_mods") then minetest.log("action", "Slimes loaded")
-- end slimes mobs compatibility changes
-- NPC
dofile(minetest.get_modpath("mobs").."/npc.lua") -- TenPlus1
dofile(path.."/npc.lua") -- TenPlus1
-- Creeper (fast impl by davedevils)
dofile(minetest.get_modpath("mobs").."/creeper.lua")
dofile(path.."/creeper.lua")
-- Meat & Cooked Meat
minetest.register_craftitem("mobs:meat_raw", {
description = "Raw Meat",
inventory_image = "mobs_meat_raw.png",
on_use = minetest.item_eat(3),
})
minetest.register_craftitem("mobs:meat", {
description = "Meat",
inventory_image = "mobs_meat.png",
on_use = minetest.item_eat(8),
})
minetest.register_craft({
type = "cooking",
output = "mobs:meat",
recipe = "mobs:meat_raw",
cooktime = 5,
})
-- Golden Lasso
minetest.register_tool("mobs:magic_lasso", {
description = "Magic Lasso (right-click animal to put in inventory)",
inventory_image = "mobs_magic_lasso.png",
})
minetest.register_craft({
output = "mobs:magic_lasso",
recipe = {
{"farming:string", "default:gold_lump", "farming:string"},
{"default:gold_lump", "default:diamondblock", "default:gold_lump"},
{"farming:string", "default:gold_lump", "farming:string"},
}
})
-- Mob Items
dofile(path.."/crafts.lua")
if minetest.setting_get("log_mods") then
minetest.log("action", "mobs loaded")

View File

@ -28,7 +28,7 @@ mobs:register_mob("mobs:kitten", {
-- speed and jump
walk_velocity = 0.6,
jump = false,
-- drops string and coins
-- drops string
drops = {
{name = "farming:string",
chance = 2, min = 1, max = 1},
@ -63,7 +63,7 @@ mobs:register_mob("mobs:kitten", {
self.food = 0
self.tamed = true
-- make owner
if not self.owner or self.owner == "" then
if self.owner == "" then
self.owner = name
end
minetest.sound_play("mobs_kitten", {
@ -76,23 +76,7 @@ mobs:register_mob("mobs:kitten", {
return
end
if clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:kitten") then
-- pick up if owner
if self.owner == name then
clicker:get_inventory():add_item("main", "mobs:kitten")
self.object:remove()
-- cannot pick up if not tamed
elseif not self.owner or self.owner == "" then
minetest.chat_send_player(name, "Not tamed!")
-- cannot pick up if not owner
elseif self.owner ~= name then
minetest.chat_send_player(name, "Not owner!")
end
end
mobs:capture_mob(self, clicker, 50, 50, 90, false, nil)
end
})

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
mods/mobs/models/mobs_oerkki.b3d Executable file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
mods/mobs/models/mobs_rat.b3d Executable file

Binary file not shown.

View File

@ -1,699 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 1.000000,-0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Frame Cube_004 {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 0.000000,-0.000000, 1.000000;;
}
Mesh { //Cube_005 Mesh
176;
0.336296; 1.101631; 1.340231;,
1.524099; 1.101631; 1.348138;,
1.516191; 1.101631; 2.535941;,
0.328389; 1.101631; 2.528034;,
0.328389; 1.101631; 2.528034;,
0.336296; 1.101631; 1.340231;,
0.336296; 1.101631; 1.340231;,
0.328389; 1.101631; 2.528034;,
1.524099; 1.101631; 1.348138;,
1.516191; 1.101631; 2.535941;,
1.516191; 1.101631; 2.535941;,
1.524099; 1.101631; 1.348138;,
1.516191; 1.101631; 2.535941;,
0.328389; 1.101631; 2.528034;,
0.328389; 1.101631; 2.528034;,
1.516191; 1.101631; 2.535941;,
0.336296; 1.101631; 1.340231;,
1.524099; 1.101631; 1.348138;,
1.524099; 1.101631; 1.348138;,
0.336296; 1.101631; 1.340231;,
-1.564649; 0.817637; 1.334045;,
-1.564649; 1.101631; 1.334045;,
-1.596119; 1.101631; 2.521457;,
-1.596119; 0.817637; 2.521457;,
-1.564649; 1.101631; 1.334045;,
-0.377237; 1.101631; 1.365515;,
-0.408707; 1.101631; 2.552927;,
-1.596119; 1.101631; 2.521457;,
-0.377237; 1.101631; 1.365515;,
-0.377237; 0.817638; 1.365515;,
-0.408707; 0.817638; 2.552928;,
-0.408707; 1.101631; 2.552927;,
-0.377237; 0.817638; 1.365515;,
-1.564649; 0.817637; 1.334045;,
-1.596119; 0.817637; 2.521457;,
-0.408707; 0.817638; 2.552928;,
-0.377237; 0.817638; 1.365515;,
-0.377237; 1.101631; 1.365515;,
-1.564649; 1.101631; 1.334045;,
-1.564649; 0.817637; 1.334045;,
-1.596119; 0.817637; 2.521457;,
-1.596119; 1.101631; 2.521457;,
-0.408707; 1.101631; 2.552927;,
-0.408707; 0.817638; 2.552928;,
0.336296; 0.817638; 1.340231;,
0.336296; 1.101631; 1.340231;,
0.328389; 1.101631; 2.528034;,
0.328389; 0.817638; 2.528034;,
1.524099; 1.101631; 1.348138;,
1.524099; 0.817637; 1.348139;,
1.516192; 0.817637; 2.535942;,
1.516191; 1.101631; 2.535941;,
1.524099; 0.817637; 1.348139;,
0.336296; 0.817638; 1.340231;,
0.328389; 0.817638; 2.528034;,
1.516192; 0.817637; 2.535942;,
1.524099; 0.817637; 1.348139;,
1.524099; 1.101631; 1.348138;,
0.336296; 1.101631; 1.340231;,
0.336296; 0.817638; 1.340231;,
0.328389; 0.817638; 2.528034;,
0.328389; 1.101631; 2.528034;,
1.516191; 1.101631; 2.535941;,
1.516192; 0.817637; 2.535942;,
-0.117394;-5.732621; 0.182654;,
-0.186090;-2.477838; 0.265415;,
-0.186090;-2.477838; 0.668304;,
-0.117394;-5.732621; 0.448150;,
-0.186090;-2.477838; 0.265415;,
0.216799;-2.477838; 0.265415;,
0.216799;-2.477838; 0.668304;,
-0.186090;-2.477838; 0.668304;,
0.216799;-2.477838; 0.265415;,
0.148102;-5.732621; 0.182654;,
0.148102;-5.732621; 0.448150;,
0.216799;-2.477838; 0.668304;,
0.148102;-5.732621; 0.182654;,
-0.117394;-5.732621; 0.182654;,
-0.117394;-5.732621; 0.448150;,
0.148102;-5.732621; 0.448150;,
0.148102;-5.732621; 0.182654;,
0.216799;-2.477838; 0.265415;,
-0.186090;-2.477838; 0.265415;,
-0.117394;-5.732621; 0.182654;,
-0.117394;-5.732621; 0.448150;,
-0.186090;-2.477838; 0.668304;,
0.216799;-2.477838; 0.668304;,
0.148102;-5.732621; 0.448150;,
-0.933130;-2.573576; 0.130200;,
-0.933130; 0.667430; 0.130200;,
-0.933130; 0.667430; 2.038438;,
-0.933130;-2.573576; 2.038438;,
-0.933130; 0.667430; 0.130200;,
0.963839; 0.667430; 0.130200;,
0.963839; 0.667430; 2.038438;,
-0.933130; 0.667430; 2.038438;,
0.963839; 0.667430; 0.130200;,
0.963839;-2.573576; 0.130200;,
0.963839;-2.573576; 2.038438;,
0.963839; 0.667430; 2.038438;,
0.963839;-2.573576; 0.130200;,
-0.933130;-2.573576; 0.130200;,
-0.933130;-2.573576; 2.038438;,
0.963839;-2.573576; 2.038438;,
0.963839;-2.573576; 0.130200;,
0.963839; 0.667430; 0.130200;,
-0.933130; 0.667430; 0.130200;,
-0.933130;-2.573576; 0.130200;,
-0.933130;-2.573576; 2.038438;,
-0.933130; 0.667430; 2.038438;,
0.963839; 0.667430; 2.038438;,
0.963839;-2.573576; 2.038438;,
-0.694354; 0.619175; 0.175005;,
-0.469990; 2.744857; 0.240792;,
-0.469990; 2.744857; 1.874725;,
-0.694354; 0.619175; 1.814122;,
0.015354; 2.744857; 0.240792;,
0.500698; 2.744857; 0.240792;,
0.500698; 2.744857; 1.874725;,
0.015354; 2.744857; 1.874725;,
0.500698; 2.744857; 0.240792;,
0.725062; 0.619175; 0.175005;,
0.725062; 0.619175; 1.814122;,
0.500698; 2.744857; 1.874725;,
0.015354; 0.619175; 0.175005;,
-0.694354; 0.619175; 0.175005;,
-0.694354; 0.619175; 1.814122;,
0.015354; 0.619175; 1.814122;,
0.725062; 0.619175; 0.175005;,
0.500698; 2.744857; 0.240792;,
0.015354; 2.744857; 0.240792;,
0.015354; 0.619175; 0.175005;,
-0.694354; 0.619175; 1.814122;,
-0.469990; 2.744857; 1.874725;,
0.015354; 2.744857; 1.874725;,
0.015354; 0.619175; 1.814122;,
-0.281961; 2.574486; 0.745273;,
-0.281961; 3.169116; 0.745273;,
-0.281961; 3.169116; 1.339903;,
-0.281961; 2.574486; 1.339903;,
-0.281961; 3.169116; 0.745273;,
0.312669; 3.169116; 0.745273;,
0.312669; 3.169116; 1.339903;,
-0.281961; 3.169116; 1.339903;,
0.312669; 3.169116; 0.745273;,
0.312669; 2.574486; 0.745273;,
0.312669; 2.574486; 1.339903;,
0.312669; 3.169116; 1.339903;,
0.312669; 2.574486; 0.745273;,
-0.281961; 2.574486; 0.745273;,
-0.281961; 2.574486; 1.339903;,
0.312669; 2.574486; 1.339903;,
0.312669; 2.574486; 0.745273;,
0.312669; 3.169116; 0.745273;,
-0.281961; 3.169116; 0.745273;,
-0.281961; 2.574486; 0.745273;,
-0.281961; 2.574486; 1.339903;,
-0.281961; 3.169116; 1.339903;,
0.312669; 3.169116; 1.339903;,
0.312669; 2.574486; 1.339903;,
-0.469990; 2.744857; 0.240792;,
0.015354; 2.744857; 0.240792;,
0.015354; 2.744857; 1.874725;,
-0.469990; 2.744857; 1.874725;,
0.725062; 0.619175; 0.175005;,
0.015354; 0.619175; 0.175005;,
0.015354; 0.619175; 1.814122;,
0.725062; 0.619175; 1.814122;,
0.015354; 0.619175; 0.175005;,
0.015354; 2.744857; 0.240792;,
-0.469990; 2.744857; 0.240792;,
-0.694354; 0.619175; 0.175005;,
0.015354; 0.619175; 1.814122;,
0.015354; 2.744857; 1.874725;,
0.500698; 2.744857; 1.874725;,
0.725062; 0.619175; 1.814122;;
44;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;,
4;24;25;26;27;,
4;28;29;30;31;,
4;32;33;34;35;,
4;36;37;38;39;,
4;40;41;42;43;,
4;44;45;46;47;,
4;48;49;50;51;,
4;52;53;54;55;,
4;56;57;58;59;,
4;60;61;62;63;,
4;64;65;66;67;,
4;68;69;70;71;,
4;72;73;74;75;,
4;76;77;78;79;,
4;80;81;82;83;,
4;84;85;86;87;,
4;88;89;90;91;,
4;92;93;94;95;,
4;96;97;98;99;,
4;100;101;102;103;,
4;104;105;106;107;,
4;108;109;110;111;,
4;112;113;114;115;,
4;116;117;118;119;,
4;120;121;122;123;,
4;124;125;126;127;,
4;128;129;130;131;,
4;132;133;134;135;,
4;136;137;138;139;,
4;140;141;142;143;,
4;144;145;146;147;,
4;148;149;150;151;,
4;152;153;154;155;,
4;156;157;158;159;,
4;160;161;162;163;,
4;164;165;166;167;,
4;168;169;170;171;,
4;172;173;174;175;;
MeshNormals { //Cube_005 Normals
176;
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
-0.999649; 0.000000;-0.026494;,
-0.999649; 0.000000;-0.026494;,
-0.999649; 0.000000;-0.026494;,
-0.999649; 0.000000;-0.026494;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
0.999649; 0.000001; 0.026494;,
0.999649; 0.000001; 0.026494;,
0.999649; 0.000001; 0.026494;,
0.999649; 0.000001; 0.026494;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.026494; 0.000000;-0.999649;,
0.026494; 0.000000;-0.999649;,
0.026494; 0.000000;-0.999649;,
0.026494; 0.000000;-0.999649;,
-0.026494; 0.000000; 0.999649;,
-0.026494; 0.000000; 0.999649;,
-0.026494; 0.000000; 0.999649;,
-0.026494; 0.000000; 0.999649;,
-0.999978;-0.000000;-0.006657;,
-0.999978;-0.000000;-0.006657;,
-0.999978;-0.000000;-0.006657;,
-0.999978;-0.000000;-0.006657;,
0.999978; 0.000001; 0.006657;,
0.999978; 0.000001; 0.006657;,
0.999978; 0.000001; 0.006657;,
0.999978; 0.000001; 0.006657;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
0.006657; 0.000000;-0.999978;,
0.006657; 0.000000;-0.999978;,
0.006657; 0.000000;-0.999978;,
0.006657; 0.000000;-0.999978;,
-0.006657; 0.000000; 0.999978;,
-0.006657; 0.000000; 0.999978;,
-0.006657; 0.000000; 0.999978;,
-0.006657; 0.000000; 0.999978;,
-0.999777;-0.021102; 0.000000;,
-0.999777;-0.021102; 0.000000;,
-0.999777;-0.021102; 0.000000;,
-0.999777;-0.021102; 0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.999777;-0.021102; 0.000000;,
0.999777;-0.021102; 0.000000;,
0.999777;-0.021102; 0.000000;,
0.999777;-0.021102; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000; 0.025419;-0.999677;,
0.000000; 0.025419;-0.999677;,
0.000000; 0.025419;-0.999677;,
0.000000; 0.025419;-0.999677;,
0.000000;-0.067486; 0.997720;,
0.000000;-0.067486; 0.997720;,
0.000000;-0.067486; 0.997720;,
0.000000;-0.067486; 0.997720;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.994476; 0.104966; 0.000000;,
-0.994476; 0.104966; 0.000000;,
-0.994476; 0.104966; 0.000000;,
-0.994476; 0.104966; 0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.994476; 0.104966; 0.000000;,
0.994476; 0.104966; 0.000000;,
0.994476; 0.104966; 0.000000;,
0.994476; 0.104966; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;;
44;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;,
4;24;25;26;27;,
4;28;29;30;31;,
4;32;33;34;35;,
4;36;37;38;39;,
4;40;41;42;43;,
4;44;45;46;47;,
4;48;49;50;51;,
4;52;53;54;55;,
4;56;57;58;59;,
4;60;61;62;63;,
4;64;65;66;67;,
4;68;69;70;71;,
4;72;73;74;75;,
4;76;77;78;79;,
4;80;81;82;83;,
4;84;85;86;87;,
4;88;89;90;91;,
4;92;93;94;95;,
4;96;97;98;99;,
4;100;101;102;103;,
4;104;105;106;107;,
4;108;109;110;111;,
4;112;113;114;115;,
4;116;117;118;119;,
4;120;121;122;123;,
4;124;125;126;127;,
4;128;129;130;131;,
4;132;133;134;135;,
4;136;137;138;139;,
4;140;141;142;143;,
4;144;145;146;147;,
4;148;149;150;151;,
4;152;153;154;155;,
4;156;157;158;159;,
4;160;161;162;163;,
4;164;165;166;167;,
4;168;169;170;171;,
4;172;173;174;175;;
} //End of Cube_005 Normals
MeshMaterialList { //Cube_005 Material List
1;
44;
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0;;
Material Material_001 {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.500000; 0.500000; 0.500000;;
0.000000; 0.000000; 0.000000;;
}
} //End of Cube_005 Material List
MeshTextureCoords { //Cube_005 UV Coordinates
176;
0.635817; 0.275819;,
0.635817; 0.046728;,
0.864908; 0.046728;,
0.864908; 0.275819;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.864346; 0.986031;,
0.783570; 0.986031;,
0.783570; 0.648180;,
0.864346; 0.648180;,
0.635817; 0.274669;,
0.635817; 0.045578;,
0.864908; 0.045578;,
0.864908; 0.274669;,
0.863901; 0.987104;,
0.783126; 0.987104;,
0.783126; 0.649254;,
0.863901; 0.649254;,
0.991231; 0.987104;,
0.653381; 0.987104;,
0.653381; 0.649254;,
0.991232; 0.649254;,
0.991232; 0.777658;,
0.991232; 0.858433;,
0.653381; 0.858433;,
0.653381; 0.777658;,
0.655529; 0.859063;,
0.655529; 0.778288;,
0.993379; 0.778288;,
0.993379; 0.859063;,
0.335443; 0.861158;,
0.265926; 0.861158;,
0.265926; 0.570397;,
0.335443; 0.570397;,
0.334205; 0.859816;,
0.264688; 0.859816;,
0.264688; 0.569055;,
0.334205; 0.569055;,
0.444367; 0.858474;,
0.153606; 0.858474;,
0.153606; 0.567713;,
0.444367; 0.567713;,
0.333996; 0.859816;,
0.264479; 0.859816;,
0.264479; 0.569055;,
0.333996; 0.569055;,
0.264228; 0.568595;,
0.333745; 0.568595;,
0.333745; 0.859357;,
0.264228; 0.859357;,
0.910309; 0.067094;,
0.990888; 0.067068;,
0.991634; 0.077574;,
0.911094; 0.077574;,
0.910309; 0.024149;,
0.921538; 0.024149;,
0.921538; 0.035379;,
0.910309; 0.035379;,
0.990708; 0.067037;,
0.910309; 0.067041;,
0.910896; 0.056534;,
0.991418; 0.056534;,
0.928966; 0.035379;,
0.921565; 0.035379;,
0.921565; 0.027979;,
0.928966; 0.027979;,
0.910595; 0.035408;,
0.990869; 0.035406;,
0.990583; 0.045937;,
0.910309; 0.045939;,
0.910597; 0.045966;,
0.990951; 0.045966;,
0.990662; 0.056507;,
0.910309; 0.056507;,
0.461795; 0.725720;,
0.002369; 0.725720;,
0.002369; 0.455219;,
0.461795; 0.455219;,
0.728915; 0.630399;,
0.460011; 0.630399;,
0.460011; 0.359898;,
0.728915; 0.359898;,
0.459622; 0.999805;,
0.000195; 0.999805;,
0.000195; 0.729304;,
0.459622; 0.729304;,
0.990155; 1.001469;,
0.721251; 1.001469;,
0.721251; 0.730968;,
0.990155; 0.730968;,
0.000987; 0.351616;,
0.460413; 0.351616;,
0.460413; 0.620520;,
0.000987; 0.620520;,
0.728915; 0.540378;,
0.728915; 0.999805;,
0.460011; 0.999805;,
0.460011; 0.540378;,
0.006594; 0.353635;,
0.507556; 0.369053;,
0.507556; 0.596553;,
0.006594; 0.737794;,
0.752538; 0.533913;,
0.752538; 0.647662;,
0.525038; 0.647662;,
0.525038; 0.533913;,
0.509703; 0.731028;,
0.008741; 0.746446;,
0.008741; 0.362287;,
0.509703; 0.503529;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.003201; 0.349292;,
0.501634; 0.401876;,
0.501634; 0.515626;,
0.003201; 0.515626;,
0.529333; 0.186216;,
0.171158; 0.150188;,
0.171083; 0.071516;,
0.529224; 0.071176;,
0.636995; 0.428681;,
0.636995; 0.545208;,
0.520468; 0.545208;,
0.520468; 0.428681;,
0.340480; 0.361873;,
0.452832; 0.361873;,
0.452832; 0.474224;,
0.340480; 0.474224;,
0.453577; 0.475130;,
0.341226; 0.475130;,
0.341226; 0.362779;,
0.453577; 0.362779;,
0.453737; 0.472732;,
0.341386; 0.472732;,
0.341386; 0.360381;,
0.453737; 0.360381;,
0.454483; 0.362033;,
0.454483; 0.474384;,
0.342132; 0.474384;,
0.342132; 0.362033;,
0.342132; 0.472732;,
0.342132; 0.360381;,
0.454483; 0.360381;,
0.454483; 0.472732;,
0.752538; 0.420163;,
0.752538; 0.533913;,
0.525038; 0.533913;,
0.525038; 0.420163;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.003201; 0.515626;,
0.501634; 0.515626;,
0.501634; 0.629375;,
0.003201; 0.681959;,
0.529223; 0.070318;,
0.171082; 0.070658;,
0.171157; 0.149330;,
0.529332; 0.185358;;
} //End of Cube_005 UV Coordinates
} //End of Cube_005 Mesh
} //End of Cube_004
} //End of Root Frame

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
mods/mobs/models/mobs_sheep.b3d Executable file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,7 @@ mobs:register_mob("mobs:npc", {
drawtype = "front",
textures = {
{"mobs_npc.png"},
{"mobs_npc2.png"}, -- female by nuttmeg20
},
visual_size = {x=1, y=1},
-- sounds
@ -116,20 +117,7 @@ mobs:register_mob("mobs:npc", {
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:npc") then
-- pick up if owner
if self.owner == name then
clicker:get_inventory():add_item("main", "mobs:npc")
self.object:remove()
item:add_wear(3000) -- 22 uses
clicker:set_wielded_item(item)
-- cannot pick up if not tamed
elseif not self.owner or self.owner == "" then
minetest.chat_send_player(name, "Not tamed!")
-- cannot pick up if not tamed
elseif self.owner ~= name then
minetest.chat_send_player(name, "Not owner!")
end
else --/MFF (Crabman|07/14/2015) follow|stop
else
-- if owner switch between follow and stand
if self.owner and self.owner == clicker:get_player_name() then
if self.order == "follow" then
@ -137,8 +125,12 @@ mobs:register_mob("mobs:npc", {
else
self.order = "follow"
end
else
self.owner = clicker:get_player_name()
end
end
mobs:capture_mob(self, clicker, 0, 5, 80, false, nil)
end,
})
-- spawning enable for now

View File

@ -15,7 +15,7 @@ mobs:register_mob("mobs:oerkki", {
-- textures and model
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_oerkki.x",
mesh = "mobs_oerkki.b3d",
textures = {
{"mobs_oerkki.png"},
{"mobs_oerkki2.png"},

View File

@ -13,7 +13,7 @@ mobs:register_mob("mobs:rat", {
-- textures and model
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.2, 0.2},
visual = "mesh",
mesh = "mobs_rat.x",
mesh = "mobs_rat.b3d",
textures = {
{"mobs_rat.png"},
{"mobs_rat_brown.png"},
@ -35,14 +35,14 @@ mobs:register_mob("mobs:rat", {
light_damage = 0,
-- right click to pick up rat
on_rightclick = function(self, clicker)
if clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:rat") then
clicker:get_inventory():add_item("main", "mobs:rat")
self.object:remove()
end
mobs:capture_mob(self, clicker, 25, 80, 0, true, nil)
end,
--[[
do_custom = function(self)
local pos = self.object:getpos()
print("rat pos", pos.x, pos.y, pos.z)
end,
]]
})
-- spawn on stone between 1 and 20 light, 1 in 7000 chance, 1 per area up to 31000 in height
mobs:register_spawn("mobs:rat", {"default:stone", "default:sandstone"}, 20, 0, 10000, 1, 31000)

View File

@ -15,7 +15,7 @@ mobs:register_mob("mobs:sand_monster", {
-- textures and model
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_sand_monster.x",
mesh = "mobs_sand_monster.b3d",
textures = {
{"mobs_sand_monster.png"},
},

View File

@ -13,7 +13,7 @@ mobs:register_mob("mobs:sheep", {
-- textures and model
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
visual = "mesh",
mesh = "mobs_sheep.x",
mesh = "mobs_sheep.b3d",
textures = {
{"mobs_sheep.png"},
},
@ -21,7 +21,7 @@ mobs:register_mob("mobs:sheep", {
visual_size = {x=1,y=1},
-- specific texture and mesh for gotten
gotten_texture = {"mobs_sheep_shaved.png"},
gotten_mesh = "mobs_sheep_shaved.x",
gotten_mesh = "mobs_sheep_shaved.b3d",
-- sounds
makes_footstep_sound = true,
sounds = {
@ -81,7 +81,7 @@ mobs:register_mob("mobs:sheep", {
self.gotten = false -- can be shaved again
self.tamed = true
-- make owner
if not self.owner or self.owner == "" then
if self.owner == "" then
self.owner = name
end
self.object:set_properties({
@ -114,30 +114,12 @@ mobs:register_mob("mobs:sheep", {
end
self.object:set_properties({
textures = {"mobs_sheep_shaved.png"},
mesh = "mobs_sheep_shaved.x",
mesh = "mobs_sheep_shaved.b3d",
})
return
end
if item:get_name() == "mobs:magic_lasso"
and clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:sheep") then
-- pick up if owner
if self.owner == name then
clicker:get_inventory():add_item("main", "mobs:sheep")
self.object:remove()
item:add_wear(3000) -- 22 uses
clicker:set_wielded_item(item)
-- cannot pick up if not tamed
elseif not self.owner or self.owner == "" then
minetest.chat_send_player(name, "Not tamed!")
-- cannot pick up if not tamed
elseif self.owner ~= name then
minetest.chat_send_player(name, "Not owner!")
end
end
mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
end,
})
-- spawn on default;green grass between 20 and 8 light, 1 in 9000 chance, 1 sheep in area up to 31000 in height
@ -157,7 +139,7 @@ minetest.register_tool("mobs:shears", {
},
damage_groups = {fleshy=0},
}
}) -- Modif MFF /FIN
}) -- Modif MFF /FIN
minetest.register_craft({
output = 'mobs:shears',

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -15,7 +15,7 @@ mobs:register_mob("mobs:stone_monster", {
-- textures and model
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_stone_monster.x",
mesh = "mobs_stone_monster.b3d",
textures = {
{"mobs_stone_monster.png"},
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

BIN
mods/mobs/textures/mobs_net.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

BIN
mods/mobs/textures/mobs_npc2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

View File

@ -15,7 +15,7 @@ mobs:register_mob("mobs:tree_monster", {
-- textures and model
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_tree_monster.x",
mesh = "mobs_tree_monster.b3d",
textures = {
{"mobs_tree_monster.png"},
},

View File

@ -77,7 +77,7 @@ mobs:register_mob("mobs:pumba", {
end
self.tamed = true
-- make owner
if not self.owner or self.owner == "" then
if self.owner == "" then
self.owner = name
end
minetest.sound_play("mobs_pig", {
@ -90,26 +90,7 @@ mobs:register_mob("mobs:pumba", {
return
end
if item:get_name() == "mobs:magic_lasso"
and clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:pumba") then
-- pick up if owner
if self.owner == name then
clicker:get_inventory():add_item("main", "mobs:pumba")
self.object:remove()
item:add_wear(3000) -- 22 uses
clicker:set_wielded_item(item)
-- cannot pick up if not tamed
elseif not self.owner or self.owner == "" then
minetest.chat_send_player(name, "Not tamed!")
-- cannot pick up if not tamed
elseif self.owner ~= name then
minetest.chat_send_player(name, "Not owner!")
end
end
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
end,
})
-- spawns on dirt or junglegrass, between 8 and 20 light, 1 in 10000 chance, 1 in area up to 31000 in height