Compare commits

...

11 Commits

Author SHA1 Message Date
cora abfad03e6e Add ravager model (no textures yet) 2022-10-21 14:05:50 +02:00
cora 83ac8a4b44 Add puffer fish 2022-10-21 14:05:49 +02:00
cora a7251f0521 Add panda 2022-10-21 14:05:49 +02:00
cora e2a979aaa7 Add drowned 2022-10-21 14:05:49 +02:00
cora 72f14c2a4c turtles can breather under water 2022-10-21 14:05:49 +02:00
cora cbe3c9f626 Fix turtle rotation 2022-10-21 14:05:49 +02:00
cora c0855faf2e Add phantom 2022-10-21 14:05:49 +02:00
cora 76b9e0766b Add Fox 2022-10-21 14:05:49 +02:00
cora 7437cfee34 Add strider 2022-10-21 14:05:49 +02:00
cora 5f418d86d5 Add Bees 2022-10-21 14:05:49 +02:00
cora 555025ebfe Add Turtle 2022-10-21 14:05:49 +02:00
37 changed files with 940 additions and 2 deletions

View File

@ -312,8 +312,8 @@ function mcl_mobs:spawn_setup(def)
local max_light = def.max_light or (minetest.LIGHT_MAX + 1) local max_light = def.max_light or (minetest.LIGHT_MAX + 1)
local chance = def.chance or 1000 local chance = def.chance or 1000
local aoc = def.aoc or aoc_range local aoc = def.aoc or aoc_range
local min_height = def.min_height or mcl_mapgen.overworld.min local min_height = def.min_height or mcl_vars.mg_overworld_min
local max_height = def.max_height or mcl_mapgen.overworld.max local max_height = def.max_height or mcl_vars.mg_overworld_max
local day_toggle = def.day_toggle local day_toggle = def.day_toggle
local on_spawn = def.on_spawn local on_spawn = def.on_spawn
local check_position = def.check_position local check_position = def.check_position

View File

@ -0,0 +1,100 @@
-- TURTLE
-- cora
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local S = minetest.get_translator("mobs_mc")
local turtle = {
type = "animal",
passive = false,
spawn_class = "passive",
skittish = false,
runaway = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 2,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,
reach = 1.5,
jump = false,
makes_footstep_sound = true,
fly = true,
fly_in = {"air"},
walk_velocity = 1,
run_velocity = 2,
follow_velocity = 2,
follow = followitem,
pathfinding = 1,
fear_height = 4,
view_range = 16,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
visual = "mesh",
mesh = "mobs_mc_bee.b3d",
textures = { {
"mobs_mc_bee.png",
} },
visual_size = {x=3, y=3},
sounds = {
},
drops = {
},
animation = {
stand_speed = 7,
walk_speed = 7,
run_speed = 15,
stand_start = 11,
stand_end = 11,
walk_start = 0,
walk_end = 10,
run_start = 0,
run_end = 10,
pounce_start = 11,
pounce_end = 31,
lay_start = 34,
lay_end = 34,
},
}
mcl_mobs:register_mob("mobs_mc:bee", turtle)
-- spawning
mcl_mobs:spawn_setup({
name = "mobs_mc:bee",
biomes = {
"StoneBeach_ocean",
"MesaPlateauFM_sandlevel",
"MesaPlateauF_sandlevel",
"MesaBryce_sandlevel",
"Mesa_sandlevel",
"FlowerForest_beach",
"Forest_beach",
"StoneBeach",
"ColdTaiga_beach_water",
"Taiga_beach",
"Savanna_beach",
"Plains_beach",
"ExtremeHills_beach",
"ColdTaiga_beach",
"Swampland_shore",
"MushroomIslandShore",
"JungleM_shore",
"Jungle_shore",
"MangroveSwamp_shore",
},
interval = 30,
chance = 6000,
min_height = 1,
})
-- spawn eggs
mcl_mobs:register_egg("mobs_mc:bee", S("Bee"), "#FFFF00", "#FFaa99", 0)

View File

