add mineclone support
This commit is contained in:
parent
3ce08c901a
commit
3a05a29b02
@ -1,15 +1,23 @@
|
||||
|
||||
-- load settings
|
||||
|
||||
local croc_walkers = minetest.settings:get_bool("mobs_crocs.enable_walkers", true)
|
||||
local croc_floaters = minetest.settings:get_bool("mobs_crocs.enable_floaters", true)
|
||||
local croc_swimmers = minetest.settings:get_bool("mobs_crocs.enable_swimmers", true)
|
||||
local croc_spawn_chance = 60000
|
||||
|
||||
-- tweak croc spawn chance depending on which one's are enabled
|
||||
|
||||
croc_spawn_chance = croc_spawn_chance - (croc_walkers and 0 or 20000)
|
||||
croc_spawn_chance = croc_spawn_chance - (croc_floaters and 0 or 20000)
|
||||
croc_spawn_chance = croc_spawn_chance - (croc_swimmers and 0 or 20000)
|
||||
|
||||
-- crocodile mob definition
|
||||
-- Mineclone check
|
||||
|
||||
local mod_mcl = minetest.get_modpath("mcl_core")
|
||||
|
||||
-- crocodile definition
|
||||
|
||||
local croc_def = {
|
||||
type = "monster",
|
||||
attack_type = "dogfight",
|
||||
@ -38,22 +46,18 @@ local croc_def = {
|
||||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 0,
|
||||
stand_end = 80,
|
||||
walk_start = 81,
|
||||
walk_end = 170,
|
||||
fly_start = 81,
|
||||
fly_end = 170,
|
||||
run_start = 81,
|
||||
run_end = 170,
|
||||
punch_start = 205,
|
||||
punch_end = 220
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 0, stand_end = 80,
|
||||
walk_start = 81, walk_end = 170,
|
||||
fly_start = 81, fly_end = 170,
|
||||
run_start = 81, run_end = 170,
|
||||
punch_start = 205, punch_end = 220
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2}
|
||||
{name = (mod_mcl and "mcl_mobitems:beef" or "mobs:meat_raw"),
|
||||
chance = 1, min = 1, max = 3},
|
||||
{name = (mod_mcl and "mcl_mobitems:leather" or "mobs:leather"),
|
||||
chance = 1, min = 0, max = 2}
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,12 +71,11 @@ if croc_walkers then
|
||||
mobs:spawn({
|
||||
name = "mobs_crocs:crocodile",
|
||||
nodes = {
|
||||
"default:dirt_with_grass", "default:dirt",
|
||||
"default:jungle_grass", "default:sand"
|
||||
(mod_mcl and "group:shovely" or "group:crumbly")
|
||||
},
|
||||
neighbors = {
|
||||
"default:water_flowing", "default:water_source",
|
||||
"default:papyrus", "dryplants:juncus", "dryplants:reedmace"
|
||||
"group:water", "dryplants:juncus", "dryplants:reedmace",
|
||||
(mod_mcl and "mcl_core:reeds" or "default:papyrus")
|
||||
},
|
||||
interval = 30,
|
||||
chance = croc_spawn_chance,
|
||||
@ -95,11 +98,11 @@ if croc_floaters then
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_crocs:crocodile_float",
|
||||
nodes = {"default:water_flowing","default:water_source"},
|
||||
nodes = {"group:water"},
|
||||
neighbors = {
|
||||
"default:dirt_with_grass", "default:jungle_grass", "default:sand",
|
||||
"default:dirt", "default:papyrus", "group:seaplants",
|
||||
"dryplants:juncus", "dryplants:reedmace"
|
||||
(mcl_core and "group:shovely" or "group:crumbly"),
|
||||
"group:seaplants", "dryplants:juncus", "dryplants:reedmace",
|
||||
(mod_mcl and "mcl_core:reeds" or "default:papyrus")
|
||||
},
|
||||
interval = 30,
|
||||
chance = croc_spawn_chance,
|
||||
@ -115,7 +118,7 @@ if croc_swimmers then
|
||||
croc_def.collisionbox = {-0.425, -0.15, -0.425, 0.425, 0.75, 0.425}
|
||||
croc_def.visual_size = {x = 2, y = 2}
|
||||
croc_def.fly = true
|
||||
croc_def.fly_in = "default:water_source"
|
||||
croc_def.fly_in = (mod_mcl and "mcl_core:water_source" or "default:water_source")
|
||||
croc_def.fall_speed = -1
|
||||
croc_def.floats = 0
|
||||
|
||||
@ -125,8 +128,8 @@ if croc_swimmers then
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_crocs:crocodile_swim",
|
||||
nodes = {"default:water_flowing", "default:water_source"},
|
||||
neighbors = {"default:sand", "default:dirt", "group:seaplants"},
|
||||
nodes = {"group:water"},
|
||||
neighbors = {(mcl_core and "group:shovely" or "group:crumbly")},
|
||||
interval = 30,
|
||||
chance = croc_spawn_chance,
|
||||
min_height = -8,
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = mobs_crocs
|
||||
depends = default, mobs
|
||||
optional_depends =
|
||||
description = Adds crocodiles into your world.
|
||||
depends = mobs
|
||||
min_minetest_version = 5.0
|
||||
|
@ -2,6 +2,7 @@
|
||||
local SPRITE_VERSION = false -- set to true to use upright sprites instead of meshes
|
||||
|
||||
-- local variables
|
||||
|
||||
local l_spawn_chance = 10000
|
||||
local l_water_level = minetest.settings:get("water_level") - 1
|
||||
local l_visual = "mesh"
|
||||
@ -27,8 +28,11 @@ if SPRITE_VERSION then
|
||||
l_trop_textures = {{"animal_fish_blue_white_fish_blue_white_item.png"}}
|
||||
end
|
||||
|
||||
-- Mineclone check
|
||||
local mod_mcl = minetest.get_modpath("mcl_core")
|
||||
|
||||
-- Clownfish
|
||||
|
||||
mobs:register_mob("mobs_fish:clownfish", {
|
||||
type = "animal",
|
||||
passive = true,
|
||||
@ -44,7 +48,7 @@ mobs:register_mob("mobs_fish:clownfish", {
|
||||
makes_footstep_sound = false,
|
||||
stepheight = 0,
|
||||
fly = true,
|
||||
fly_in = "default:water_source",
|
||||
fly_in = (mod_mcl and "mcl_core:water_source" or "default:water_source"),
|
||||
fall_speed = 0,
|
||||
view_range = 8,
|
||||
water_damage = 0,
|
||||
@ -52,16 +56,11 @@ mobs:register_mob("mobs_fish:clownfish", {
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 1,
|
||||
stand_end = 80,
|
||||
walk_start = 81,
|
||||
walk_end = 155,
|
||||
fly_start = 81,
|
||||
fly_end = 155,
|
||||
run_start = 81,
|
||||
run_end = 155
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 80,
|
||||
walk_start = 81, walk_end = 155,
|
||||
fly_start = 81, fly_end = 155,
|
||||
run_start = 81, run_end = 155
|
||||
},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
@ -85,14 +84,15 @@ mobs:register_mob("mobs_fish:clownfish", {
|
||||
end
|
||||
})
|
||||
|
||||
-- spawn in world
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_fish:clownfish",
|
||||
nodes = {
|
||||
"default:water_source", "default:water_flowing",
|
||||
"default:river_water_source", "default:river_water_flowing"
|
||||
nodes = {"group:water"},
|
||||
neighbors = {
|
||||
(mod_mcl and "group:shovely" or "group:crumbly"),
|
||||
"group:seaplants", "group:seacoral"
|
||||
},
|
||||
neighbors = {"default:sand","default:dirt","group:seaplants","group:seacoral"},
|
||||
min_light = 5,
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
@ -100,12 +100,12 @@ mobs:spawn({
|
||||
active_object_count = 5
|
||||
})
|
||||
|
||||
-- spawn egg
|
||||
|
||||
mobs:register_egg("mobs_fish:clownfish", "Clownfish",
|
||||
"animal_clownfish_clownfish_item.png", 0)
|
||||
|
||||
mobs:register_egg("mobs_fish:clownfish", "Clownfish", "animal_clownfish_clownfish_item.png", 0)
|
||||
|
||||
-- Tropical fish
|
||||
|
||||
mobs:register_mob("mobs_fish:tropical", {
|
||||
type = "animal",
|
||||
passive = true,
|
||||
@ -121,7 +121,7 @@ mobs:register_mob("mobs_fish:tropical", {
|
||||
makes_footstep_sound = false,
|
||||
stepheight = 0,
|
||||
fly = true,
|
||||
fly_in = "default:water_source",
|
||||
fly_in = (mod_mcl and "mcl_core:water_source" or "default:water_source"),
|
||||
fall_speed = 0,
|
||||
view_range = 8,
|
||||
water_damage = 0,
|
||||
@ -129,14 +129,10 @@ mobs:register_mob("mobs_fish:tropical", {
|
||||
light_damage = 0,
|
||||
air_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 1,
|
||||
stand_end = 80,
|
||||
walk_start = 81,
|
||||
walk_end = 155,
|
||||
run_start = 81,
|
||||
run_end = 155
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 80,
|
||||
walk_start = 81, walk_end = 155,
|
||||
run_start = 81, run_end = 155
|
||||
},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
@ -160,14 +156,15 @@ mobs:register_mob("mobs_fish:tropical", {
|
||||
end
|
||||
})
|
||||
|
||||
-- spawn in world
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_fish:tropical",
|
||||
nodes = {
|
||||
"default:water_source", "default:water_flowing",
|
||||
"default:river_water_source", "default:river_water_flowing"
|
||||
nodes = {"group:water"},
|
||||
neighbors = {
|
||||
(mod_mcl and "group:shovely" or "group:crumbly"),
|
||||
"group:seaplants", "group:seacoral"
|
||||
},
|
||||
neighbors = {"default:sand","default:dirt","group:seaplants","group:seacoral"},
|
||||
min_light = 5,
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
@ -175,15 +172,17 @@ mobs:spawn({
|
||||
active_object_count = 5
|
||||
})
|
||||
|
||||
-- spawn egg
|
||||
|
||||
mobs:register_egg("mobs_fish:tropical", "Tropical fish",
|
||||
"animal_fish_blue_white_fish_blue_white_item.png", 0)
|
||||
|
||||
-- helper function
|
||||
|
||||
local function add_food_group(item)
|
||||
|
||||
local def = minetest.registered_items[item]
|
||||
local grp = def.groups
|
||||
local grp = table.copy(def.groups)
|
||||
|
||||
grp.food_fish_raw = 1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = mobs_fish
|
||||
depends = default, mobs
|
||||
optional_depends =
|
||||
description = Adds fish into your world.
|
||||
depends = mobs
|
||||
min_minetest_version = 5.0
|
||||
|
@ -1,4 +1,10 @@
|
||||
|
||||
-- mineclone check
|
||||
|
||||
local mod_mcl = minetest.get_modpath("mcl_core")
|
||||
|
||||
-- jellyfish definition
|
||||
|
||||
mobs:register_mob("mobs_jellyfish:jellyfish", {
|
||||
type = "monster",
|
||||
attack_type = "dogfight",
|
||||
@ -18,7 +24,7 @@ mobs:register_mob("mobs_jellyfish:jellyfish", {
|
||||
walk_velocity = 0.1,
|
||||
run_velocity = 0.1,
|
||||
fly = true,
|
||||
fly_in = "default:water_source",
|
||||
fly_in = (mod_mcl and "mcl_core:water_source" or "default:water_source"),
|
||||
stepheight = 0,
|
||||
fall_speed = 0,
|
||||
view_range = 10,
|
||||
@ -31,20 +37,25 @@ mobs:register_mob("mobs_jellyfish:jellyfish", {
|
||||
end
|
||||
})
|
||||
|
||||
-- spawn in world
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_jellyfish:jellyfish",
|
||||
nodes = {"default:water_source"},
|
||||
neighbors = {"default:water_flowing", "default:water_source"},
|
||||
nodes = {(mod_mcl and "mcl_core:water_source" or "default:water_source")},
|
||||
neighbors = {"group:water"},
|
||||
min_light = 5,
|
||||
interval = 30,
|
||||
chance = 10000,
|
||||
max_height = 0
|
||||
})
|
||||
|
||||
-- spawn egg
|
||||
|
||||
mobs:register_egg("mobs_jellyfish:jellyfish", "Jellyfish", "jellyfish_inv.png", 0)
|
||||
|
||||
-- compatibility
|
||||
|
||||
minetest.register_alias("mobs_jellyfish:jellyfish_set", "mobs_jellyfish:jellyfish")
|
||||
|
||||
|
||||
print("[MOD] Mobs Redo Jellyfish loaded")
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = mobs_jellyfish
|
||||
depends = default, mobs
|
||||
optional_depends =
|
||||
description = Adds jellyfish into your world.
|
||||
depends = mobs
|
||||
min_minetest_version = 5.0
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
-- local variables
|
||||
|
||||
local l_skins = {
|
||||
{
|
||||
"(shark_first.png^[colorize:#404040:150" -- dark grey
|
||||
@ -17,10 +19,10 @@ local l_skins = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local l_spawn_chance = 60000
|
||||
|
||||
-- load settings
|
||||
|
||||
dofile(minetest.get_modpath("mobs_sharks") .. "/SETTINGS.txt")
|
||||
|
||||
if not ENABLE_SHARK_LARGE then
|
||||
@ -35,8 +37,12 @@ if not ENABLE_SHARK_SMALL then
|
||||
l_spawn_chance = l_spawn_chance - 20000
|
||||
end
|
||||
|
||||
-- Mineclone check
|
||||
|
||||
local mod_mcl = minetest.get_modpath("mcl_core")
|
||||
|
||||
-- large
|
||||
|
||||
if ENABLE_SHARK_LARGE then
|
||||
|
||||
mobs:register_mob("mobs_sharks:shark_lg", {
|
||||
@ -55,7 +61,7 @@ if ENABLE_SHARK_LARGE then
|
||||
walk_velocity = 4,
|
||||
run_velocity = 6,
|
||||
fly = true,
|
||||
fly_in = "default:water_source",
|
||||
fly_in = (mod_mcl and "mcl_core:water_source" or "default:water_source"),
|
||||
fall_speed = 0,
|
||||
rotate = 270,
|
||||
view_range = 10,
|
||||
@ -63,31 +69,24 @@ if ENABLE_SHARK_LARGE then
|
||||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 1,
|
||||
stand_end = 80,
|
||||
walk_start = 80,
|
||||
walk_end = 160,
|
||||
fly_start = 80,
|
||||
fly_end = 160,
|
||||
run_start = 80,
|
||||
run_end = 160
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 80,
|
||||
walk_start = 80, walk_end = 160,
|
||||
fly_start = 80, fly_end = 160,
|
||||
run_start = 80, run_end = 160
|
||||
},
|
||||
jump = false,
|
||||
stepheight = 0,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
{name = (mod_mcl and "mcl_mobitems:beef" or "mobs:meat_raw"),
|
||||
chance = 1, min = 1, max = 3}
|
||||
}
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_sharks:shark_lg",
|
||||
nodes = {"default:water_flowing","default:water_source"},
|
||||
neighbors = {
|
||||
"default:water_flowing", "default:water_source",
|
||||
"seawrecks:woodship", "seawrecks:uboot"
|
||||
},
|
||||
nodes = {"group:water"},
|
||||
neighbors = {"group:water", "seawrecks:woodship", "seawrecks:uboot"},
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
max_height = 0
|
||||
@ -97,8 +96,8 @@ if ENABLE_SHARK_LARGE then
|
||||
"mob_shark_shark_item.png", 0)
|
||||
end
|
||||
|
||||
|
||||
-- medium
|
||||
|
||||
if ENABLE_SHARK_MEDIUM then
|
||||
|
||||
mobs:register_mob("mobs_sharks:shark_md", {
|
||||
@ -118,7 +117,7 @@ if ENABLE_SHARK_MEDIUM then
|
||||
walk_velocity = 2,
|
||||
run_velocity = 4,
|
||||
fly = true,
|
||||
fly_in = "default:water_source",
|
||||
fly_in = (mod_mcl and "mcl_core:water_source" or "default:water_source"),
|
||||
fall_speed = -1,
|
||||
rotate = 270,
|
||||
view_range = 10,
|
||||
@ -126,29 +125,23 @@ if ENABLE_SHARK_MEDIUM then
|
||||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 1,
|
||||
stand_end = 80,
|
||||
walk_start = 80,
|
||||
walk_end = 160,
|
||||
run_start = 80,
|
||||
run_end = 160
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 80,
|
||||
walk_start = 80, walk_end = 160,
|
||||
run_start = 80, run_end = 160
|
||||
},
|
||||
jump = false,
|
||||
stepheight = 0,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
{name = (mod_mcl and "mcl_mobitems:beef" or "mobs:meat_raw"),
|
||||
chance = 1, min = 1, max = 3}
|
||||
}
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_sharks:shark_md",
|
||||
nodes = {"default:water_flowing","default:water_source"},
|
||||
neighbors = {
|
||||
"default:water_flowing", "default:water_source",
|
||||
"seawrecks:woodship", "seawrecks:uboot"
|
||||
},
|
||||
nodes = {"group:water"},
|
||||
neighbors = {"group:water", "seawrecks:woodship", "seawrecks:uboot"},
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
max_height = 0
|
||||
@ -158,8 +151,8 @@ if ENABLE_SHARK_MEDIUM then
|
||||
"mob_shark_shark_item.png", 0)
|
||||
end
|
||||
|
||||
|
||||
-- small
|
||||
|
||||
if ENABLE_SHARK_SMALL then
|
||||
|
||||
mobs:register_mob("mobs_sharks:shark_sm", {
|
||||
@ -179,7 +172,7 @@ if ENABLE_SHARK_SMALL then
|
||||
walk_velocity = 2,
|
||||
run_velocity = 4,
|
||||
fly = true,
|
||||
fly_in = "default:water_source",
|
||||
fly_in = (mod_mcl and "mcl_core:water_source" or "default:water_source"),
|
||||
fall_speed = -1,
|
||||
rotate = 270,
|
||||
view_range = 10,
|
||||
@ -187,29 +180,23 @@ if ENABLE_SHARK_SMALL then
|
||||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 1,
|
||||
stand_end = 80,
|
||||
walk_start = 80,
|
||||
walk_end = 160,
|
||||
run_start = 80,
|
||||
run_end = 160
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 80,
|
||||
walk_start = 80, walk_end = 160,
|
||||
run_start = 80, run_end = 160
|
||||
},
|
||||
jump = false,
|
||||
stepheight = 0,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
{name = (mod_mcl and "mcl_mobitems:beef" or "mobs:meat_raw"),
|
||||
chance = 1, min = 1, max = 3}
|
||||
}
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_sharks:shark_sm",
|
||||
nodes = {"default:water_flowing","default:water_source"},
|
||||
neighbors = {
|
||||
"default:water_flowing", "default:water_source",
|
||||
"seawrecks:woodship", "seawrecks:uboot"
|
||||
},
|
||||
nodes = {"group:water"},
|
||||
neighbors = {"group:water", "seawrecks:woodship", "seawrecks:uboot"},
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
max_height = 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = mobs_sharks
|
||||
depends = default, mobs
|
||||
optional_depends =
|
||||
description = Adds sharks into your world.
|
||||
depends = mobs
|
||||
min_minetest_version = 5.0
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
-- settings
|
||||
|
||||
local l_skins = {
|
||||
{"turtle1.png^turtle2.png^turtle3.png^turtle4.png"
|
||||
.. "^turtle5.png^turtle6.png^turtle7.png"},
|
||||
@ -11,8 +13,12 @@ local l_skins = {
|
||||
|
||||
local l_spawn_chance = 30000
|
||||
|
||||
-- Mineclone check
|
||||
|
||||
local mod_mcl = minetest.get_modpath("mcl_core")
|
||||
|
||||
-- land turtle
|
||||
|
||||
mobs:register_mob("mobs_turtles:turtle", {
|
||||
type = "animal",
|
||||
passive = true,
|
||||
@ -36,21 +42,17 @@ mobs:register_mob("mobs_turtles:turtle", {
|
||||
light_damage = 0,
|
||||
fall_damage = 1,
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 1,
|
||||
stand_end = 50,
|
||||
walk_start = 60,
|
||||
walk_end = 90,
|
||||
run_start = 60,
|
||||
run_end = 90,
|
||||
hide_start = 95,
|
||||
hide_end = 100
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1,stand_end = 50,
|
||||
walk_start = 60, walk_end = 90,
|
||||
run_start = 60, run_end = 90,
|
||||
hide_start = 95, hide_end = 100
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
{name = (mod_mcl and "mcl_mobitems:beef" or "mobs:meat_raw"),
|
||||
chance = 1, min = 1, max = 3}
|
||||
},
|
||||
follow = "farming:carrot",
|
||||
follow = (mod_mcl and "mcl_farming:carrot_item" or "farming:carrot"),
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
@ -72,22 +74,21 @@ mobs:register_mob("mobs_turtles:turtle", {
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
if self.state == "hide" then
|
||||
if self and self.state == "hide" then
|
||||
self:set_velocity(0)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- spawn in world
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_turtles:turtle",
|
||||
nodes = {
|
||||
"default:dirt_with_grass", "default:jungle_grass",
|
||||
"default:sand", "default:desert_sand"
|
||||
},
|
||||
nodes = {(mod_mcl and "group:shovely" or "group:crumbly")},
|
||||
neighbors = {
|
||||
"default:dirt_with_grass", "default:jungle_grass", "default:sand",
|
||||
"default:desert_sand", "default:papyrus", "default:cactus",
|
||||
(mod_mcl and "groups:shovely" or "group:crumbly"),
|
||||
(mod_mcl and "mcl_core:reeds" or "default:papyrus"),
|
||||
(mod_mcl and "mcl_core:cactus" or "default:cactus"),
|
||||
"dryplants:juncus", "dryplants:reedmace"
|
||||
},
|
||||
min_light = 5,
|
||||
@ -97,11 +98,12 @@ mobs:spawn({
|
||||
max_height = 10
|
||||
})
|
||||
|
||||
-- spawn egg
|
||||
|
||||
mobs:register_egg("mobs_turtles:turtle", "Turtle", "default_grass.png", 1)
|
||||
|
||||
|
||||
-- sea turtle
|
||||
|
||||
mobs:register_mob("mobs_turtles:seaturtle", {
|
||||
type = "animal",
|
||||
passive = true,
|
||||
@ -121,7 +123,7 @@ mobs:register_mob("mobs_turtles:seaturtle", {
|
||||
stepheight = 1,
|
||||
jump = false,
|
||||
fly = true,
|
||||
fly_in = "default:water_source",
|
||||
fly_in = (mod_mcl and "mcl_core:water_source" or "default:water_source"),
|
||||
fall_speed = 0,
|
||||
floats = 1,
|
||||
water_damage = 0,
|
||||
@ -129,32 +131,28 @@ mobs:register_mob("mobs_turtles:seaturtle", {
|
||||
light_damage = 0,
|
||||
fall_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 1,
|
||||
stand_end = 50,
|
||||
walk_start = 60,
|
||||
walk_end = 90,
|
||||
run_start = 60,
|
||||
run_end = 90,
|
||||
hide_start = 95,
|
||||
hide_end = 100
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 50,
|
||||
walk_start = 60, walk_end = 90,
|
||||
run_start = 60, run_end = 90,
|
||||
hide_start = 95, hide_end = 100
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
{name = (mod_mcl and "mcl_mobitems:beef" or "mobs:meat_raw"),
|
||||
chance = 1, min = 1, max = 3}
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:capture_mob(self, clicker, 0, 0, 80, true, nil)
|
||||
end
|
||||
})
|
||||
|
||||
-- spawn in world
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_turtles:seaturtle",
|
||||
nodes = {"default:water_flowing","default:water_source"},
|
||||
nodes = {"group:water"},
|
||||
neighbors = {
|
||||
"default:water_flowing", "default:water_source", "group:seaplants",
|
||||
"seawrecks:woodship", "seawrecks:uboot"
|
||||
"group:water", "group:seaplants", "seawrecks:woodship", "seawrecks:uboot"
|
||||
},
|
||||
min_light = 5,
|
||||
interval = 30,
|
||||
@ -162,6 +160,7 @@ mobs:spawn({
|
||||
max_height = 0
|
||||
})
|
||||
|
||||
-- spawn egg
|
||||
|
||||
mobs:register_egg("mobs_turtles:seaturtle", "Sea Turtle", "default_water.png", 1)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = mobs_turtles
|
||||
depends = default, mobs
|
||||
optional_depends =
|
||||
description = Adds turtles into your world.
|
||||
depends = mobs
|
||||
min_minetest_version = 5.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user