2022-10-21 03:38:24 +03:00
|
|
|
local S = minetest.get_translator(minetest.get_current_modname())
|
|
|
|
|
|
|
|
local axolotl = {
|
2024-04-21 11:16:15 +03:00
|
|
|
description = S("Axolotl"),
|
2022-10-21 03:38:24 +03:00
|
|
|
type = "animal",
|
2023-05-29 22:43:15 +03:00
|
|
|
spawn_class = "axolotl",
|
2022-10-21 03:38:24 +03:00
|
|
|
can_despawn = true,
|
2022-11-06 05:18:47 +03:00
|
|
|
passive = false,
|
2022-10-21 03:38:24 +03:00
|
|
|
hp_min = 14,
|
|
|
|
hp_max = 14,
|
|
|
|
xp_min = 1,
|
2022-11-16 10:58:07 +03:00
|
|
|
xp_max = 7,
|
2022-11-25 05:30:06 +03:00
|
|
|
|
2022-11-06 05:05:14 +03:00
|
|
|
head_swivel = "head.control",
|
|
|
|
bone_eye_height = -1,
|
|
|
|
head_eye_height = -0.5,
|
2023-11-03 03:06:06 +03:00
|
|
|
horizontal_head_height = 0,
|
2022-11-06 05:05:14 +03:00
|
|
|
curiosity = 10,
|
|
|
|
head_yaw="z",
|
2022-11-06 00:44:51 +03:00
|
|
|
|
2022-10-21 03:38:24 +03:00
|
|
|
armor = 100,
|
2022-11-11 06:50:04 +03:00
|
|
|
rotate = 180,
|
2022-11-06 00:44:51 +03:00
|
|
|
spawn_in_group_min = 1,
|
|
|
|
spawn_in_group = 4,
|
2022-10-21 03:38:24 +03:00
|
|
|
tilt_swim = true,
|
2022-11-06 04:47:31 +03:00
|
|
|
collisionbox = {-0.5, 0.0, -0.5, 0.5, 0.8, 0.5},
|
2022-10-21 03:38:24 +03:00
|
|
|
visual = "mesh",
|
2022-10-26 23:24:48 +03:00
|
|
|
mesh = "mobs_mc_axolotl.b3d",
|
2022-10-21 03:38:24 +03:00
|
|
|
textures = {
|
2022-11-02 06:25:10 +03:00
|
|
|
{"mobs_mc_axolotl_brown.png"},
|
|
|
|
{"mobs_mc_axolotl_yellow.png"},
|
|
|
|
{"mobs_mc_axolotl_green.png"},
|
|
|
|
{"mobs_mc_axolotl_pink.png"},
|
|
|
|
{"mobs_mc_axolotl_black.png"},
|
|
|
|
{"mobs_mc_axolotl_purple.png"},
|
2022-11-25 05:30:06 +03:00
|
|
|
{"mobs_mc_axolotl_white.png"}
|
2022-10-21 03:38:24 +03:00
|
|
|
},
|
2022-11-16 10:58:07 +03:00
|
|
|
sounds = {
|
2022-11-02 06:25:10 +03:00
|
|
|
random = "mobs_mc_axolotl",
|
2022-10-26 23:24:48 +03:00
|
|
|
damage = "mobs_mc_axolotl_hurt",
|
2022-10-21 03:38:24 +03:00
|
|
|
distance = 16,
|
2022-11-16 11:00:35 +03:00
|
|
|
},
|
2022-11-02 20:45:12 +03:00
|
|
|
animation = {-- Stand: 1-20; Walk: 20-60; Swim: 61-81
|
|
|
|
stand_start = 61, stand_end = 81, stand_speed = 15,
|
|
|
|
walk_start = 61, walk_end = 81, walk_speed = 15,
|
|
|
|
run_start = 61, run_end = 81, run_speed = 20,
|
2022-10-21 03:38:24 +03:00
|
|
|
},
|
2022-10-27 07:33:38 +03:00
|
|
|
|
|
|
|
follow = {
|
|
|
|
"mcl_fishing:clownfish_raw"
|
|
|
|
},
|
|
|
|
|
2022-11-06 00:44:51 +03:00
|
|
|
view_range = 16,
|
|
|
|
fear_height = 4,
|
|
|
|
|
|
|
|
on_rightclick = function(self, clicker)
|
2022-11-25 06:18:58 +03:00
|
|
|
local bn = clicker:get_wielded_item():get_name()
|
|
|
|
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
2022-11-25 05:30:23 +03:00
|
|
|
if clicker:set_wielded_item("mcl_buckets:bucket_axolotl") then
|
|
|
|
local it = clicker:get_wielded_item()
|
|
|
|
local m = it:get_meta()
|
|
|
|
m:set_string("properties",minetest.serialize(self.object:get_properties()))
|
|
|
|
clicker:set_wielded_item(it)
|
|
|
|
self.object:remove()
|
|
|
|
end
|
2022-11-24 18:10:17 +03:00
|
|
|
awards.unlock(clicker:get_player_name(), "mcl:cutestPredator")
|
|
|
|
return
|
|
|
|
end
|
2022-12-04 02:21:39 +03:00
|
|
|
if self:feed_tame(clicker, 1, true, false) then return end
|
2022-11-06 00:44:51 +03:00
|
|
|
end,
|
2022-10-21 03:38:24 +03:00
|
|
|
makes_footstep_sound = false,
|
2022-11-02 06:25:10 +03:00
|
|
|
fly = true,
|
|
|
|
fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" },
|
2022-10-21 03:38:24 +03:00
|
|
|
breathes_in_water = true,
|
2022-11-02 07:30:09 +03:00
|
|
|
jump = true,
|
2022-11-06 05:14:58 +03:00
|
|
|
damage = 2,
|
|
|
|
reach = 2,
|
|
|
|
attack_type = "dogfight",
|
2022-11-06 05:00:28 +03:00
|
|
|
attack_animals = true,
|
2022-11-25 05:30:06 +03:00
|
|
|
specific_attack = {
|
2022-11-06 05:05:14 +03:00
|
|
|
"extra_mobs_cod",
|
|
|
|
"extra_mobs_glow_squid",
|
|
|
|
"extra_mobs_salmon",
|
|
|
|
"extra_mobs_tropical_fish",
|
|
|
|
"mobs_mc_squid"
|
|
|
|
},
|
2022-10-21 03:38:24 +03:00
|
|
|
runaway = true,
|
|
|
|
}
|
|
|
|
|
2022-11-09 06:09:58 +03:00
|
|
|
mcl_mobs.register_mob("mobs_mc:axolotl", axolotl)
|
2022-10-21 03:38:24 +03:00
|
|
|
|
|
|
|
local water = 0
|
|
|
|
|
|
|
|
mcl_mobs:spawn_specific(
|
|
|
|
"mobs_mc:axolotl",
|
|
|
|
"overworld",
|
|
|
|
"water",
|
|
|
|
{
|
|
|
|
"Swampland",
|
|
|
|
"MushroomIsland",
|
|
|
|
"RoofedForest",
|
|
|
|
"FlowerForest_beach",
|
|
|
|
"Forest_beach",
|
|
|
|
"StoneBeach",
|
|
|
|
"Taiga_beach",
|
|
|
|
"Savanna_beach",
|
|
|
|
"Plains_beach",
|
|
|
|
"ExtremeHills_beach",
|
|
|
|
"Swampland_shore",
|
|
|
|
"MushroomIslandShore",
|
|
|
|
"JungleM_shore",
|
|
|
|
"Jungle_shore",
|
|
|
|
"RoofedForest_ocean",
|
|
|
|
"JungleEdgeM_ocean",
|
|
|
|
"BirchForestM_ocean",
|
|
|
|
"BirchForest_ocean",
|
|
|
|
"IcePlains_deep_ocean",
|
|
|
|
"Jungle_deep_ocean",
|
|
|
|
"Savanna_ocean",
|
|
|
|
"MesaPlateauF_ocean",
|
|
|
|
"SunflowerPlains_ocean",
|
|
|
|
"Swampland_ocean",
|
|
|
|
"ExtremeHillsM_ocean",
|
|
|
|
"Mesa_ocean",
|
|
|
|
"StoneBeach_ocean",
|
|
|
|
"Plains_ocean",
|
|
|
|
"MesaPlateauFM_ocean",
|
|
|
|
"MushroomIsland_ocean",
|
|
|
|
"MegaTaiga_ocean",
|
|
|
|
"StoneBeach_deep_ocean",
|
|
|
|
"SavannaM_ocean",
|
|
|
|
"ExtremeHills_ocean",
|
|
|
|
"Forest_ocean",
|
|
|
|
"JungleEdge_ocean",
|
|
|
|
"MesaBryce_ocean",
|
|
|
|
"MegaSpruceTaiga_ocean",
|
|
|
|
"ExtremeHills+_ocean",
|
|
|
|
"Jungle_ocean",
|
|
|
|
"FlowerForest_ocean",
|
|
|
|
"Desert_ocean",
|
|
|
|
"Taiga_ocean",
|
|
|
|
"JungleM_ocean",
|
|
|
|
"FlowerForest_underground",
|
|
|
|
"JungleEdge_underground",
|
|
|
|
"StoneBeach_underground",
|
|
|
|
"MesaBryce_underground",
|
|
|
|
"Mesa_underground",
|
|
|
|
"RoofedForest_underground",
|
|
|
|
"Jungle_underground",
|
|
|
|
"Swampland_underground",
|
|
|
|
"MushroomIsland_underground",
|
|
|
|
"BirchForest_underground",
|
|
|
|
"Plains_underground",
|
|
|
|
"MesaPlateauF_underground",
|
|
|
|
"ExtremeHills_underground",
|
|
|
|
"MegaSpruceTaiga_underground",
|
|
|
|
"BirchForestM_underground",
|
|
|
|
"SavannaM_underground",
|
|
|
|
"MesaPlateauFM_underground",
|
|
|
|
"Desert_underground",
|
|
|
|
"Savanna_underground",
|
|
|
|
"Forest_underground",
|
|
|
|
"SunflowerPlains_underground",
|
|
|
|
"MegaTaiga_underground",
|
|
|
|
"Taiga_underground",
|
|
|
|
"ExtremeHills+_underground",
|
|
|
|
"JungleM_underground",
|
|
|
|
"ExtremeHillsM_underground",
|
|
|
|
"JungleEdgeM_underground",
|
2022-10-30 01:29:09 +03:00
|
|
|
"LushCaves",
|
2022-10-21 03:38:24 +03:00
|
|
|
},
|
|
|
|
0,
|
|
|
|
minetest.LIGHT_MAX+1,
|
|
|
|
30,
|
2023-11-27 12:47:55 +03:00
|
|
|
100,
|
2022-10-21 03:38:24 +03:00
|
|
|
3,
|
|
|
|
water-16,
|
|
|
|
water+1)
|
|
|
|
|
2022-11-04 05:21:58 +03:00
|
|
|
-- spawn eggs
|
2022-11-09 06:09:58 +03:00
|
|
|
mcl_mobs.register_egg("mobs_mc:axolotl", S("Axolotl"), "#e890bf", "#b83D7e", 0)
|