@ -0,0 +1,63 @@
local S = minetest.get_translator("mobs_mc")
mcl_mobs:register_mob("mobs_mc:drowned", {
description = S("Drowned"),
type = "monster",
spawn_class = "hostile",
hp_min = 20,
hp_max = 20,
xp_min = 5,
xp_max = 5,
head_swivel = "head.control",
bone_eye_height = 6.3,
head_eye_height = 2.2,
curiosity = 7,
head_pitch_multiplier=-1,
breath_max = -1,
--floats = 0,
armor = {undead = 90, fleshy = 90},
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.8, 0.3},
visual = "mesh",
mesh = "mobs_mc_zombie.b3d",
fly = true,
fly_in = {"mcl_core:water_source","mcl_core:water_flowing"},
textures = {
{
"mobs_mc_empty.png",
"mobs_mc_drowned.png",
--"mobs_mc_drowned_outer_layer.png",
}
},
makes_footstep_sound = true,
sounds = {
random = "mobs_mc_zombie_growl",
war_cry = "mobs_mc_zombie_growl",
death = "mobs_mc_zombie_death",
damage = "mobs_mc_zombie_hurt",
distance = 16,
},
walk_velocity = .8,
run_velocity = 1.6,
damage = 3,
reach = 2,
fear_height = 4,
pathfinding = 1,
jump = true,
jump_height = 4,
group_attack = { "mobs_mc:drowned", "mobs_mc:zombie", "mobs_mc:baby_zombie", "mobs_mc:husk", "mobs_mc:baby_husk" },
drops = drops_zombie,
animation = {
stand_start = 40, stand_end = 49, stand_speed = 2,
walk_start = 0, walk_end = 39, speed_normal = 25,
run_start = 0, run_end = 39, speed_run = 50,
punch_start = 50, punch_end = 59, punch_speed = 20,
},
ignited_by_sunlight = true,
sunlight_damage = 2,
view_range = 16,
attack_type = "dogfight",
harmed_by_heal = true,
attack_npcs = true,
})
mcl_mobs:register_egg("mobs_mc:drowned", S("Drowned"), "#00afff", "#199c66", 0)

View File

@ -0,0 +1,170 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local S = minetest.get_translator("extra_mobs")
--###################
--################### fox
--###################
local followitem = "mcl_farming:sweet_berry"
local fox = {
type = "animal",
passive = false,
spawn_class = "hostile",
skittish = true,
runaway = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 2,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,
reach = 1.5,
jump = true,
makes_footstep_sound = true,
walk_velocity = 3,
run_velocity = 6,
follow_velocity = 2,
follow = followitem,
pathfinding = 1,
fear_height = 4,
view_range = 16,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
specific_attack = { "mobs_mc:chicken", "mobs_mc:cod", "mobs_mc:salmon" },
visual = "mesh",
mesh = "extra_mobs_fox.b3d",
textures = { {
"extra_mobs_fox.png",
"extra_mobs_trans.png",
} },
visual_size = {x=3, y=3},
sounds = {
},
drops = {
},
animation = {
stand_speed = 7,
walk_speed = 7,
run_speed = 15,
stand_start = 11,
stand_end = 11,
walk_start = 0,
walk_end = 10,
run_start = 0,
run_end = 10,
pounce_start = 11,
pounce_end = 31,
lay_start = 34,
lay_end = 34,
},
on_spawn = function(self)
if minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:snow") ~= nil
or minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:dirt_with_grass_snow") ~= nil then
self.object:set_properties({textures={"extra_mobs_artic_fox.png", "extra_mobs_trans.png"}})
end
end,
do_custom = function(self)
if self.child == true then
self.object:set_properties({textures={self.base_texture[1], self.base_texture[1]}})
end
if self.state ~= "attack" and math.random(1, 5000) == 1 then
self.state = "lay"
self.object:set_animation({x= 12, y=16})
minetest.after(math.random(10, 500), function()
if self.state == "lay" then
self.state = "stand"
end
end)
end
for _,object in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 8)) do
if object
and not object:is_player()
and object:get_luaentity()
and object:get_luaentity().name == "mobs_mc:fox"
and self.state ~= "attack" and math.random(1, 500) == 1 then
self.horny = true
end
local lp = object:get_pos()
local s = self.object:get_pos()
local vec = {
x = lp.x - s.x,
y = lp.y - s.y,
z = lp.z - s.z
}
-- scare logic
if (object
and object:is_player()
and not object:get_player_control().sneak)
or (not object:is_player()
and object:get_luaentity()
and object:get_luaentity().name == "mobs_mc:wolf") then
-- don't keep setting it once it's set
if not self.state == "runaway" then
self.state = "runaway"
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
end
-- if it is within a distance of the player or wolf
if 6 > vector.distance(self.object:get_pos(), object:get_pos()) then
self.timer = self.timer + 1
-- have some time before getting scared
if self.timer > 6 then
self.timer = 0
-- punch the fox for the player, but don't do any damage
self.object:punch(object, 0, {
full_punch_interval = 0,
damage_groups = {fleshy = 0}
}, nil)
end
end
end
end
end,
do_punch = function(self)
self.state = "runaway"
end,
}
mcl_mobs:register_mob("mobs_mc:fox", fox)
-- spawning
mcl_mobs:spawn_setup({
name = "mobs_mc:fox",
biomes = {
"FlowerForest",
"Swampland",
"Taiga",
"ExtremeHills",
"BirchForest",
"MegaSpruceTaiga",
"MegaTaiga",
"ExtremeHills+",
"Forest",
"Plains",
"ColdTaiga",
"SunflowerPlains",
"RoofedForest",
"MesaPlateauFM_grasstop",
"ExtremeHillsM",
"BirchForestM",
},
interval = 30,
chance = 6000,
min_height = 1,
})
-- spawn eggs
mcl_mobs:register_egg("mobs_mc:fox", S("Fox"), "#FFDDCC", "#FFaa99", 0)

