Compare commits
10 Commits
master
...
turtlestri
Author | SHA1 | Date |
---|---|---|
cora | 6f916ea7e0 | |
cora | da7b4eeb51 | |
cora | 35faa7360b | |
cora | f51d6147ad | |
cora | b2453b587a | |
cora | f1c1b03df4 | |
cora | 18d81b62ae | |
cora | 5e3375f9d2 | |
cora | bdb9b89204 | |
cora | b8cdaa65ed |
|
@ -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
|
||||||
|
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -156,3 +156,13 @@ dofile(path .. "/piglin.lua")
|
||||||
dofile(path .. "/hoglin+zoglin.lua")
|
dofile(path .. "/hoglin+zoglin.lua")
|
||||||
|
|
||||||
dofile(path .. "/strider.lua")
|
dofile(path .. "/strider.lua")
|
||||||
|
|
||||||
|
dofile(path .. "/turtle.lua")
|
||||||
|
dofile(path .. "/bee.lua")
|
||||||
|
|
||||||
|
dofile(path .. "/fox.lua")
|
||||||
|
|
||||||
|
dofile(path .. "/phantom.lua")
|
||||||
|
dofile(path .. "/drowned.lua")
|
||||||
|
dofile(path .. "/panda.lua")
|
||||||
|
dofile(path .. "/puffer_fish.lua")
|
||||||
|
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 573 B |
After Width: | Height: | Size: 665 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 853 B |
After Width: | Height: | Size: 2.2 KiB |
|
@ -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)
|