Add files via upload
This commit is contained in:
parent
2b91842492
commit
ff9450670c
12
manatee.lua
12
manatee.lua
@ -1,4 +1,4 @@
|
|||||||
mobs:register_mob("wwildlife:manatee", {
|
mobs:register_mob("animalworld:manatee", {
|
||||||
stepheight = 0.0,
|
stepheight = 0.0,
|
||||||
type = "animal",
|
type = "animal",
|
||||||
passive = true,
|
passive = true,
|
||||||
@ -6,8 +6,8 @@ stepheight = 0.0,
|
|||||||
attack_animals = false,
|
attack_animals = false,
|
||||||
reach = 1,
|
reach = 1,
|
||||||
damage = 1,
|
damage = 1,
|
||||||
hp_min = 5,
|
hp_min = 50,
|
||||||
hp_max = 30,
|
hp_max = 60,
|
||||||
armor = 200,
|
armor = 200,
|
||||||
collisionbox = {-0.7, -0.01, -0.7, 0.7, 0.95, 0.7},
|
collisionbox = {-0.7, -0.01, -0.7, 0.7, 0.95, 0.7},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
@ -24,7 +24,7 @@ stepheight = 0.0,
|
|||||||
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing",
|
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing",
|
||||||
fall_speed = 0,
|
fall_speed = 0,
|
||||||
runaway = true,
|
runaway = true,
|
||||||
runaway_from = {"wwildlife:bear", "wwildlife:crocodile", "wwildlife:tiger"},
|
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark"},
|
||||||
jump = false,
|
jump = false,
|
||||||
stepheight = 0.0,
|
stepheight = 0.0,
|
||||||
drops = {
|
drops = {
|
||||||
@ -65,7 +65,7 @@ stepheight = 0.0,
|
|||||||
|
|
||||||
if not mobs.custom_spawn_animal then
|
if not mobs.custom_spawn_animal then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "wwildlife:manatee",
|
name = "animalworld:manatee",
|
||||||
nodes = {"default:water_source"}, {"default:river_water_source"},
|
nodes = {"default:water_source"}, {"default:river_water_source"},
|
||||||
min_light = 14,
|
min_light = 14,
|
||||||
interval = 60,
|
interval = 60,
|
||||||
@ -76,4 +76,4 @@ mobs:spawn({
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
mobs:register_egg("wwildlife:manatee", ("Manatee"), "amanatee.png")
|
mobs:register_egg("animalworld:manatee", ("Manatee"), "amanatee.png")
|
||||||
|
20
moose.lua
20
moose.lua
@ -1,4 +1,4 @@
|
|||||||
mobs:register_mob("wwildlife:moose", {
|
mobs:register_mob("animalworld:moose", {
|
||||||
stepheight = 1,
|
stepheight = 1,
|
||||||
type = "animal",
|
type = "animal",
|
||||||
passive = false,
|
passive = false,
|
||||||
@ -8,8 +8,8 @@ mobs:register_mob("wwildlife:moose", {
|
|||||||
attack_npcs = false,
|
attack_npcs = false,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
damage = 2,
|
damage = 2,
|
||||||
hp_min = 5,
|
hp_min = 25,
|
||||||
hp_max = 25,
|
hp_max = 40,
|
||||||
armor = 200,
|
armor = 200,
|
||||||
collisionbox = {-0.6, -0.01, -0.6, 0.6, 0.95, 0.6},
|
collisionbox = {-0.6, -0.01, -0.6, 0.6, 0.95, 0.6},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
@ -19,13 +19,13 @@ mobs:register_mob("wwildlife:moose", {
|
|||||||
},
|
},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
sounds = {
|
sounds = {
|
||||||
random = "wwildlife_moose",
|
random = "animalworld_moose",
|
||||||
attack = "wwildlife_moose",
|
attack = "animalworld_moose",
|
||||||
},
|
},
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
run_velocity = 3,
|
run_velocity = 3,
|
||||||
runaway = true,
|
runaway = true,
|
||||||
runaway_from = {"wwildlife:bear", "wwildlife:crocodile", "wwildlife:tiger"},
|
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark"},
|
||||||
jump = false,
|
jump = false,
|
||||||
jump_height = 3,
|
jump_height = 3,
|
||||||
pushable = true,
|
pushable = true,
|
||||||
@ -73,20 +73,20 @@ end
|
|||||||
|
|
||||||
if not mobs.custom_spawn_animal then
|
if not mobs.custom_spawn_animal then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "wwildlife:moose",
|
name = "animalworld:moose",
|
||||||
nodes = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
|
nodes = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
|
||||||
neighbors = spawn_by,
|
neighbors = spawn_by,
|
||||||
min_light = 0,
|
min_light = 0,
|
||||||
interval = 60,
|
interval = 60,
|
||||||
chance = 8000, -- 15000
|
chance = 8000, -- 15000
|
||||||
min_height = 0,
|
min_height = 0,
|
||||||
max_height = 300,
|
max_height = 120,
|
||||||
day_toggle = true,
|
day_toggle = true,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
mobs:register_egg("wwildlife:moose", ("Moose"), "amoose.png")
|
mobs:register_egg("animalworld:moose", ("Moose"), "amoose.png")
|
||||||
|
|
||||||
|
|
||||||
mobs:alias_mob("wwildlife:moose", "wwildlife:moose") -- compatibility
|
mobs:alias_mob("animalworld:moose", "animalworld:moose") -- compatibility
|
||||||
|
|
||||||
|
304
nandu.lua
Normal file
304
nandu.lua
Normal file
@ -0,0 +1,304 @@
|
|||||||
|
mobs:register_mob("animalworld:nandu", {
|
||||||
|
stepheight = 1,
|
||||||
|
type = "animal",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
group_attack = true,
|
||||||
|
owner_loyal = true,
|
||||||
|
attack_npcs = false,
|
||||||
|
reach = 2,
|
||||||
|
damage = 2,
|
||||||
|
hp_min = 20,
|
||||||
|
hp_max = 30,
|
||||||
|
armor = 200,
|
||||||
|
collisionbox = {-0.5, -0.01, -0.3, 0.5, 0.1, 0.5},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "Nandu.b3d",
|
||||||
|
textures = {
|
||||||
|
{"texturenandu.png"}, -- white
|
||||||
|
{"texturenandu.png"},
|
||||||
|
{"texturenandu.png"},
|
||||||
|
},
|
||||||
|
child_texture = {
|
||||||
|
{"texturenandu.png"},
|
||||||
|
},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 0.7,
|
||||||
|
run_velocity = 3,
|
||||||
|
runaway = true,
|
||||||
|
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:elephant", "animalworld:hippo", "animalworld:spider", "animalworld:spidermale", "animalworld:shark"},
|
||||||
|
drops = {
|
||||||
|
{name = "wwildlife:chicken_raw", chance = 1, min = 1, max = 1},
|
||||||
|
{name = "wwildlife:chicken_feather", chance = 1, min = 0, max = 2},
|
||||||
|
},
|
||||||
|
water_damage = 1,
|
||||||
|
lava_damage = 5,
|
||||||
|
light_damage = 0,
|
||||||
|
fear_height = 3,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 50,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 100,
|
||||||
|
stand1_start = 1,
|
||||||
|
stand1_end = 100,
|
||||||
|
walk_start = 100,
|
||||||
|
walk_end = 200,
|
||||||
|
run_start = 100,
|
||||||
|
run_end = 200,
|
||||||
|
punch_start = 200,
|
||||||
|
punch_end = 300,
|
||||||
|
},
|
||||||
|
follow = {
|
||||||
|
"farming:seed_wheat", "farming:seed_cotton", "farming:seed_barley",
|
||||||
|
"farming:seed_oat", "farming:seed_rye"
|
||||||
|
},
|
||||||
|
view_range = 10,
|
||||||
|
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||||
|
if mobs:protect(self, clicker) then return end
|
||||||
|
if mobs:capture_mob(self, clicker, 30, 50, 80, false, nil) then return end
|
||||||
|
end,
|
||||||
|
|
||||||
|
do_custom = function(self, dtime)
|
||||||
|
|
||||||
|
self.egg_timer = (self.egg_timer or 0) + dtime
|
||||||
|
if self.egg_timer < 10 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.egg_timer = 0
|
||||||
|
|
||||||
|
if self.child
|
||||||
|
or math.random(1, 100) > 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
|
minetest.add_item(pos, "mobs:egg")
|
||||||
|
|
||||||
|
minetest.sound_play("default_place_node_hard", {
|
||||||
|
pos = pos,
|
||||||
|
gain = 1.0,
|
||||||
|
max_hear_distance = 5,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
local spawn_on = {"default:dirt_with_grass"}
|
||||||
|
|
||||||
|
if minetest.get_modpath("ethereal") then
|
||||||
|
spawn_on = {"ethereal:bamboo_dirt", "ethereal:prairie_dirt"}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_animal then
|
||||||
|
mobs:spawn({
|
||||||
|
name = "animalworld:nandu",
|
||||||
|
nodes = {"default:dirt_with_grass"},
|
||||||
|
min_light = 14,
|
||||||
|
interval = 60,
|
||||||
|
chance = 8000, -- 15000
|
||||||
|
min_height = 10,
|
||||||
|
max_height = 40,
|
||||||
|
day_toggle = true,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("animalworld:nandu", ("Nandu"), "anandu.png", 0)
|
||||||
|
|
||||||
|
|
||||||
|
mobs:alias_mob("animalworld:andu", "animalworld:nandu") -- compatibility
|
||||||
|
|
||||||
|
|
||||||
|
-- egg entity
|
||||||
|
|
||||||
|
mobs:register_arrow("animalworld:egg_entity", {
|
||||||
|
visual = "sprite",
|
||||||
|
visual_size = {x=.5, y=.5},
|
||||||
|
textures = {"mobs_chicken_egg.png"},
|
||||||
|
velocity = 6,
|
||||||
|
|
||||||
|
hit_player = function(self, player)
|
||||||
|
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 1},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_mob = function(self, player)
|
||||||
|
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 1},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
|
||||||
|
if math.random(1, 10) > 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
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, "animalworld:nandu")
|
||||||
|
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
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- 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:get_pos()
|
||||||
|
|
||||||
|
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
|
||||||
|
}, "animalworld: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(":animalworld:egg", {
|
||||||
|
description = ("Bird 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 = {food_egg = 1, snappy = 2, dig_immediate = 3},
|
||||||
|
after_place_node = function(pos, placer, itemstack)
|
||||||
|
if placer:is_player() then
|
||||||
|
minetest.set_node(pos, {name = "animalworld:egg", param2 = 1})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
on_use = mobs_shoot_egg
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- fried egg
|
||||||
|
minetest.register_craftitem(":animalworld:chicken_egg_fried", {
|
||||||
|
description = ("Fried Egg"),
|
||||||
|
inventory_image = "animalworld_chicken_egg_fried.png",
|
||||||
|
on_use = minetest.item_eat(2),
|
||||||
|
groups = {food_egg_fried = 1, flammable = 2},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
recipe = "animalworld:egg",
|
||||||
|
output = "animalworld:chicken_egg_fried",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- raw chicken
|
||||||
|
minetest.register_craftitem(":animalworld:chicken_raw", {
|
||||||
|
description = ("Raw Birdmeat"),
|
||||||
|
inventory_image = "animalworld_chicken_raw.png",
|
||||||
|
on_use = minetest.item_eat(2),
|
||||||
|
groups = {food_meat_raw = 1, food_chicken_raw = 1, flammable = 2},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- cooked chicken
|
||||||
|
minetest.register_craftitem(":animalworld:chicken_cooked", {
|
||||||
|
description = ("Cooked Birdmeat"),
|
||||||
|
inventory_image = "animalworld_chicken_cooked.png",
|
||||||
|
on_use = minetest.item_eat(6),
|
||||||
|
groups = {food_meat = 1, food_chicken = 1, flammable = 2},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
recipe = "animalworld:chicken_raw",
|
||||||
|
output = "animalworld:chicken_cooked",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- feather
|
||||||
|
minetest.register_craftitem(":animalworld:chicken_feather", {
|
||||||
|
description = ("Feather"),
|
||||||
|
inventory_image = "animalworld_chicken_feather.png",
|
||||||
|
groups = {flammable = 2},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "animalworld:chicken_feather",
|
||||||
|
burntime = 1,
|
||||||
|
})
|
91
reindeer.lua
Normal file
91
reindeer.lua
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
mobs:register_mob("animalworld:reindeer", {
|
||||||
|
stepheight = 1,
|
||||||
|
type = "animal",
|
||||||
|
passive = true,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
group_attack = true,
|
||||||
|
owner_loyal = true,
|
||||||
|
attack_npcs = false,
|
||||||
|
reach = 2,
|
||||||
|
damage = 2,
|
||||||
|
hp_min = 25,
|
||||||
|
hp_max = 30,
|
||||||
|
armor = 200,
|
||||||
|
collisionbox = {-0.6, -0.01, -0.6, 0.6, 0.95, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "Reindeer.b3d",
|
||||||
|
textures = {
|
||||||
|
{"texturereindeer.png"},
|
||||||
|
},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
sounds = {
|
||||||
|
|
||||||
|
},
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 3,
|
||||||
|
runaway = true,
|
||||||
|
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "player"},
|
||||||
|
jump = false,
|
||||||
|
jump_height = 3,
|
||||||
|
pushable = true,
|
||||||
|
follow = {"default:apple", "default:permafrost_with_moss"},
|
||||||
|
view_range = 10,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 5,
|
||||||
|
light_damage = 0,
|
||||||
|
fear_height = 2,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 70,
|
||||||
|
stand_start = 0,
|
||||||
|
stand_end = 100,
|
||||||
|
walk_start = 100,
|
||||||
|
walk_end = 200,
|
||||||
|
punch_start = 200,
|
||||||
|
punch_end = 300,
|
||||||
|
|
||||||
|
die_start = 1, -- we dont have a specific death animation so we will
|
||||||
|
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||||
|
die_speed = 1, -- have mob rotate when dying.
|
||||||
|
die_loop = false,
|
||||||
|
die_rotate = true,
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||||
|
if mobs:protect(self, clicker) then return end
|
||||||
|
if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then return end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
local spawn_on = {"default:permafrost_with_moss", "default:dirt_with_snow"}
|
||||||
|
|
||||||
|
if minetest.get_mapgen_setting("mg_name") ~= "v6" then
|
||||||
|
spawn_on = {"default:dirt_with_snow", "default:permafrost_with_moss"}
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath("ethereal") then
|
||||||
|
spawn_on = {"default:dirt_with_snow"}
|
||||||
|
end
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_animal then
|
||||||
|
mobs:spawn({
|
||||||
|
name = "animalworld:reindeer",
|
||||||
|
nodes = {"default:dirt_with_snow", "default:permafrost_with_moss"},
|
||||||
|
neighbors = spawn_by,
|
||||||
|
min_light = 0,
|
||||||
|
interval = 60,
|
||||||
|
chance = 8000, -- 15000
|
||||||
|
min_height = 20,
|
||||||
|
max_height = 80,
|
||||||
|
day_toggle = true,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:register_egg("animalworld:reindeer", ("Reindeer"), "areindeer.png")
|
||||||
|
|
||||||
|
|
||||||
|
mobs:alias_mob("animalworld:moose", "animalworld:reindeer") -- compatibility
|
||||||
|
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 561 KiB After Width: | Height: | Size: 466 KiB |
18
seal.lua
18
seal.lua
@ -1,10 +1,10 @@
|
|||||||
mobs:register_mob("wwildlife:seal", {
|
mobs:register_mob("animalworld:seal", {
|
||||||
stepheight = 0.6,
|
stepheight = 0.6,
|
||||||
type = "animal",
|
type = "animal",
|
||||||
passive = true,
|
passive = true,
|
||||||
reach = 1,
|
reach = 1,
|
||||||
hp_min = 5,
|
hp_min = 20,
|
||||||
hp_max = 20,
|
hp_max = 35,
|
||||||
armor = 200,
|
armor = 200,
|
||||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.95, 0.4},
|
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.95, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
@ -14,15 +14,15 @@ stepheight = 0.6,
|
|||||||
{"textureseal.png"},
|
{"textureseal.png"},
|
||||||
},
|
},
|
||||||
sounds = {
|
sounds = {
|
||||||
random = "wwildlife_seal",
|
random = "animalworld_seal",
|
||||||
attack = "wwildlife_seal",
|
attack = "animalworld_seal",
|
||||||
},
|
},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
walk_velocity = 0.8,
|
walk_velocity = 0.8,
|
||||||
run_velocity = 1,
|
run_velocity = 1,
|
||||||
runaway = true,
|
runaway = true,
|
||||||
runaway = true,
|
runaway = true,
|
||||||
runaway_from = {"wwildlife:bear", "wwildlife:crocodile", "wwildlife:tiger"},
|
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark"},
|
||||||
jump = false,
|
jump = false,
|
||||||
stepheight = 1.1,
|
stepheight = 1.1,
|
||||||
drops = {
|
drops = {
|
||||||
@ -45,7 +45,7 @@ stepheight = 0.6,
|
|||||||
fly_in = {"default:water_source", "default:water_flowing"},
|
fly_in = {"default:water_source", "default:water_flowing"},
|
||||||
floats = 0,
|
floats = 0,
|
||||||
follow = {
|
follow = {
|
||||||
"ethereal:fish_raw", "wwildlife:rawfish", "mobs_fish:tropical",
|
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
|
||||||
"mobs_fish:clownfish_set", "mobs_fish:tropical_set", "xocean:fish_edible"
|
"mobs_fish:clownfish_set", "mobs_fish:tropical_set", "xocean:fish_edible"
|
||||||
},
|
},
|
||||||
view_range = 10,
|
view_range = 10,
|
||||||
@ -61,7 +61,7 @@ stepheight = 0.6,
|
|||||||
|
|
||||||
if not mobs.custom_spawn_animal then
|
if not mobs.custom_spawn_animal then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "wwildlife:seal",
|
name = "animalworld:seal",
|
||||||
nodes = {"default:snowblock", "default_ice"},
|
nodes = {"default:snowblock", "default_ice"},
|
||||||
min_light = 14,
|
min_light = 14,
|
||||||
interval = 60,
|
interval = 60,
|
||||||
@ -72,4 +72,4 @@ mobs:spawn({
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
mobs:register_egg("wwildlife:seal", ("Seal"), "aseal.png")
|
mobs:register_egg("animalworld:seal", ("Seal"), "aseal.png")
|
||||||
|
81
shark.lua
Normal file
81
shark.lua
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
mobs:register_mob("animalworld:shark", {
|
||||||
|
stepheight = 0.0,
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
attack_animals = true,
|
||||||
|
reach = 2,
|
||||||
|
damage = 7,
|
||||||
|
hp_min = 30,
|
||||||
|
hp_max = 75,
|
||||||
|
armor = 200,
|
||||||
|
collisionbox = {-0.7, -0.01, -0.7, 0.7, 0.95, 0.7},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "Shark.b3d",
|
||||||
|
visual_size = {x = 1.0, y = 1.0},
|
||||||
|
textures = {
|
||||||
|
{"textureshark.png"},
|
||||||
|
},
|
||||||
|
sounds = {},
|
||||||
|
makes_footstep_sound = false,
|
||||||
|
sounds = {
|
||||||
|
attack = "animalworld_shark",
|
||||||
|
},
|
||||||
|
walk_velocity = 2,
|
||||||
|
run_velocity = 4,
|
||||||
|
fly = true,
|
||||||
|
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing",
|
||||||
|
fall_speed = 0,
|
||||||
|
runaway = false,
|
||||||
|
jump = false,
|
||||||
|
stepheight = 0.0,
|
||||||
|
drops = {
|
||||||
|
{name = "animalworld:rawfish", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
air_damage = 1,
|
||||||
|
lava_damage = 4,
|
||||||
|
light_damage = 0,
|
||||||
|
fear_height = 2,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 100,
|
||||||
|
stand_start = 0,
|
||||||
|
stand_end = 0,
|
||||||
|
walk_start = 0,
|
||||||
|
walk_end = 100,
|
||||||
|
fly_start = 0, -- swim animation
|
||||||
|
fly_end = 100,
|
||||||
|
punch_start = 100,
|
||||||
|
punch_end = 200,
|
||||||
|
-- 50-70 is slide/water idle
|
||||||
|
},
|
||||||
|
fly_in = {"default:water_source", "default:river_water_source", "default:water_flowing"},
|
||||||
|
floats = 0,
|
||||||
|
follow = {
|
||||||
|
"mobs:meat_raw"
|
||||||
|
},
|
||||||
|
view_range = 17,
|
||||||
|
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
-- feed or tame
|
||||||
|
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||||
|
if mobs:protect(self, clicker) then return end
|
||||||
|
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_animal then
|
||||||
|
mobs:spawn({
|
||||||
|
name = "animalworld:shark",
|
||||||
|
nodes = {"default:water_source"},
|
||||||
|
min_light = 0,
|
||||||
|
interval = 60,
|
||||||
|
chance = 8000, -- 15000
|
||||||
|
min_height = 0,
|
||||||
|
max_height = 10,
|
||||||
|
day_toggle = false,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:register_egg("animalworld:shark", ("Shark"), "ashark.png")
|
124
spider.lua
Normal file
124
spider.lua
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
mobs:register_mob("animalworld:spider", {
|
||||||
|
stepheight = 4,
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "shoot",
|
||||||
|
shoot_interval = 0.5,
|
||||||
|
arrow = "animalworld:silk_arrow",
|
||||||
|
shoot_offset = 2,
|
||||||
|
attack_animals = true,
|
||||||
|
reach = 6,
|
||||||
|
damage = 3,
|
||||||
|
hp_min = 10,
|
||||||
|
hp_max = 15,
|
||||||
|
armor = 200,
|
||||||
|
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "Spider.b3d",
|
||||||
|
visual_size = {x = 0.3, y = 0.3},
|
||||||
|
textures = {
|
||||||
|
{"texturespider.png"},
|
||||||
|
},
|
||||||
|
sounds = {
|
||||||
|
random = "animalworld_spider",
|
||||||
|
attack = "animalworld_spider",
|
||||||
|
},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
view_range = 6,
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 3,
|
||||||
|
runaway = false,
|
||||||
|
jump = true,
|
||||||
|
jump_height = 0,
|
||||||
|
stepheight = 4,
|
||||||
|
drops = {
|
||||||
|
{name = "animalworld:raw_athropod", chance = 1, min = 0, max = 2},
|
||||||
|
{name = "wool:white", chance = 1, min = 0, max = 2},
|
||||||
|
},
|
||||||
|
water_damage = 1,
|
||||||
|
lava_damage = 4,
|
||||||
|
light_damage = 0,
|
||||||
|
fear_height = 8,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 100,
|
||||||
|
stand_start = 0,
|
||||||
|
stand_end = 100,
|
||||||
|
walk_start = 100,
|
||||||
|
walk_end = 200,
|
||||||
|
punch_start = 200,
|
||||||
|
punch_end = 300,
|
||||||
|
-- 50-70 is slide/water idle
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_animal then
|
||||||
|
mobs:spawn({
|
||||||
|
name = "animalworld:spider",
|
||||||
|
nodes = {"default:stone", "default:desert_stone", "default:sandstone"},
|
||||||
|
min_light = 0,
|
||||||
|
interval = 60,
|
||||||
|
chance = 8000, -- 15000
|
||||||
|
min_height = -30,
|
||||||
|
max_height = 1,
|
||||||
|
day_toggle = false,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("animalworld:spider", ("Spider"), "aspider.png")
|
||||||
|
|
||||||
|
|
||||||
|
mobs:alias_mob("animalworld:spider", "animalworld:spider") -- compatiblity
|
||||||
|
|
||||||
|
-- raw athropod
|
||||||
|
minetest.register_craftitem(":animalworld:raw_athropod", {
|
||||||
|
description = ("Raw Athropod"),
|
||||||
|
inventory_image = "animalworld_raw_athropod.png",
|
||||||
|
on_use = minetest.item_eat(3),
|
||||||
|
groups = {food_meat_raw = 1, flammable = 2},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- mese arrow (weapon)
|
||||||
|
mobs:register_arrow("animalworld:silk_arrow", {
|
||||||
|
visual = "sprite",
|
||||||
|
-- visual = "wielditem",
|
||||||
|
visual_size = {x = 0.5, y = 0.5},
|
||||||
|
textures = {"animalworld_silk_arrow.png"},
|
||||||
|
--textures = {""animalworld_silk_arrow.png""},
|
||||||
|
velocity = 6,
|
||||||
|
-- rotate = 180,
|
||||||
|
|
||||||
|
hit_player = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 2},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_mob = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 2},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- cooked athropod
|
||||||
|
minetest.register_craftitem(":animalworld:cooked_athropod", {
|
||||||
|
description = ("Cooked Athropod"),
|
||||||
|
inventory_image = "animalworld_cooked_athropod.png",
|
||||||
|
on_use = minetest.item_eat(5),
|
||||||
|
groups = {food_meat = 1, flammable = 2},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "animalworld:cooked_athropod",
|
||||||
|
recipe = "animalworld:raw_athropod",
|
||||||
|
cooktime = 5,
|
||||||
|
})
|
||||||
|
|
65
spidermale.lua
Normal file
65
spidermale.lua
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
mobs:register_mob("animalworld:spidermale", {
|
||||||
|
stepheight = 4,
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
attack_animals = true,
|
||||||
|
attack_animals = true,
|
||||||
|
reach = 1,
|
||||||
|
damage = 1,
|
||||||
|
hp_min = 5,
|
||||||
|
hp_max = 10,
|
||||||
|
armor = 200,
|
||||||
|
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "Spider.b3d",
|
||||||
|
visual_size = {x = 0.1, y = 0.1},
|
||||||
|
textures = {
|
||||||
|
{"texturespider.png"},
|
||||||
|
},
|
||||||
|
sounds = {
|
||||||
|
random = "animalworld_spider",
|
||||||
|
attack = "animalworld_spider",
|
||||||
|
},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
view_range = 5,
|
||||||
|
walk_velocity = 0.5,
|
||||||
|
run_velocity = 2,
|
||||||
|
runaway = false,
|
||||||
|
jump = true,
|
||||||
|
jump_height = 0,
|
||||||
|
stepheight = 4,
|
||||||
|
drops = {
|
||||||
|
{name = "animalworld:raw_athropod", chance = 1, min = 0, max = 2},
|
||||||
|
},
|
||||||
|
water_damage = 1,
|
||||||
|
lava_damage = 4,
|
||||||
|
light_damage = 0,
|
||||||
|
fear_height = 8,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 125,
|
||||||
|
stand_start = 0,
|
||||||
|
stand_end = 100,
|
||||||
|
walk_start = 100,
|
||||||
|
walk_end = 200,
|
||||||
|
punch_start = 200,
|
||||||
|
punch_end = 300,
|
||||||
|
-- 50-70 is slide/water idle
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_monster then
|
||||||
|
mobs:spawn({
|
||||||
|
name = "animalworld:spidermale",
|
||||||
|
nodes = {"default:dry_dirt_with_dry_grass"}, {"default:dirt_with_rainforest_litter"},
|
||||||
|
min_light = 0,
|
||||||
|
interval = 60,
|
||||||
|
chance = 8000, -- 15000
|
||||||
|
min_height = -10,
|
||||||
|
max_height = 20,
|
||||||
|
day_toggle = false,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:register_egg("animalworld:spidermale", ("Spider Male"), "aspidermale.png")
|
24
tiger.lua
24
tiger.lua
@ -1,13 +1,13 @@
|
|||||||
mobs:register_mob("wwildlife:tiger", {
|
mobs:register_mob("animalworld:tiger", {
|
||||||
stepheight = 1,
|
stepheight = 2,
|
||||||
type = "monster",
|
type = "monster",
|
||||||
passive = false,
|
passive = false,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
attack_animals = true,
|
attack_animals = true,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
damage = 6,
|
damage = 6,
|
||||||
hp_min = 5,
|
hp_min = 45,
|
||||||
hp_max = 25,
|
hp_max = 55,
|
||||||
armor = 200,
|
armor = 200,
|
||||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
@ -17,8 +17,8 @@ stepheight = 1,
|
|||||||
{"texturetiger.png"},
|
{"texturetiger.png"},
|
||||||
},
|
},
|
||||||
sounds = {
|
sounds = {
|
||||||
random = "wwildlife_tiger",
|
random = "animalworld_tiger",
|
||||||
attack = "wwildlife_tiger",
|
attack = "animalworld_tiger",
|
||||||
},
|
},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
@ -26,14 +26,14 @@ stepheight = 1,
|
|||||||
runaway = false,
|
runaway = false,
|
||||||
jump = true,
|
jump = true,
|
||||||
jump_height = 6,
|
jump_height = 6,
|
||||||
stepheight = 1,
|
stepheight = 2,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
},
|
},
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 4,
|
lava_damage = 4,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
fear_height = 2,
|
fear_height = 4,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 100,
|
speed_normal = 100,
|
||||||
stand_start = 0,
|
stand_start = 0,
|
||||||
@ -46,8 +46,8 @@ stepheight = 1,
|
|||||||
},
|
},
|
||||||
|
|
||||||
follow = {
|
follow = {
|
||||||
"ethereal:fish_raw", "wwildlife:rawfish", "mobs_fish:tropical",
|
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
|
||||||
"mobs:meat_raw", "wwildlife:rabbit_raw", "wwildlife:pork_raw"
|
"mobs:meat_raw", "animalworld:rabbit_raw", "animalworld:pork_raw"
|
||||||
},
|
},
|
||||||
view_range = 15,
|
view_range = 15,
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ stepheight = 1,
|
|||||||
|
|
||||||
if not mobs.custom_spawn_animal then
|
if not mobs.custom_spawn_animal then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "wwildlife:tiger",
|
name = "animalworld:tiger",
|
||||||
nodes = {"default:dry_dirt_with_dry_grass"}, {"default:dirt_with_rainforest_litter"},
|
nodes = {"default:dry_dirt_with_dry_grass"}, {"default:dirt_with_rainforest_litter"},
|
||||||
min_light = 0,
|
min_light = 0,
|
||||||
interval = 60,
|
interval = 60,
|
||||||
@ -73,4 +73,4 @@ mobs:spawn({
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
mobs:register_egg("wwildlife:tiger", ("Tiger"), "atiger.png")
|
mobs:register_egg("animalworld:tiger", ("Tiger"), "atiger.png")
|
||||||
|
16
tortoise.lua
16
tortoise.lua
@ -1,4 +1,4 @@
|
|||||||
mobs:register_mob("wwildlife:tortoise", {
|
mobs:register_mob("animalworld:tortoise", {
|
||||||
stepheight = 1,
|
stepheight = 1,
|
||||||
type = "monster",
|
type = "monster",
|
||||||
passive = false,
|
passive = false,
|
||||||
@ -6,8 +6,8 @@ stepheight = 1,
|
|||||||
attack_npcs = true,
|
attack_npcs = true,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
damage = 0,
|
damage = 0,
|
||||||
hp_min = 1,
|
hp_min = 45,
|
||||||
hp_max = 35,
|
hp_max = 80,
|
||||||
armor = 200,
|
armor = 200,
|
||||||
collisionbox = {-0.268, -0.01, -0.268, 0.268, 0.167, 0.268},
|
collisionbox = {-0.268, -0.01, -0.268, 0.268, 0.167, 0.268},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
@ -22,7 +22,7 @@ stepheight = 1,
|
|||||||
walk_velocity = 0.2,
|
walk_velocity = 0.2,
|
||||||
run_velocity = 0.3,
|
run_velocity = 0.3,
|
||||||
runaway = true,
|
runaway = true,
|
||||||
runaway_from = {"wwildlife:bear", "wwildlife:crocodile", "wwildlife:tiger", "player"},
|
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "player"},
|
||||||
jump = false,
|
jump = false,
|
||||||
jump_height = 6,
|
jump_height = 6,
|
||||||
drops = {
|
drops = {
|
||||||
@ -63,21 +63,21 @@ end
|
|||||||
|
|
||||||
if not mobs.custom_spawn_animal then
|
if not mobs.custom_spawn_animal then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "wwildlife:tortoise",
|
name = "animalworld:tortoise",
|
||||||
nodes = {"default:sand"},
|
nodes = {"default:sand"},
|
||||||
min_light = 0,
|
min_light = 0,
|
||||||
interval = 60,
|
interval = 60,
|
||||||
chance = 8000, -- 15000
|
chance = 8000, -- 15000
|
||||||
min_height = 5,
|
min_height = 5,
|
||||||
max_height = 100,
|
max_height = 70,
|
||||||
day_toggle = true,
|
day_toggle = true,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("wwildlife:tortoise", ("Tortoise"), "atortoise.png", 0)
|
mobs:register_egg("animalworld:tortoise", ("Tortoise"), "atortoise.png", 0)
|
||||||
|
|
||||||
|
|
||||||
mobs:alias_mob("wwildlife:tortoise", "wwildlife:tortoise") -- compatibility
|
mobs:alias_mob("animalworld:tortoise", "animalworld:tortoise") -- compatibility
|
||||||
|
|
||||||
|
|
||||||
|
10
trout.lua
10
trout.lua
@ -1,4 +1,4 @@
|
|||||||
mobs:register_mob("wwildlife:trout", {
|
mobs:register_mob("animalworld:trout", {
|
||||||
stepheight = 0.0,
|
stepheight = 0.0,
|
||||||
type = "animal",
|
type = "animal",
|
||||||
passive = true,
|
passive = true,
|
||||||
@ -24,11 +24,11 @@ stepheight = 0.0,
|
|||||||
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing",
|
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing",
|
||||||
fall_speed = 0,
|
fall_speed = 0,
|
||||||
runaway = true,
|
runaway = true,
|
||||||
runaway_from = {"wwildlife:bear", "wwildlife:crocodile", "wwildlife:tiger", "wwildlife:elephant", "wwildlife:hippo", "player"},
|
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:elephant", "animalworld:hippo", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "player"},
|
||||||
jump = false,
|
jump = false,
|
||||||
stepheight = 0.0,
|
stepheight = 0.0,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "wwildlife:rawfish", chance = 1, min = 1, max = 1},
|
{name = "animalworld:rawfish", chance = 1, min = 1, max = 1},
|
||||||
},
|
},
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
air_damage = 1,
|
air_damage = 1,
|
||||||
@ -65,7 +65,7 @@ stepheight = 0.0,
|
|||||||
|
|
||||||
if not mobs.custom_spawn_animal then
|
if not mobs.custom_spawn_animal then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "wwildlife:trout",
|
name = "animalworld:trout",
|
||||||
nodes = {"default:water_source"}, {"default:river_water_source"},
|
nodes = {"default:water_source"}, {"default:river_water_source"},
|
||||||
min_light = 14,
|
min_light = 14,
|
||||||
interval = 60,
|
interval = 60,
|
||||||
@ -76,4 +76,4 @@ mobs:spawn({
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
mobs:register_egg("wwildlife:trout", ("Trout"), "atrout.png")
|
mobs:register_egg("animalworld:trout", ("Trout"), "atrout.png")
|
||||||
|
263
yak.lua
Normal file
263
yak.lua
Normal file
@ -0,0 +1,263 @@
|
|||||||
|
mobs:register_mob("animalworld:yak", {
|
||||||
|
type = "animal",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
attack_npcs = false,
|
||||||
|
group_attack = true,
|
||||||
|
reach = 2,
|
||||||
|
damage = 4,
|
||||||
|
hp_min = 5,
|
||||||
|
hp_max = 35,
|
||||||
|
armor = 200,
|
||||||
|
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.2, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "Yak.b3d",
|
||||||
|
textures = {
|
||||||
|
{"textureyak.png"},
|
||||||
|
{"textureyak.png"},
|
||||||
|
},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
sounds = {
|
||||||
|
random = "animalworld_yak",
|
||||||
|
attack = "animalworld_yak",
|
||||||
|
},
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2,
|
||||||
|
jump = true,
|
||||||
|
jump_height = 6,
|
||||||
|
pushable = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||||
|
{name = "mobs:leather", chance = 1, min = 0, max = 2},
|
||||||
|
{name = "wool:brown", chance = 1, min = 0, max = 2},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 5,
|
||||||
|
light_damage = 0,
|
||||||
|
animation = {
|
||||||
|
stand_start = 0,
|
||||||
|
stand_end = 100,
|
||||||
|
stand_speed = 75,
|
||||||
|
stand1_start = 100,
|
||||||
|
stand1_end = 200,
|
||||||
|
stand1_speed = 75,
|
||||||
|
walk_start = 150,
|
||||||
|
walk_end = 250,
|
||||||
|
walk_speed = 75,
|
||||||
|
run_start = 150,
|
||||||
|
run_end = 250,
|
||||||
|
run_speed = 75,
|
||||||
|
punch_start = 250,
|
||||||
|
punch_end = 350,
|
||||||
|
punch_speed = 75,
|
||||||
|
|
||||||
|
|
||||||
|
die_start = 1, -- we dont have a specific death animation so we will
|
||||||
|
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||||
|
die_speed = 1, -- have mob rotate when dying.
|
||||||
|
die_loop = false,
|
||||||
|
die_rotate = true,
|
||||||
|
},
|
||||||
|
follow = {
|
||||||
|
"farming:wheat", "default:grass_1", "farming:barley",
|
||||||
|
"farming:oat", "farming:rye"
|
||||||
|
},
|
||||||
|
view_range = 8,
|
||||||
|
replace_rate = 10,
|
||||||
|
replace_what = {
|
||||||
|
{"group:grass", "air", 0},
|
||||||
|
{"default:dirt_with_grass", "default:dirt", -1}
|
||||||
|
},
|
||||||
|
-- stay_near = {{"farming:straw", "group:grass"}, 10},
|
||||||
|
fear_height = 2,
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
-- feed or tame
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
|
||||||
|
-- if fed 7x wheat or grass then cow can be milked again
|
||||||
|
if self.food and self.food > 6 then
|
||||||
|
self.gotten = false
|
||||||
|
end
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if mobs:protect(self, clicker) then return end
|
||||||
|
if mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) then return end
|
||||||
|
|
||||||
|
local tool = clicker:get_wielded_item()
|
||||||
|
local name = clicker:get_player_name()
|
||||||
|
|
||||||
|
-- milk cow with empty bucket
|
||||||
|
if tool:get_name() == "bucket:bucket_empty" then
|
||||||
|
|
||||||
|
--if self.gotten == true
|
||||||
|
if self.child == true then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.gotten == true then
|
||||||
|
minetest.chat_send_player(name,
|
||||||
|
("Cow already milked!"))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local inv = clicker:get_inventory()
|
||||||
|
|
||||||
|
tool:take_item()
|
||||||
|
clicker:set_wielded_item(tool)
|
||||||
|
|
||||||
|
if inv:room_for_item("main", {name = "animalworld:bucket_milk"}) then
|
||||||
|
clicker:get_inventory():add_item("main", "animalworld:bucket_milk")
|
||||||
|
else
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
pos.y = pos.y + 0.5
|
||||||
|
minetest.add_item(pos, {name = "animalworld:bucket_milk"})
|
||||||
|
end
|
||||||
|
|
||||||
|
self.gotten = true -- milked
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_replace = function(self, pos, oldnode, newnode)
|
||||||
|
|
||||||
|
self.food = (self.food or 0) + 1
|
||||||
|
|
||||||
|
-- if cow replaces 8x grass then it can be milked again
|
||||||
|
if self.food >= 8 then
|
||||||
|
self.food = 0
|
||||||
|
self.gotten = false
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_animal then
|
||||||
|
mobs:spawn({
|
||||||
|
name = "animalworld:yak",
|
||||||
|
nodes = {"default:dirt_with_grass", "ethereal:green_dirt", "default:dirt_with_snow", "default:permafrost"},
|
||||||
|
min_light = 14,
|
||||||
|
interval = 60,
|
||||||
|
chance = 8000, -- 15000
|
||||||
|
min_height = 50,
|
||||||
|
max_height = 200,
|
||||||
|
day_toggle = true,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("animalworld:yak", ("Yak"), "ayak.png")
|
||||||
|
|
||||||
|
|
||||||
|
mobs:alias_mob("animalworld:yak", "animalworld:yak") -- compatibility
|
||||||
|
|
||||||
|
|
||||||
|
-- bucket of milk
|
||||||
|
minetest.register_craftitem(":animalworld:bucket_milk", {
|
||||||
|
description = ("Bucket of Milk"),
|
||||||
|
inventory_image = "animalworld_bucket_milk.png",
|
||||||
|
stack_max = 1,
|
||||||
|
on_use = minetest.item_eat(8, "bucket:bucket_empty"),
|
||||||
|
groups = {food_milk = 1, flammable = 3, drink = 1},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- glass of milk
|
||||||
|
minetest.register_craftitem(":mobs:glass_milk", {
|
||||||
|
description = ("Glass of Milk"),
|
||||||
|
inventory_image = "mobs_glass_milk.png",
|
||||||
|
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
||||||
|
groups = {food_milk_glass = 1, flammable = 3, vessel = 1, drink = 1},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "mobs:glass_milk 4",
|
||||||
|
recipe = {
|
||||||
|
"vessels:drinking_glass", "vessels:drinking_glass",
|
||||||
|
"vessels:drinking_glass", "vessels:drinking_glass",
|
||||||
|
"animalworld:bucket_milk"
|
||||||
|
},
|
||||||
|
replacements = { {"animalworld:bucket_milk", "bucket:bucket_empty"} }
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "animalworld:bucket_milk",
|
||||||
|
recipe = {
|
||||||
|
"group:food_milk_glass", "group:food_milk_glass",
|
||||||
|
"group:food_milk_glass", "group:food_milk_glass",
|
||||||
|
"bucket:bucket_empty"
|
||||||
|
},
|
||||||
|
replacements = {
|
||||||
|
{"group:food_milk_glass", "vessels:drinking_glass 4"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- butter
|
||||||
|
minetest.register_craftitem(":animalworld:butter", {
|
||||||
|
description = ("Butter"),
|
||||||
|
inventory_image = "animalworld_butter.png",
|
||||||
|
on_use = minetest.item_eat(1),
|
||||||
|
groups = {food_butter = 1, flammable = 2},
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("farming") and farming and farming.mod then
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "animalworld:butter",
|
||||||
|
recipe = {"animalworld:bucket_milk", "farming:salt"},
|
||||||
|
replacements = {{ "animalworld:bucket_milk", "bucket:bucket_empty"}}
|
||||||
|
})
|
||||||
|
else -- some saplings are high in sodium so makes a good replacement item
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "animalworld:butter",
|
||||||
|
recipe = {"animalworld:bucket_milk", "default:sapling"},
|
||||||
|
replacements = {{ "animalworld:bucket_milk", "bucket:bucket_empty"}}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- cheese wedge
|
||||||
|
minetest.register_craftitem(":animalworld:cheese", {
|
||||||
|
description = ("Cheese"),
|
||||||
|
inventory_image = "animalworld_cheese.png",
|
||||||
|
on_use = minetest.item_eat(4),
|
||||||
|
groups = {food_cheese = 1, flammable = 2},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "animalworld:cheese",
|
||||||
|
recipe = "animalworld:bucket_milk",
|
||||||
|
cooktime = 5,
|
||||||
|
replacements = {{ "animalworld:bucket_milk", "bucket:bucket_empty"}}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- cheese block
|
||||||
|
minetest.register_node(":animalworld:cheeseblock", {
|
||||||
|
description = ("Cheese Block"),
|
||||||
|
tiles = {"animalworld_cheeseblock.png"},
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {crumbly = 3},
|
||||||
|
sounds = default.node_sound_dirt_defaults()
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "animalworld:cheeseblock",
|
||||||
|
recipe = {
|
||||||
|
{"animalworld:cheese", "animalworld:cheese", "animalworld"},
|
||||||
|
{"animalworld:cheese", "animalworld:cheese", "animalworld:cheese"},
|
||||||
|
{"animalworld:cheese", "animalworld:cheese", "animalworld:cheese"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "animalworld:cheese 9",
|
||||||
|
recipe = {
|
||||||
|
{"animalworld:cheeseblock"},
|
||||||
|
}
|
||||||
|
})
|
Loading…
x
Reference in New Issue
Block a user