View File

@ -154,3 +154,13 @@ dofile(path .. "/glow_squid.lua")
dofile(path .. "/piglin.lua") dofile(path .. "/piglin.lua")
dofile(path .. "/hoglin+zoglin.lua") dofile(path .. "/hoglin+zoglin.lua")
dofile(path .. "/turtle.lua")
dofile(path .. "/bee.lua")
dofile(path .. "/strider.lua")
dofile(path .. "/fox.lua")
dofile(path .. "/phantom.lua")
dofile(path .. "/drowned.lua")
dofile(path .. "/panda.lua")
dofile(path .. "/puffer_fish.lua")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,81 @@
-- TURTLE
-- cora
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local S = minetest.get_translator("mobs_mc")
local panda = {
type = "animal",
passive = false,
spawn_class = "passive",
skittish = false,
runaway = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 2,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,
reach = 1.5,
jump = false,
makes_footstep_sound = true,
walk_velocity = 1,
run_velocity = 2,
follow_velocity = 2,
follow = followitem,
pathfinding = 1,
fear_height = 4,
view_range = 16,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
visual = "mesh",
mesh = "mobs_mc_panda.b3d",
textures = { {
"mobs_mc_panda.png",
} },
visual_size = {x=3, y=3},
rotate = 0,
sounds = {
},
drops = {
},
animation = {
stand_speed = 7,
walk_speed = 7,
run_speed = 15,
stand_start = 11,
stand_end = 11,
walk_start = 0,
walk_end = 10,
run_start = 0,
run_end = 10,
pounce_start = 11,
pounce_end = 31,
lay_start = 34,
lay_end = 34,
},
}
mcl_mobs:register_mob("mobs_mc:panda", panda)
-- spawning
mcl_mobs:spawn_setup({
name = "mobs_mc:panda",
biomes = {
"Jungle",
},
interval = 30,
chance = 6000,
min_height = 1,
})
-- spawn eggs
mcl_mobs:register_egg("mobs_mc:panda", S("Panda"), "#FFFFFF", "#000000", 0)

View File

