many worldgen mods and gonna try technic now
@@ -0,0 +1,27 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Skandarella
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
|
||||
|
||||
Modified Code by Liil/Wilhelmine/Skandarella (c) 2022
|
||||
Textures, Models, Sounds and Schematics by Liil/Wilhelmine/Skandarella under (MIT) License (c) 2022
|
||||
@@ -0,0 +1,89 @@
|
||||
local S = minetest.get_translator("livingcavesmobs")
|
||||
|
||||
mobs:register_mob("livingcavesmobs:biter", {
|
||||
stepheight = 3,
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 4,
|
||||
hp_min = 35,
|
||||
hp_max = 55,
|
||||
armor = 100,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.95, 0.3},
|
||||
visual = "mesh",
|
||||
mesh = "Biter.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturebiter.png"},
|
||||
{"texturebiter2.png"},
|
||||
{"texturebiter3.png"},
|
||||
},
|
||||
sounds = {
|
||||
random = "livingcavesmobs_biter2",
|
||||
attack = "livingcavesmobs_biter2",
|
||||
death = "livingcavesmobs_biter3",
|
||||
damage = "livingcavesmobs_biter",
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
jump_height = 6,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||
{name = "mobs:leather", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 1,
|
||||
fear_height = 4,
|
||||
stay_near = {{"livingcaves:water_flowing", "livingcaves:water_source"}, 4},
|
||||
animation = {
|
||||
speed_normal = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
die_start = 300,
|
||||
die_end = 400,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
follow = {
|
||||
"ethereal:fish_raw", "anjimalworld:rawfish", "mobs_fish:tropical",
|
||||
"mobs:meat_raw", "animalworld:rabbit_raw", "xocean:fish_edible", "fishing:fish_raw", "water_life:meat_raw", "fishing:carp_raw", "animalworld:chicken_raw"
|
||||
},
|
||||
view_range = 12,
|
||||
|
||||
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, 0, 25, 0, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_livingcavesmobs then
|
||||
mobs:spawn({
|
||||
name = "livingcavesmobs:biter",
|
||||
nodes = {"livingcaves:dripstonecave_bottom"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 80,
|
||||
active_object_count = 3,
|
||||
min_height = -200,
|
||||
max_height = -90,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("livingcavesmobs:biter", S("Biter"), "abiter.png")
|
||||
@@ -0,0 +1,91 @@
|
||||
local S = minetest.get_translator("livingcavesmobs")
|
||||
|
||||
mobs:register_mob("livingcavesmobs:chubby", {
|
||||
stepheight = 3,
|
||||
type = "animal",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = true,
|
||||
reach = 2,
|
||||
damage = 1,
|
||||
hp_min = 5,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.3, 0.3},
|
||||
visual = "mesh",
|
||||
mesh = "Chubby.b3d",
|
||||
textures = {
|
||||
{"texturechubby.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
death = "livingcavesmobs_chubby",
|
||||
attack = "livingcavesmobs_chubby2",
|
||||
},
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2,
|
||||
jump = true,
|
||||
jump_height = 4,
|
||||
pushable = true,
|
||||
stay_near = {"livingcaves:bacteriacave_poolstone", 4},
|
||||
follow = {"fishing:bait:worm", "ethereal:worm", "animalworld:ant", "animalworld:termite", "animalworld:cockroach"},
|
||||
view_range = 10,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 4,
|
||||
animation = {
|
||||
speed_normal = 160,
|
||||
stand_speed = 80,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand1_start = 100,
|
||||
stand1_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 70,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
die_start = 300,
|
||||
die_end = 400,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
fly_in = {"default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing", "livingcaves:water_source", "livingcaves:water_flowing",},
|
||||
floats = 0,
|
||||
follow = {
|
||||
"ethereal:worm", "seaweed", "fishing:bait_worm", "animalworld:ant", "animalworld:termite", "animalworld:fishfood"
|
||||
},
|
||||
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, 15, 25, 0, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_livingcavesmobs then
|
||||
mobs:spawn({
|
||||
name = "livingcavesmobs:chubby",
|
||||
nodes = {"livingcaves:water_source", "livingcaves:water_flowing"},
|
||||
neighbors = {"livingcaves:bacteriacave_poolstone"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 80,
|
||||
active_object_count = 1,
|
||||
min_height = -400,
|
||||
max_height = -200,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("livingcavesmobs:chubby", ("Chubby"), "achubby.png")
|
||||
|
||||
|
||||
mobs:alias_mob("livingcavesmobs:chubby", "livingcavesmobs:chubby") -- compatibility
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
default
|
||||
livingcaves
|
||||
mobs
|
||||
tnt
|
||||
ethereal?
|
||||
naturalbiomes?
|
||||
@@ -0,0 +1 @@
|
||||
adds mobs to the livingcaves mod
|
||||
@@ -0,0 +1,125 @@
|
||||
local S = minetest.get_translator("livingcavesmobs")
|
||||
local random = math.random
|
||||
|
||||
mobs:register_mob("livingcavesmobs:explodingbacteria", {
|
||||
stepheight = 0,
|
||||
type = "animal",
|
||||
passive = false,
|
||||
attack_type = "explode",
|
||||
explosion_radius = 2,
|
||||
explosion_damage__radius = 6,
|
||||
explosion_timer = 2,
|
||||
attack_npcs = false,
|
||||
attack_animals = false,
|
||||
reach = 3,
|
||||
damage = 18,
|
||||
hp_min = 15,
|
||||
hp_max = 30,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
visual = "mesh",
|
||||
visual_size = {x = 2.6, y = 2.6},
|
||||
mesh = "Explodingbacteria.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"textureexplodingbacteria.png"},
|
||||
|
||||
},
|
||||
sounds = {
|
||||
random = "",},
|
||||
makes_footstep_sound = false,
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2,
|
||||
runaway = false,
|
||||
jump = false,
|
||||
jump_height = 6,
|
||||
stay_near = {{"livingcaves:bacteriacave_nest"}, 5},
|
||||
sounds = {
|
||||
attack = "livingcavesmobs_explodingbacteria",
|
||||
random = "livingcavesmobs_explodingbacteria3",
|
||||
damage = "livingcavesmobs_explodingbacteria2",
|
||||
distance = 10,
|
||||
},
|
||||
drops = {
|
||||
{name = "tnt:gunpowder", chance = 1, min = 0, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fear_height = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 1,
|
||||
stand_end = 100,
|
||||
stand1_start = 100,
|
||||
stand1_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
fly_start = 200, -- swim animation
|
||||
fly_end = 300,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
fly_in = {"air"},
|
||||
floats = 1,
|
||||
fly = true,
|
||||
follow = {"default:stone", "default:coal", "livingcaves:hangingmoldend", "livingcaves:hangingmold"},
|
||||
view_range = 13,
|
||||
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, 25, 0, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_livingcavesmobs then
|
||||
mobs:spawn({
|
||||
name = "livingcavesmobs:explodingbacteria",
|
||||
nodes = {"livingcaves:bacteriacave_nest"},
|
||||
neighbors = {"livingcaves:bacteriacave_nestfoot"},
|
||||
min_light = 0,
|
||||
interval = 10,
|
||||
chance = 1,
|
||||
active_object_count = 4,
|
||||
min_height = -400,
|
||||
max_height = -200,
|
||||
|
||||
on_spawn = function(self, pos)
|
||||
|
||||
local nods = minetest.find_nodes_in_area_under_air(
|
||||
{x = pos.x - 4, y = pos.y - 3, z = pos.z - 4},
|
||||
{x = pos.x + 4, y = pos.y + 3, z = pos.z + 4},
|
||||
{"livingcaves:bacteriacave_nest"})
|
||||
|
||||
if nods and #nods > 0 then
|
||||
|
||||
-- min herd of 4
|
||||
local iter = math.min(#nods, 4)
|
||||
|
||||
-- print("--- explodingbacteria at", minetest.pos_to_string(pos), iter)
|
||||
|
||||
for n = 1, iter do
|
||||
|
||||
local pos2 = nods[random(#nods)]
|
||||
local kid = random(4) == 1 and true or nil
|
||||
|
||||
pos2.y = pos2.y + 2
|
||||
|
||||
if minetest.get_node(pos2).name == "air" then
|
||||
|
||||
mobs:add_mob(pos2, {
|
||||
name = "livingcavesmobs:explodingbacteria", child = kid})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
mobs:register_egg("livingcavesmobs:explodingbacteria", S("Giant Bacteria"), "aexplodingbacteria.png", 0)
|
||||
|
||||
|
||||
mobs:alias_mob("livingcavesmobs:explodingbacteria", "livingcavesmobs:explodingbacteria") -- compatibility
|
||||
@@ -0,0 +1,73 @@
|
||||
local S = minetest.get_translator("livingcavesmobs")
|
||||
|
||||
mobs:register_mob("livingcavesmobs:flesheatingbacteria", {
|
||||
stepheight = 0,
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 1,
|
||||
damage = 6,
|
||||
hp_min = 5,
|
||||
hp_max = 10,
|
||||
armor = 100,
|
||||
collisionbox = {-0.1, -0.01, -0.1, 0.1, 0.1, 0.1},
|
||||
visual = "mesh",
|
||||
visual_size = {x = 0.5, y = 0.5},
|
||||
mesh = "Flesheatingbacteria.b3d",
|
||||
textures = {
|
||||
{"textureflesheatingbacteria.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "livingcavesmobs_flesheatingbacteria",
|
||||
},
|
||||
makes_footstep_sound = false,
|
||||
walk_velocity = 0.3,
|
||||
run_velocity = 0.5,
|
||||
runaway = false,
|
||||
jump = false,
|
||||
jump_height = 0,
|
||||
stepheight = 0,
|
||||
stay_near = {"livingcaves:bacteriacave_trapstone", 3},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 1,
|
||||
light_damage = 1,
|
||||
fear_height = 0,
|
||||
animation = {
|
||||
speed_normal = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 3,
|
||||
|
||||
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, 25, 0, 0, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_livingcavesmobs then
|
||||
mobs:spawn({
|
||||
name = "livingcavesmobs:flesheatingbacteria",
|
||||
nodes = {"livingcaves:bacteriacave_trapnode"},
|
||||
min_light = 0,
|
||||
interval = 10,
|
||||
chance = 1,
|
||||
active_object_count = 4,
|
||||
min_height = -400,
|
||||
max_height = -200,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("livingcavesmobs:flesheatingbacteria", S("Flesh Eating Bacteria"), "aflesheatingbacteria.png")
|
||||
@@ -0,0 +1,244 @@
|
||||
local S = minetest.get_translator("livingcavesmobs")
|
||||
|
||||
mobs.grub_drops = {
|
||||
"farming:string"
|
||||
}
|
||||
|
||||
mobs:register_mob("livingcavesmobs:grub", {
|
||||
stepheight = 1,
|
||||
type = "npc",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
reach = 2,
|
||||
damage = 0,
|
||||
hp_min = 10,
|
||||
hp_max = 20,
|
||||
armor = 100,
|
||||
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.3, 0.2},
|
||||
visual = "mesh",
|
||||
mesh = "Grub.b3d",
|
||||
textures = {
|
||||
{"texturegrub.png"},
|
||||
},
|
||||
makes_footstep_sound = false,
|
||||
sounds = {
|
||||
},
|
||||
walk_velocity = 0.5,
|
||||
run_velocity = 0.7,
|
||||
runaway = true,
|
||||
stay_near = {{"livingcaves:glowshroom_top", "default:bush_leaves", "default:blueberry_bush_leaves", "naturalbiomes:cowberrybush_leaves", "naturalbiomes:beach_bush_leaves", "naturalbiomes:outback_bush_leaves"}, 4},
|
||||
jump = false,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
view_range = 3,
|
||||
drops = {
|
||||
{name = "livingcavesmobs:grub", chance = 3, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 2,
|
||||
animation = {
|
||||
speed_normal = 70,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand_start = 100,
|
||||
stand_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
|
||||
-- capture npc with net or lasso
|
||||
if mobs:capture_mob(self, clicker, 25, 0, 0, false, nil) then return end
|
||||
|
||||
-- protect npc with mobs:protector
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.grub_drops
|
||||
if item:get_name() == "default:bush_leaves" or item:get_name() == "default:blueberry_bush_leaves" or item:get_name() == "naturalbiomes:beach_bush_leaves" or item:get_name() == "naturalbiomes:outback_bush_leaves" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.npc_drops or mobs.grub_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Grub dropped you a string for bush leaves!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- by right-clicking owner can switch npc between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Grub stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Grub will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
mobs:register_egg("livingcavesmobs:grub", S("Grub"), "agrub.png")
|
||||
|
||||
|
||||
mobs:alias_mob("livingcavesmobs:grub", "livingcavesmobs:grub") -- compatibility
|
||||
|
||||
minetest.register_craftitem(":livingcavesmobs:cocoon", {
|
||||
description = S("Moth Cocoon"),
|
||||
inventory_image = "livingcavesmobs_cocoon.png",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"livingcavesmobs_cocoon.png"},
|
||||
inventory_image = "livingcavesmobs_cocoon.png",
|
||||
wield_image = "livingcavesmobs_cocoon.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
|
||||
},
|
||||
on_use = minetest.item_eat(2),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
groups = {food = 1, flammable = 2, fleshy = 3, dig_immediate = 3},
|
||||
drop = "livingcavesmobs:cocoon",
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "livingcavesmobs:cocoon", param2 = 1})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":livingcavesmobs:mothegg", {
|
||||
description = S("Moth Egg"),
|
||||
inventory_image = "livingcavesmobs_mothegg.png",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"livingcavesmobs_mothegg.png"},
|
||||
inventory_image = "livingcavesmobs_mothegg.png",
|
||||
wield_image = "livingcavesmobs_mothegg.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
|
||||
},
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {food = 1, flammable = 2, fleshy = 3, dig_immediate = 3},
|
||||
drop = "livingcavesmobs:mothegg",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "livingcavesmobs:mothegg", param2 = 1})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:cocoon",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:grub", "default:bush_leaves", "default:bush_leaves", "default:bush_leaves"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:cocoon",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:grub", "default:blueberry_bush_leaves", "default:blueberry_bush_leaves", "default:blueberry_bush_leaves"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:cocoon",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:grub", "naturalbiomes:beach_bush_leaves", "naturalbiomes:beach_bush_leaves", "naturalbiomes:beach_bush_leaves"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:cocoon",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:grub", "naturalbiomes:outback_bush_leaves", "naturalbiomes:outback_bush_leaves", "naturalbiomes:outback_bush_leaves"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "wool:white",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:cocoon", "livingcavesmobs:cocoon", "livingcavesmobs:cocoon", "livingcavesmobs:cocoon"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:moth",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:cocoon", "default:stick"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:grub",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:mothegg", "naturalbiomes:outback_bush_leaves", "naturalbiomes:outback_bush_leaves", "naturalbiomes:outback_bush_leaves"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:grub",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:mothegg", "naturalbiomes:beach_bush_leaves", "naturalbiomes:beach_bush_leaves", "naturalbiomes:beach_bush_leaves"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:grub",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:mothegg", "default:blueberry_bush_leaves", "default:blueberry_bush_leaves", "default:blueberry_bush_leaves"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "livingcavesmobs:grub",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"livingcavesmobs:mothegg", "default:bush_leaves", "default:bush_leaves", "default:bush_leaves"}
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
if minetest.get_modpath("hunger_ng") ~= nil then
|
||||
hunger_ng.add_hunger_data('livingcavesmobs:cocoon', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
end
|
||||
@@ -0,0 +1,47 @@
|
||||
--This creates the livingcavesmobs object.
|
||||
livingcavesmobs = {}
|
||||
|
||||
--This creates the livingcavesmobs.settings object, and fills it with either the menu selected choices as defined in settingtypes.txt, or default values, (In this case, false).
|
||||
livingcavesmobs.settings = {
|
||||
clear_biomes = minetest.settings:get_bool("livingcavesmobs.clear_biomes") or false,
|
||||
clear_decos = minetest.settings:get_bool("livingcavesmobs.clear_decos") or false,
|
||||
clear_ores = minetest.settings:get_bool("livingcavesmobs.clear_ores") or false,
|
||||
}
|
||||
|
||||
if livingcavesmobs.settings.clear_biomes then
|
||||
minetest.clear_registered_biomes()
|
||||
end
|
||||
if livingcavesmobs.settings.clear_decos then
|
||||
minetest.clear_registered_decorations()
|
||||
end
|
||||
if livingcavesmobs.settings.clear_ores then
|
||||
minetest.clear_registered_ores()
|
||||
end
|
||||
|
||||
local modname = "livingcavesmobs"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
-- Load support for intllib.
|
||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||
|
||||
local S = minetest.get_translator and minetest.get_translator("livingcavesmobs") or
|
||||
dofile(path .. "intllib.lua")
|
||||
|
||||
|
||||
|
||||
-- plants
|
||||
dofile(path .. "biter.lua") --
|
||||
dofile(path .. "chubby.lua") --
|
||||
dofile(path .. "explodingbacteria.lua") --
|
||||
dofile(path .. "flesheatingbacteria.lua") --
|
||||
dofile(path .. "moth.lua") --
|
||||
dofile(path .. "grub.lua") --
|
||||
dofile(path .. "yeti.lua") --
|
||||
dofile(path .. "hunger.lua") --
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
print (S("[MOD] Caves loaded"))
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Support for the old multi-load method
|
||||
dofile(minetest.get_modpath("intllib").."/init.lua")
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# textdomain: livingcavesmobs
|
||||
|
||||
### biter.lua ###
|
||||
Biter=Beißer
|
||||
|
||||
### explodingbacteria.lua ###
|
||||
Giant Bacteria=Riesenbakterie
|
||||
|
||||
### flesheatingbacteria.lua ###
|
||||
Flesh Eating Bacteria=Fleischfressende Bakterie
|
||||
|
||||
### grub.lua ###
|
||||
Grub dropped you a string for bush leaves!=Die Larve hat einen Faden für Buschblätter produziert!
|
||||
Grub stands still=Larve wartet
|
||||
Grub will follow you=Die Larve folgt dir
|
||||
Grub=Larve
|
||||
Moth Cocoon=Mottenkokon
|
||||
Moth Egg=Mottenei
|
||||
|
||||
### moth.lua ###
|
||||
Moth=Motte
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
name = livingcavesmobs
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
local S = minetest.get_translator("livingcavesmobs")
|
||||
|
||||
mobs.moth_drops = {
|
||||
"livingcavesmobs:mothegg"
|
||||
}
|
||||
|
||||
mobs:register_mob("livingcavesmobs:moth", {
|
||||
stepheight = 3,
|
||||
type = "npc",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = false,
|
||||
owner_loyal = true,
|
||||
reach = 2,
|
||||
damage = 0,
|
||||
hp_min = 5,
|
||||
hp_max = 15,
|
||||
armor = 100,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.3, 0.3},
|
||||
visual = "mesh",
|
||||
visual_size = {x = 2.0, y = 2.0},
|
||||
mesh = "Moth.b3d",
|
||||
textures = {
|
||||
{"texturemoth.png"},
|
||||
},
|
||||
sounds = {
|
||||
},
|
||||
makes_footstep_sound = false,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
walk_chance = 15,
|
||||
fall_speed = 0,
|
||||
jump = false,
|
||||
jump_height = 6,
|
||||
stepheight = 3,
|
||||
fly = true,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
drops = {
|
||||
},
|
||||
water_damage = 4,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fear_height = 0,
|
||||
stay_near = {{"livingcaves:glowshroom_top"}, 3},
|
||||
animation = {
|
||||
speed_normal = 200,
|
||||
stand_speed = 50,
|
||||
stand_start = 120,
|
||||
stand_end = 170,
|
||||
fly_start = 0,
|
||||
fly_end = 100,
|
||||
die_start = 0,
|
||||
die_end = 100,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
|
||||
fly_in = {"air"},
|
||||
floats = 0,
|
||||
view_range = 5,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
|
||||
-- capture npc with net or lasso
|
||||
if mobs:capture_mob(self, clicker, 0, 25, 0, false, nil) then return end
|
||||
|
||||
-- protect npc with mobs:protector
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.moth_drops
|
||||
if item:get_name() == "farming:melon_slice" or item:get_name() == "farming:pineapple" or item:get_name() == "ethereal:banana" or item:get_name() == "naturalbiomes:banana" or item:get_name() == "livingdesert:date_palm_fruits" or item:get_name() == "livingdesert:figcactus_fruit" or item:get_name() == "default:apple" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.npc_drops or mobs.moth_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, ("Moth dropped you an egg for fruit!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- by right-clicking owner can switch npc between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, ("Moth stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, ("Moth will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_livingcavesmobs then
|
||||
mobs:spawn({
|
||||
name = "livingcavesmobs:moth",
|
||||
nodes = {"livingcaves:mushcave_bottom"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 800, -- 15000
|
||||
active_object_count = 4,
|
||||
min_height = -90,
|
||||
max_height = -30,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("livingcavesmobs:moth", S("Moth"), "amoth.png")
|
||||
|
After Width: | Height: | Size: 372 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 935 B |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,130 @@
|
||||
local S = minetest.get_translator("livingcavesmobs")
|
||||
|
||||
mobs:register_mob("livingcavesmobs:yeti", {
|
||||
stepheight = 3,
|
||||
type = "animal",
|
||||
passive = false,
|
||||
attack_type = "dogshoot",
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 3, -- shoot for 10 seconds
|
||||
dogshoot_count2_max = 5, -- dogfight for 3 seconds
|
||||
shoot_interval = 1,
|
||||
arrow = "livingcavesmobs:iceball",
|
||||
shoot_offset = 0.8,
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
attack_monsters = true,
|
||||
reach = 2,
|
||||
damage = 6,
|
||||
hp_min = 65,
|
||||
hp_max = 95,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.5, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "Yeti.b3d",
|
||||
visual_size = {x = 3.0, y = 3.0},
|
||||
textures = {
|
||||
{"textureyeti.png"},
|
||||
{"textureyeti2.png"},
|
||||
},
|
||||
child_texture = {
|
||||
{"textureyetibaby.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "livingcavesmobs_yeti2",
|
||||
attack = "livingcavesmobs_yeti3",
|
||||
damage = "livingcavesmobs_yeti",
|
||||
|
||||
},
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
knock_back = false,
|
||||
jump = true,
|
||||
jump_height = 2,
|
||||
pushable = true,
|
||||
follow = {"default:apple", "farming:potato", "ethereal:banana_bread", "farming:carrot", "farming:seed_rice", "farming:corn", "farming:wheat", "farming:beans", "farming:barley", "farming:oat", "farming:rye", "mobs:cheese", "farming:bread", "ethereal:banana_bread", "ethereal:banana", "farming:cabbage", "farming:lettuce", "farming:melon_slice", "livingcavesmobs:termitequeen", "livingcavesmobs:locust_roasted", "livingdesert:date_palm_fruits", "livingdesert:figcactus_fruit"},
|
||||
view_range = 10,
|
||||
replace_rate = 10,
|
||||
replace_what = {"livingcaves:icestalagmite", "livingcaves:icestalagmiteend", "livingcaves:icestalagtite", "livingcaves:icestalagtiteend", "livingcaves:icestalagmitelarge", "livingcaves:icestalagmitelargeend", "livingcaves:icestalagtitelarge", "livingcaves:icestalagtitelargeend"},
|
||||
replace_with = "air",
|
||||
drops = {
|
||||
{name = "wool:white", chance = 1, min = 1, max = 3},
|
||||
{name = "wool:grey", chance = 1, min = 1, max = 3},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 4,
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_speed = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
stand3_start = 200,
|
||||
stand3_end = 300,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_start = 400,
|
||||
punch_end = 500,
|
||||
shoot_start = 400,
|
||||
shoot_end = 500,
|
||||
die_start = 400,
|
||||
die_end = 500,
|
||||
die_speed = 50,
|
||||
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, 25, 0, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_livingcavesmobs then
|
||||
mobs:spawn({
|
||||
name = "livingcavesmobs:yeti",
|
||||
nodes = {"livingcaves:icecave_ice"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 2, -- 15000
|
||||
active_object_count = 1,
|
||||
min_height = -30,
|
||||
max_height = -5,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("livingcavesmobs:yeti", ("Yeti"), "ayeti.png")
|
||||
|
||||
mobs:register_arrow("livingcavesmobs:iceball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"livingcavesmobs_iceball.png"},
|
||||
velocity = 12,
|
||||
drop = true,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||