@ -0,0 +1,62 @@
--Phantom for mcl2
--cora
--License for code WTFPL, cc0
local S = minetest.get_translator("mobs_mc")
mcl_mobs:register_mob("mobs_mc:phantom", {
description = S("Phantom"),
type = "monster",
spawn_class = "passive",
pathfinding = 1,
hp_min = 6,
hp_max = 6,
xp_min = 1,
xp_max = 3,
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.89, 0.25},
visual = "mesh",
mesh = "mobs_mc_phantom.b3d",
textures = {{"mobs_mc_phantom.png","mobs_mc_phantom_e.png","mobs_mc_phantom_e_s.png"}},
visual_size = {x=3, y=3},
walk_velocity = 3,
run_velocity = 5,
desired_altitude = 19,
keep_flying = true,
sounds = {
random = "mobs_mc_phantom_random",
damage = {name="mobs_mc_phantom_hurt", gain=0.3},
death = {name="mobs_mc_phantom_death", gain=0.6},
eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
drops = {
{name = "mcl_mobitems:leather", --TODO: phantom membrane
chance = 1,
min = 1,
max = 2,
looting = "common",},
},
animation = {
stand_speed = 50,
walk_speed = 50,
fly_speed = 50,
stand_start = 0,
stand_end = 0,
fly_start = 0,
fly_end = 30,
walk_start = 0,
walk_end = 30,
},
fall_damage = 0,
fall_speed = -2.25,
attack_type = "dogfight",
floats = 1,
physical = true,
fly = true,
makes_footstep_sound = false,
fear_height = 0,
view_range = 16,
})
-- spawn eggs
mcl_mobs:register_egg("mobs_mc:phantom", S("Phantom"), "mobs_mc_spawn_icon_phantom.png", 0)

View File

@ -0,0 +1,102 @@
-- PUFFER FISH
-- cora
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local S = minetest.get_translator("mobs_mc")
local pfish = {
type = "animal",
passive = false,
spawn_class = "passive",
skittish = false,
runaway = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 2,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,
reach = 1.5,
jump = false,
makes_footstep_sound = true,
fly = true,
fly_in = {"mcl_core:water_source","mcl_core:water_flowing"},
breath_max = -1,
walk_velocity = 1,
run_velocity = 2,
follow_velocity = 2,
follow = followitem,
pathfinding = 1,
fear_height = 4,
view_range = 16,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
visual = "mesh",
mesh = "mobs_mc_puffer_fish.b3d",
textures = { {
"mobs_mc_puffer_fish.png",
} },
visual_size = {x=3, y=3},
rotate = 0,
sounds = {
},
drops = {
},
animation = {
stand_speed = 7,
walk_speed = 7,
run_speed = 15,
stand_start = 11,
stand_end = 11,
walk_start = 0,
walk_end = 10,
run_start = 0,
run_end = 10,
pounce_start = 11,
pounce_end = 31,
lay_start = 34,
lay_end = 34,
},
}
mcl_mobs:register_mob("mobs_mc:puffer_fish", pfish)
-- spawning
mcl_mobs:spawn_setup({
name = "mobs_mc:puffer_fish",
biomes = {
"StoneBeach_ocean",
"MesaPlateauFM_sandlevel",
"MesaPlateauF_sandlevel",
"MesaBryce_sandlevel",
"Mesa_sandlevel",
"FlowerForest_beach",
"Forest_beach",
"StoneBeach",
"ColdTaiga_beach_water",
"Taiga_beach",
"Savanna_beach",
"Plains_beach",
"ExtremeHills_beach",
"ColdTaiga_beach",
"Swampland_shore",
"MushroomIslandShore",
"JungleM_shore",
"Jungle_shore",
"MangroveSwamp_shore",
},
interval = 30,
chance = 6000,
min_height = 1,
})
-- spawn eggs
mcl_mobs:register_egg("mobs_mc:puffer_fish", S("Puffer Fish"), "#FFFF00", "#FFaa99", 0)

View File

@ -0,0 +1,248 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
--###################
--################### STRIDER
--###################
local strider = {
type = "animal",
passive = true,
spawn_class = "passive",
hp_min = 20,
hp_max = 20,
xp_min = 9,
xp_max = 9,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,
reach = 2,
collisionbox = {-.6, -0.01, -.6, .6, 1.94, .6},
visual = "mesh",
mesh = "extra_mobs_strider.b3d",
textures = { {
"extra_mobs_strider.png",
} },
visual_size = {x=3, y=3},
sounds = {
},
jump = true,
makes_footstep_sound = true,
walk_velocity = 2,
run_velocity = 4,
runaway = true,
drops = {
{name = "mcl_mobsitems:string",
chance = 1,
min = 2,
max = 5,},
},
animation = {
stand_speed = 15,
walk_speed = 15,
run_speed = 30,
stand_start = 5,
stand_end = 5,
walk_start = 1,
walk_end = 20,
},
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
water_damage = 5,
fear_height = 4,
view_range = 16,
fire_resistant = true,
floats_on_lava = 1,
floats = 0,
do_custom = function(self, dtime)
if minetest.find_node_near(self.object:get_pos(), 2, "mcl_core:lava_source") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_core:lava_flowing") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_nether:nether_lava_source") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_nether:nether_lava_flowing") ~= nil then
self.walk_velocity = 2
self.run_velocity = 4
self.base_texture[1] = "extra_mobs_strider.png"
self.shaking = false
else
self.base_texture[1] = "extra_mobs_strider_cold.png"
self.walk_velocity = .5
self.run_velocity = 1
self.shaking = true
end
self.object:set_properties({textures=self.base_texture, shaking=self.shaking, run_velocity=self.run_velocity, walk_velocity=self.walk_velocity})
-- set needed values if not already present
if not self.v2 then
self.v2 = 0
self.max_speed_forward = 8
self.max_speed_reverse = 4
self.accel = 2
self.terrain_type = 3
self.driver_attach_at = {x = 0, y = 5.5, z = -1.75}
self.driver_eye_offset = {x = 0, y = 10, z = 0}
self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y}
end
-- if driver present allow control of horse
if self.driver then
mobs.drive(self, "walk", "stand", false, dtime)
return false -- skip rest of mob functions
end
return true
end,
on_die = function(self, pos)
-- drop saddle when horse is killed while riding
-- also detach from horse properly
if self.driver then
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
end
end,
on_rightclick = function(self, clicker)
if not clicker or not clicker:is_player() then
return
end
local wielditem = clicker:get_wielded_item()
local controlitem = ""
if minetest.get_modpath("mcl_mobitems") then
controlitem = "mcl_mobitems_warped_fungus_stick:warped_fungus_stick"
else
controlitem = mobs_mc.items.carrot_on_a_stick
end
if wielditem:get_name() ~= controlitem then
if mcl_mobs:feed_tame(self, clicker, 1, true, true) then return end
end
if self.child then
return
end
local item = clicker:get_wielded_item()
if item:get_name() == "mcl_mobitems:saddle" and self.saddle ~= "yes" then
self.base_texture = {
"extra_mobs_strider.png",
"mobs_mc_pig_saddle.png", -- saddle
}
self.object:set_properties({
textures = self.base_texture
})
self.saddle = "yes"
self.tamed = true
self.drops = {
{name = "mcl_mobitems:string",
chance = 1,
min = 1,
max = 3,},
{name = "mcl_mobitems:saddle",
chance = 1,
min = 1,
max = 1,},
}
if not minetest.is_creative_enabled(clicker:get_player_name()) then
local inv = clicker:get_inventory()
local stack = inv:get_stack("main", clicker:get_wield_index())
stack:take_item()
inv:set_stack("main", clicker:get_wield_index(), stack)
end
minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=8, pos=self.object:get_pos()}, true)
return
end
-- Mount or detach player
local name = clicker:get_player_name()
if self.driver and clicker == self.driver then
-- Detach if already attached
mobs.detach(clicker, {x=1, y=0, z=0})
return
elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == controlitem then
-- Ride pig if it has a saddle and player uses a carrot on a stick
mobs.attach(self, clicker)
if not minetest.is_creative_enabled(clicker:get_player_name()) then
local inv = self.driver:get_inventory()
-- 26 uses
if wielditem:get_wear() > 63000 then
-- Break carrot on a stick
local def = wielditem:get_definition()
if def.sounds and def.sounds.breaks then
minetest.sound_play(def.sounds.breaks, {pos = clicker:get_pos(), max_hear_distance = 8, gain = 0.5}, true)
end
wielditem = {name = mobs_mc.items.fishing_rod, count = 1}
else
wielditem:add_wear(2521)
end
inv:set_stack("main",self.driver:get_wield_index(), wielditem)
end
return
end
end,
}
mcl_mobs:register_mob("mobs_mc:strider", strider)
-- Baby strider.
local baby_strider = table.copy(strider)
baby_strider.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3}
baby_strider.xp_min = 13
baby_strider.xp_max = 13
baby_strider.visual_size = {x=strider.visual_size.x/2, y=strider.visual_size.y/2}
textures = { {
"extra_mobs_strider.png",
"extra_mobs_trans.png",
} }
baby_strider.walk_velocity = 1.2
baby_strider.run_velocity = 2.4
baby_strider.child = 1
mcl_mobs:register_mob("mobs_mc:baby_strider", baby_strider)
-- Regular spawning in the Nether
mcl_mobs:spawn_setup({
name = "mobs_mc:strider",
type_of_spawning = "lava",
dimension = "nether",
biomes = {
"Nether"
},
min_height = mcl_vars.mg_nether_min,
max_height = mcl_vars.mg_nether_max,
chance = 2000,
check_position = function(pos)
return minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name:find("lava")
end
})
mcl_mobs:spawn_setup({
name = "mobs_mc:baby_strider",
type_of_spawning = "lava",
dimension = "nether",
biomes = {
"Nether"
},
min_height = mcl_vars.mg_nether_min,
max_height = mcl_vars.mg_nether_max,
chance = 100,
check_position = function(pos)
return minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name:find("lava")
end
})
-- spawn eggs
mcl_mobs:register_egg("mobs_mc:strider", S("Strider"), "#000000", "#FF0000", 0)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,102 @@
-- TURTLE
-- cora
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local S = minetest.get_translator("mobs_mc")
local turtle = {
type = "animal",
passive = false,
spawn_class = "passive",
skittish = false,
runaway = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 2,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,
reach = 1.5,
jump = false,
makes_footstep_sound = true,
fly = true,
fly_in = {"mcl_core:water_source","mcl_core:water_flowing"},
breath_max = -1,
walk_velocity = 1,
run_velocity = 2,
follow_velocity = 2,
follow = followitem,
pathfinding = 1,
fear_height = 4,
view_range = 16,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
visual = "mesh",
mesh = "mobs_mc_turtle.b3d",
textures = { {
"mobs_mc_turtle.png",
} },
visual_size = {x=3, y=3},
rotate = 0,
sounds = {
},
drops = {
},
animation = {
stand_speed = 7,
walk_speed = 7,
run_speed = 15,
stand_start = 11,
stand_end = 11,
walk_start = 0,
walk_end = 10,
run_start = 0,
run_end = 10,
pounce_start = 11,
pounce_end = 31,
lay_start = 34,
lay_end = 34,
},
}
mcl_mobs:register_mob("mobs_mc:turtle", turtle)
-- spawning
mcl_mobs:spawn_setup({
name = "mobs_mc:turtle",
biomes = {
"StoneBeach_ocean",
"MesaPlateauFM_sandlevel",
"MesaPlateauF_sandlevel",
"MesaBryce_sandlevel",
"Mesa_sandlevel",
"FlowerForest_beach",
"Forest_beach",
"StoneBeach",
"ColdTaiga_beach_water",
"Taiga_beach",
"Savanna_beach",
"Plains_beach",
"ExtremeHills_beach",
"ColdTaiga_beach",
"Swampland_shore",
"MushroomIslandShore",
"JungleM_shore",
"Jungle_shore",
"MangroveSwamp_shore",
},
interval = 30,
chance = 6000,
min_height = 1,
})
-- spawn eggs
mcl_mobs:register_egg("mobs_mc:turtle", S("Turtle"), "#0000FF", "#FFaa99", 0)