many worldgen mods and gonna try technic now
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 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.
|
||||
|
||||
|
||||
Lincense for original Code (mobs redo + mobs_animal + mob_horse + mobs_npc): (MIT) Copyright (c) 2014 Krupnov Pavel and 2016 TenPlus1
|
||||
|
||||
Modified Code by Liil/Wilhelmine/Skandarella (c) 2021
|
||||
Textures, Models and Animation by Liil/Wilhelmine/Skandarella under (MIT) License (c) 2021
|
||||
|
||||
Human Sounds by Liil/Wilhelmine/Skandarella. Animal Sounds + Environment are from freesound.org under Creative Commons License.
|
||||
Thanks to Roboroo, www-Bonson, Mixmasterdylan, Jarl Fenrir, Mafon2, Hamface, InspectorJ, Breviceps, Starcat 322 and Roman cgr!
|
||||
@@ -0,0 +1,67 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_node("nativevillages:sledge", {
|
||||
description = S"Sledge",
|
||||
visual_scale = 1,
|
||||
mesh = "Sledge.b3d",
|
||||
tiles = {"texturesledge.png"},
|
||||
inventory_image = "asledge.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -1.3, 0.5, 0.5, 1.3},
|
||||
--[[{-0.5, -0.5, -1.3, 0.5, 0.5, 1.3},
|
||||
{-0.5, -0.5, -1.3, 0.5, 0.5, 1.3}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -1.3, 0.5, 0.5, 1.3}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:bronzeblock",
|
||||
recipe = "nativevillages:sledge",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:blanket", {
|
||||
description = S"Blanket",
|
||||
visual_scale = 1,
|
||||
mesh = "Blanket.b3d",
|
||||
tiles = {"textureblanket.png"},
|
||||
inventory_image = "ablanket.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mobs:leather",
|
||||
recipe = "nativevillages:blanket",
|
||||
})
|
||||
@@ -0,0 +1,736 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
mobs:register_mob("nativevillages:icedog", {
|
||||
stepheight = 1,
|
||||
type = "animal",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 6,
|
||||
hp_min = 35,
|
||||
hp_max = 55,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Icedog.b3d",
|
||||
textures = {
|
||||
{"textureicedog.png"},
|
||||
{"textureicedog2.png"},
|
||||
{"textureicedog3.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_dog2",
|
||||
attack = "nativevillages_dog",
|
||||
damage = "nativevillages_dog4",
|
||||
death = "nativevillages_dog5",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
stay_near = {{"people:dogfoodsack", "mobs:meatblock"}, 5},
|
||||
follow = {"mobs:meat_raw", "people:dogfood", "people:dogfood_cooked"},
|
||||
view_range = 6,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 2,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 2,
|
||||
animation = {
|
||||
speed_normal = 80,
|
||||
stand_speed = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
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,
|
||||
},
|
||||
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_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:icedog",
|
||||
nodes = {"default:snowblock"},
|
||||
neighbors = {"nativevillages:sledge"},
|
||||
min_light = 14,
|
||||
interval = 60,
|
||||
chance = 8000, -- 15000
|
||||
active_object_count = 3,
|
||||
min_height = 1,
|
||||
max_height = 80,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:icedog", S("Ice Dog"), "aicedog.png")
|
||||
|
||||
|
||||
mobs:alias_mob("nativevillages:icedog", "nativevillages:icedog") -- compatibility
|
||||
|
||||
mobs.icesledgetrader_drops = {
|
||||
"nativevillages:sledgewithdog", "nativevillages:icedog"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:icesledgetrader", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 40,
|
||||
hp_max = 80,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Icesledgetrader.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"textureicesledgetrader.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_icevillagermale2",
|
||||
random = "nativevillages_icevillagermale",
|
||||
damage = "nativevillages_icevillagermale4",
|
||||
death = "nativevillages_icevillagermale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
stay_near = {{"nativevillages:sledge"}, 4},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 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.icesledgetrader_drops
|
||||
if item:get_name() == "default:steel_ingot" 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.icesledgetrader_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Trader dropped you an item for steel!"))
|
||||
|
||||
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("NPC stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("NPC will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:icesledgetrader",
|
||||
nodes = {"default:snowblock"},
|
||||
neighbors = {"nativevillages:sledge"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:icesledgetrader", S("Sledge Trader"), "aicesledgetrader.png")
|
||||
|
||||
mobs.icevillagerfemale_drops = {
|
||||
"mobs:meat", "mobs:leather", "wool:brown", "wool:white"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:icevillagerfemale", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 1,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Icevillagerfemale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"textureicevillagerfemale.png"},
|
||||
|
||||
},
|
||||
child_texture = {
|
||||
{"textureicevillagerfemalebaby.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_icevillagerfemale2",
|
||||
random = "nativevillages_icevillagerfemale",
|
||||
damage = "nativevillages_icevillagerfemale4",
|
||||
death = "nativevillages_icevillagerfemale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
stay_near = {{"nativevillages:blanket"}, 5},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.icevillagerfemale_drops
|
||||
if item:get_name() == "default:iron_lump" 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.icevillagerfemale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Icelander dropped you an item for iron!"))
|
||||
|
||||
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("Icelander stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, ("Icelander will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:icevillagerfemale",
|
||||
nodes = {"default:snowblock", "wool:brown"},
|
||||
neighbors = {"nativevillages:blanket"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:icevillagerfemale", S("Female Icelander"), "aicevillagerfemale.png")
|
||||
|
||||
mobs.icevillagermale_drops = {
|
||||
"mobs:meat", "mobs:leather", "wool:brown", "wool:white"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:icevillagermale", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 30,
|
||||
hp_max = 70,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Icevillagermale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"textureicevillagermale.png"},
|
||||
|
||||
},
|
||||
child_texture = {
|
||||
{"textureicevillagermalebaby.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_icevillagermale2",
|
||||
random = "nativevillages_icevillagermale",
|
||||
damage = "nativevillages_icevillagermale4",
|
||||
death = "nativevillages_icevillagermale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
stay_near = {{"nativevillages:blanket"}, 5},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.icevillagermale_drops
|
||||
if item:get_name() == "default:iron_lump" 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.icevillagermale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Icelander dropped you an item for iron!"))
|
||||
|
||||
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("Icelander stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Icelander will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:icevillagermale",
|
||||
nodes = {"default:snowblock", "wool:brown"},
|
||||
neighbors = {"nativevillages:blanket"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:icevillagermale", S("Male Icelander"), "aicevillagermale.png")
|
||||
|
||||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator and minetest.get_translator("nativevillages") or
|
||||
dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- 0.4.17 or 5.0 check
|
||||
local y_off = 20
|
||||
if minetest.features.object_independent_selectionbox then
|
||||
y_off = 10
|
||||
end
|
||||
|
||||
-- horse shoes (speed, jump, break, overlay texture)
|
||||
local shoes = {
|
||||
["people:horseshoe_steel"] = {7, 4, 2, "people_horseshoe_steelo.png"},
|
||||
["people:horseshoe_bronze"] = {7, 4, 4, "people_horseshoe_bronzeo.png"},
|
||||
["people:horseshoe_mese"] = {9, 5, 8, "people_horseshoe_meseo.png"},
|
||||
["people:horseshoe_diamond"] = {10, 6, 6, "people_horseshoe_diamondo.png"}
|
||||
}
|
||||
|
||||
-- rideable sledge
|
||||
mobs:register_mob("nativevillages:sledgewithdog", {
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
mesh = "Sledgewithdog.b3d",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
run_speed = 125,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 200,
|
||||
stand2_end = 300,
|
||||
walk_speed = 85,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
run_start = 100,
|
||||
run_end = 200,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
textures = {
|
||||
{"texturesledgewithdog.png"},
|
||||
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = true,
|
||||
fly = false,
|
||||
walk_chance = 0.1,
|
||||
walk_velocity = 1.5,
|
||||
view_range = 10,
|
||||
follow = {"mobs:meat_raw", "people:dogfood", "people:dogfood_cooked"},
|
||||
passive = true,
|
||||
hp_min = 100,
|
||||
hp_max = 250,
|
||||
armor = 100,
|
||||
lava_damage = 5,
|
||||
fall_damage = 5,
|
||||
water_damage = 1,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_dog2",
|
||||
attack = "nativevillages_dog",
|
||||
damage = "nativevillages_dog4",
|
||||
death = "nativevillages_dog5",
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2}
|
||||
},
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
-- set needed values if not already present
|
||||
if not self.v2 then
|
||||
self.v2 = 0
|
||||
self.max_speed_forward = 7
|
||||
self.max_speed_reverse = 2
|
||||
self.accel = 6
|
||||
self.terrain_type = 3
|
||||
self.driver_attach_at = {x = 0, y = 6, z = -17}
|
||||
self.driver_eye_offset = {x = 0, y = 5, z = -14}
|
||||
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
|
||||
|
||||
minetest.add_item(pos, "mobs:saddle")
|
||||
|
||||
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
|
||||
|
||||
self.saddle = nil
|
||||
end
|
||||
|
||||
-- drop any horseshoes added
|
||||
if self.shoed then
|
||||
minetest.add_item(pos, self.shoed)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
do_punch = function(self, hitter)
|
||||
|
||||
-- don't cut the branch you're... ah, that's not about that
|
||||
if hitter ~= self.driver then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- feed, tame or heal horse
|
||||
if mobs:feed_tame(self, clicker, 10, true, true) then
|
||||
return
|
||||
end
|
||||
|
||||
-- applying protection rune
|
||||
if mobs:protect(self, clicker) then
|
||||
return
|
||||
end
|
||||
|
||||
local player_name = clicker:get_player_name()
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == player_name then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
local tool = clicker:get_wielded_item()
|
||||
local item = tool:get_name()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||
|
||||
-- add saddle back to inventory
|
||||
if inv:room_for_item("main", "mobs:saddle") then
|
||||
inv:add_item("main", "mobs:saddle")
|
||||
else
|
||||
minetest.add_item(clicker:get_pos(), "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = nil
|
||||
|
||||
-- attach player to horse
|
||||
elseif (not self.driver and not self.child
|
||||
and clicker:get_wielded_item():get_name() == "mobs:saddle")
|
||||
or self.saddle then
|
||||
|
||||
self.object:set_properties({stepheight = 1.1})
|
||||
mobs.attach(self, clicker)
|
||||
|
||||
-- take saddle from inventory
|
||||
if not self.saddle then
|
||||
inv:remove_item("main", "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = true
|
||||
end
|
||||
|
||||
-- apply horseshoes
|
||||
if item:find("people:horseshoe") then
|
||||
|
||||
-- drop any existing shoes
|
||||
if self.shoed then
|
||||
minetest.add_item(self.object:get_pos(), self.shoed)
|
||||
end
|
||||
|
||||
local speed = shoes[item][1]
|
||||
local jump = shoes[item][2]
|
||||
local reverse = shoes[item][3]
|
||||
local overlay = shoes[item][4]
|
||||
|
||||
self.max_speed_forward = speed
|
||||
self.jump_height = jump
|
||||
self.max_speed_reverse = reverse
|
||||
self.accel = speed
|
||||
self.shoed = item
|
||||
|
||||
-- apply horseshoe overlay to current horse texture
|
||||
if overlay then
|
||||
self.texture_mods = "^" .. overlay
|
||||
self.object:set_texture_mod(self.texture_mods)
|
||||
end
|
||||
|
||||
-- show horse speed and jump stats with shoes fitted
|
||||
minetest.chat_send_player(player_name,
|
||||
S("Horse shoes fitted -")
|
||||
.. S(" speed: ") .. speed
|
||||
.. S(" , jump height: ") .. jump
|
||||
.. S(" , stop speed: ") .. reverse)
|
||||
|
||||
tool:take_item()
|
||||
|
||||
clicker:set_wielded_item(tool)
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- used to capture horse with magic lasso
|
||||
if mobs:capture_mob(self, clicker, 0, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:sledgewithdog", S("Sledge with Dog"), "asledwithdog.png")
|
||||
|
||||
@@ -0,0 +1,879 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
mobs:register_mob("nativevillages:tamecatfish", {
|
||||
stepheight = 1,
|
||||
type = "animal",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = true,
|
||||
reach = 2,
|
||||
damage = 1,
|
||||
hp_min = 5,
|
||||
hp_max = 55,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.5, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "Lakecatfish.b3d",
|
||||
textures = {
|
||||
{"texturecatfish1.png"},
|
||||
{"texturecatfish2.png"},
|
||||
{"texturecatfish3.png"},
|
||||
{"texturecatfish4.png"},
|
||||
{"texturecatfish5.png"},
|
||||
{"texturecatfish6.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
fly = true,
|
||||
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing",
|
||||
fall_speed = 0,
|
||||
jump = true,
|
||||
jump_height = 0,
|
||||
pushable = true,
|
||||
stay_near = {{"marinara:sand_with_alage", "marinara:sand_with_seagrass", "default:sand_with_kelp", "marinara:sand_with_kelp", "marinara:reed_root", "flowers:waterlily_waving", "naturalbiomes:waterlily", "default:clay"}, 5},
|
||||
follow = {
|
||||
"ethereal:worm", "seaweed", "fishing:bait_worm",
|
||||
"default:grass", "farming:cucumber", "farming:cabbage", "animalworld:ant", "animalworld:termite", "animalworld:fishfood", "animalworld:cockroach", "bees:frame_full", "animalworld:fishfood", "animalworld:ant", "animalworld:termite", "animalworld:bugice", "animalworld:termitequeen", "animalworld:notoptera", "animalworld:anteggs_raw", "group:grass", "group:normal_grass"
|
||||
},
|
||||
view_range = 6,
|
||||
drops = {
|
||||
{name = "nativevillages:catfish_raw", chance = 1, min = 1, max = 3},
|
||||
},
|
||||
water_damage = 0,
|
||||
air_damage = 1,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 2,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 200,
|
||||
stand_end = 300,
|
||||
fly_start = 0,
|
||||
fly_end = 100,
|
||||
fly2_start = 100,
|
||||
fly2_end = 200,
|
||||
die_start = 0,
|
||||
die_end = 100,
|
||||
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, 15, 25, 0, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:tamecatfish", S("Domesticated Catfish"), "alakecatfish.png")
|
||||
|
||||
|
||||
mobs:alias_mob("nativevillages:tamecatfish", "nativevillages:tamecatfish") -- compatibility
|
||||
|
||||
|
||||
-- raw catfish
|
||||
minetest.register_craftitem(":nativevillages:catfish_raw", {
|
||||
description = S("Raw Catfish"),
|
||||
inventory_image = "nativevillages_catfish_raw.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
groups = {food_meat_raw = 1, flammable = 2},
|
||||
})
|
||||
|
||||
-- cooked catfish
|
||||
minetest.register_craftitem(":nativevillages:catfish_cooked", {
|
||||
description = S("Cooked Catfish"),
|
||||
inventory_image = "nativevillages_catfish_cooked.png",
|
||||
on_use = minetest.item_eat(8),
|
||||
groups = {food_meat = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "nativevillages:catfish_cooked",
|
||||
recipe = "nativevillages:catfish_raw",
|
||||
cooktime = 2,
|
||||
})
|
||||
|
||||
|
||||
local S = mobs.intllib
|
||||
|
||||
mobs:register_mob("nativevillages:zombietame", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 5,
|
||||
hp_min = 55,
|
||||
hp_max = 95,
|
||||
armor = 100,
|
||||
attacks_monsters = true,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Zombie2.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturezombietame.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_tamedzombie2",
|
||||
random = "nativevillages_tamedzombie",
|
||||
damage = "nativevillages_tamedzombie3",
|
||||
death = "nativevillages_tamedzombie4",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
stay_near = {{"nativevillages:cannibalshrine", "nativevillages:driedpeople"}, 5},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {"nativevillages:driedhumanmeat"},
|
||||
view_range = 20,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 60,
|
||||
stand_speed = 50,
|
||||
stand_start = 300,
|
||||
stand_end = 400,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
walk2_start = 200,
|
||||
walk2_end = 300,
|
||||
punch_start = 0,
|
||||
punch_end = 100,
|
||||
die_start = 0,
|
||||
die_end = 100,
|
||||
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, 15, 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()
|
||||
|
||||
|
||||
|
||||
-- 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("Zombie stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Zombie will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:zombietame", S("Tamed Zombie"), "azombietame.png" )
|
||||
|
||||
mobs:register_mob("nativevillages:domesticcow", {
|
||||
type = "animal",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_npcs = false,
|
||||
group_attack = true,
|
||||
reach = 2,
|
||||
damage = 4,
|
||||
hp_min = 5,
|
||||
hp_max = 55,
|
||||
armor = 100,
|
||||
collisionbox = {-0.6, -0.01, -0.4, 0.6, 1.2, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "Grasslandcow.b3d",
|
||||
textures = {
|
||||
{"texturegrasslandcow.png"},
|
||||
{"texturegrasslandcow2.png"},
|
||||
{"texturegrasslandcow3.png"},
|
||||
{"texturegrasslandcow4.png"},
|
||||
{"texturegrasslandcow5.png"},
|
||||
{"texturegrasslandcow6.png"},
|
||||
{"texturegrasslandcow7.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_cow",
|
||||
attack = "nativevillages_cow2",
|
||||
damage = "nativevillages_cow3",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
jump = false,
|
||||
jump_height = 6,
|
||||
stay_near = {{"people:feeder", "marinara:reed_bundle", "naturalbiomes:reed_bundle", "farming:straw"}, 5},
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
pushable = true,
|
||||
knock_back = false,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
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 = {
|
||||
"farming:wheat", "default:grass_1", "farming:barley",
|
||||
"farming:oat", "farming:rye", "farming:carrot", "farming:beans", "farming:lettuce", "default:dry_grass_1", "default:dry_grass_2", "default:dry_grass_3", "default:grass_1", "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5", "default:marram_grass_1", "default:marram_grass_2", "default:marram_grass_3", "default:coldsteppe_grass_1", "default:coldsteppe_grass_2", "default:coldsteppe_grass_3", "default:coldsteppe_grass_4", "default:coldsteppe_grass_5", "default:coldsteppe_grass_6", "naturalbiomes:savanna_grass1", "naturalbiomes:savanna_grass2", "naturalbiomes:savanna_grass3", "naturalbiomes:outback_grass1", "naturalbiomes:outback_grass2", "naturalbiomes:outback_grass3", "naturalbiomes:outback_grass4", "naturalbiomes:outback_grass5", "naturalbiomes:outback_grass6", "naturalbiomes:med_grass1", "naturalbiomes:med_grass2", "naturalbiomes:heath_grass1", "naturalbiomes:heath_grass2", "naturalbiomes:heath_grass3", "naturalbiomes:alpine_grass1", "naturalbiomes:alpine_grass2", "naturalbiomes:heath_grass2", "naturalbiomes:heath_grass3", "naturalbiomes:", "naturalbiomes:", "naturalbiomes:bushland_grass", "naturalbiomes:bushland_grass2", "naturalbiomes:bushland_grass3", "naturalbiomes:bushland_grass4", "naturalbiomes:bushland_grass5", "naturalbiomes:bushland_grass6", "naturalbiomes:bushland_grass7", "group:grass", "group:normal_grass"
|
||||
},
|
||||
view_range = 8,
|
||||
replace_rate = 10,
|
||||
replace_what = {
|
||||
{"group:grass", "air", 0},
|
||||
{"default:dirt_with_grass", "default:dirt", -1}
|
||||
},
|
||||
-- stay_near = {"farming:straw", "group:grass"}, 10},
|
||||
fear_height = 2,
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||
|
||||
-- if fed 7x wheat or grass then cow can be milked again
|
||||
if self.food and self.food > 6 then
|
||||
self.gotten = false
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 0, 0, 25, false, nil) then return end
|
||||
|
||||
local tool = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- milk cow with empty bucket
|
||||
if tool:get_name() == "bucket:bucket_empty" then
|
||||
|
||||
--if self.gotten == true
|
||||
if self.child == true then
|
||||
return
|
||||
end
|
||||
|
||||
if self.gotten == true then
|
||||
minetest.chat_send_player(name,
|
||||
S("Cow already milked!"))
|
||||
return
|
||||
end
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
|
||||
tool:take_item()
|
||||
clicker:set_wielded_item(tool)
|
||||
|
||||
if inv:room_for_item("main", {name = "nativevillages:bucket_milk"}) then
|
||||
clicker:get_inventory():add_item("main", "nativevillages:bucket_milk")
|
||||
else
|
||||
local pos = self.object:get_pos()
|
||||
pos.y = pos.y + 0.5
|
||||
minetest.add_item(pos, {name = "nativevillages:bucket_milk"})
|
||||
end
|
||||
|
||||
self.gotten = true -- milked
|
||||
|
||||
return
|
||||
end
|
||||
end,
|
||||
|
||||
on_replace = function(self, pos, oldnode, newnode)
|
||||
|
||||
self.food = (self.food or 0) + 1
|
||||
|
||||
-- if cow replaces 8x grass then it can be milked again
|
||||
if self.food >= 8 then
|
||||
self.food = 0
|
||||
self.gotten = false
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:domesticcow", S("Domesticated Cow"), "agrasslandcow.png")
|
||||
|
||||
|
||||
mobs:alias_mob("nativevillages:domesticcow", "nativevillages:domesticcow") -- compatibility
|
||||
|
||||
|
||||
-- bucket of milk
|
||||
minetest.register_craftitem(":nativevillages:bucket_milk", {
|
||||
description = S("Bucket of Milk"),
|
||||
inventory_image = "nativevillages_bucket_milk.png",
|
||||
stack_max = 1,
|
||||
on_use = minetest.item_eat(8, "bucket:bucket_empty"),
|
||||
groups = {food_milk = 1, flammable = 3, drink = 1},
|
||||
})
|
||||
|
||||
-- glass of milk
|
||||
minetest.register_craftitem(":mobs:glass_milk", {
|
||||
description = S("Glass of Milk"),
|
||||
inventory_image = "mobs_glass_milk.png",
|
||||
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
||||
groups = {food_milk_glass = 1, flammable = 3, vessel = 1, drink = 1},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mobs:glass_milk 4",
|
||||
recipe = {
|
||||
"vessels:drinking_glass", "vessels:drinking_glass",
|
||||
"vessels:drinking_glass", "vessels:drinking_glass",
|
||||
"nativevillages:bucket_milk"
|
||||
},
|
||||
replacements = { {"nativevillages:bucket_milk", "bucket:bucket_empty"} }
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "nativevillages:bucket_milk",
|
||||
recipe = {
|
||||
"group:food_milk_glass", "group:food_milk_glass",
|
||||
"group:food_milk_glass", "group:food_milk_glass",
|
||||
"bucket:bucket_empty"
|
||||
},
|
||||
replacements = {
|
||||
{"group:food_milk_glass", "vessels:drinking_glass 4"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- butter
|
||||
minetest.register_craftitem(":nativevillages:butter", {
|
||||
description = S("Butter"),
|
||||
inventory_image = "nativevillages_butter.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = {food_butter = 1, flammable = 2},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("farming") and farming and farming.mod then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "nativevillages:butter",
|
||||
recipe = {"nativevillages:bucket_milk", "farming:salt"},
|
||||
replacements = {{ "nativevillages:bucket_milk", "bucket:bucket_empty"}}
|
||||
})
|
||||
else -- some saplings are high in sodium so makes a good replacement item
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "nativevillages:butter",
|
||||
recipe = {"nativevillages:bucket_milk", "default:sapling"},
|
||||
replacements = {{ "nativevillages:bucket_milk", "bucket:bucket_empty"}}
|
||||
})
|
||||
end
|
||||
|
||||
-- cheese wedge
|
||||
minetest.register_craftitem(":nativevillages:cheese", {
|
||||
description = S("Mozzarella Cheese"),
|
||||
inventory_image = "nativevillages_cheese.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
groups = {food_cheese = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "nativevillages:cheese",
|
||||
recipe = "nativevillages:bucket_milk",
|
||||
cooktime = 5,
|
||||
replacements = {{ "nativevillages:bucket_milk", "bucket:bucket_empty"}}
|
||||
})
|
||||
|
||||
-- cheese block
|
||||
minetest.register_node(":nativevillages:cheeseblock", {
|
||||
description = S("Mozzarella Cheese Block"),
|
||||
tiles = {"nativevillages_cheeseblock.png"},
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 3},
|
||||
sounds = default.node_sound_dirt_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "nativevillages:cheeseblock",
|
||||
recipe = {
|
||||
{"nativevillages:cheese", "nativevillages:cheese", "nativevillages:cheese"},
|
||||
{"nativevillages:cheese", "nativevillages:cheese", "nativevillages:cheese"},
|
||||
{"nativevillages:cheese", "nativevillages:cheese", "nativevillages:cheese"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "nativevillages:cheese 9",
|
||||
recipe = {
|
||||
{"nativevillages:cheeseblock"},
|
||||
}
|
||||
})
|
||||
|
||||
mobs:register_mob("nativevillages:desertchickentame", {
|
||||
stepheight = 1,
|
||||
type = "animal",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
group_attack = false,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 1,
|
||||
hp_min = 10,
|
||||
hp_max = 25,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, -0.01, -0.3, 0.4, 0.8, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "Desertchicken.b3d",
|
||||
textures = {
|
||||
{"texturedesertchicken.png"},
|
||||
{"texturedesertchicken2.png"},
|
||||
{"texturedesertchicken3.png"},
|
||||
{"texturedesertchicken4.png"},
|
||||
|
||||
},
|
||||
child_texture = {
|
||||
{"texturedesertchickenbaby.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_chicken",
|
||||
damage = "nativevillages_chicken2",
|
||||
death = "nativevillages_chicken3",
|
||||
},
|
||||
walk_velocity = 0.5,
|
||||
run_velocity = 3,
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion"},
|
||||
drops = {
|
||||
{name = "nativevillages:chicken_raw", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
stay_near = {{"people:feeder", "marinara:reed_bundle", "naturalbiomes:reed_bundle", "farming:straw"}, 5},
|
||||
water_damage = 1,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
follow = {
|
||||
"farming:seed_wheat", "farming:seed_cotton", "farming:seed_barley",
|
||||
"farming:seed_oat", "farming:seed_rye", "animalworld:cockroach", "bees:frame_full", "animalworld:fishfood", "animalworld:ant", "animalworld:termite", "animalworld:bugice", "animalworld:termitequeen", "animalworld:notoptera", "animalworld:anteggs_raw", "farming:corn_cob", "farming:seed_hemp", "farming:seed_barley", "farming:seed_oat", "farming:seed_cotton", "farming:seed_sunflower", "farming:seed_wheat", "farming:seed_rye", "naturalbiomes:coconut_slice", "naturalbiomes:hazelnut_cracked", "farming:sunflower_seeds_toasted", "livingfloatlands:roasted_pine_nuts", "livingfloatlands:coldsteppe_pine3_pinecone", "livingfloatlands:coldsteppe_pine_pinecone", "livingfloatlands:coldsteppe_pine2_pinecone"
|
||||
},
|
||||
view_range = 10,
|
||||
|
||||
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,
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
self.egg_timer = (self.egg_timer or 0) + dtime
|
||||
if self.egg_timer < 10 then
|
||||
return
|
||||
end
|
||||
self.egg_timer = 0
|
||||
|
||||
if self.child
|
||||
or math.random(1, 100) > 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
minetest.add_item(pos, "mobs:egg")
|
||||
|
||||
minetest.sound_play("default_place_node_hard", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:desertchickentame", S("Domesticated Desert Chicken"), "adesertchicken.png", 0)
|
||||
|
||||
local S = mobs.intllib
|
||||
|
||||
mobs:register_mob("nativevillages:maleliontame", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
attack_monsters = true,
|
||||
reach = 2,
|
||||
damage = 10,
|
||||
hp_min = 45,
|
||||
hp_max = 115,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Lionmale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturelionmale.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_lion2",
|
||||
random = "nativevillages_lion",
|
||||
damage = "nativevillages_lion4",
|
||||
death = "nativevillages_lion3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
stepheight = 2,
|
||||
fear_height = 3,
|
||||
stay_near = {{"nativevillages:savannacorpse", "mobs:meatblock"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {
|
||||
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
|
||||
"mobs:meat_raw", "animalworld:rabbit_raw", "animalworld:pork_raw", "water_life:meat_raw", "animalworld:chicken_raw", "nativevillages:chicken_raw", "mobs:meatblock_raw", "animalworld:chicken_raw", "livingfloatlands:ornithischiaraw", "livingfloatlands:largemammalraw", "livingfloatlands:theropodraw", "livingfloatlands:sauropodraw", "animalworld:raw_athropod", "animalworld:whalemeat_raw", "animalworld:rabbit_raw", "nativevillages:chicken_raw", "mobs:meat_raw", "animalworld:pork_raw", "people:mutton:raw"
|
||||
},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
die_start = 300,
|
||||
die_end = 400,
|
||||
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, 0, 15, 25, 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()
|
||||
|
||||
|
||||
|
||||
-- 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("Lion stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Lion will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:maleliontame", S("Tamed Male Lion"), "amalelion.png" )
|
||||
|
||||
local S = mobs.intllib
|
||||
|
||||
mobs:register_mob("nativevillages:femaleliontame", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
attack_monsters = true,
|
||||
reach = 2,
|
||||
damage = 7,
|
||||
hp_min = 45,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Lionfemale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturelionfemale.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_lion2",
|
||||
random = "nativevillages_lion",
|
||||
damage = "nativevillages_lion4",
|
||||
death = "nativevillages_lion3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
stay_near = {{"nativevillages:savannacorpse", "mobs:meatblock"}, 5},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
stepheight = 2,
|
||||
fear_height = 3,
|
||||
follow = {
|
||||
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
|
||||
"mobs:meat_raw", "animalworld:rabbit_raw", "animalworld:pork_raw", "water_life:meat_raw", "animalworld:chicken_raw", "nativevillages:chicken_raw", "mobs:meatblock_raw", "animalworld:chicken_raw", "livingfloatlands:ornithischiaraw", "livingfloatlands:largemammalraw", "livingfloatlands:theropodraw", "livingfloatlands:sauropodraw", "animalworld:raw_athropod", "animalworld:whalemeat_raw", "animalworld:rabbit_raw", "nativevillages:chicken_raw", "mobs:meat_raw", "animalworld:pork_raw", "people:mutton:raw"
|
||||
},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
die_start = 300,
|
||||
die_end = 400,
|
||||
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, 0, 15, 25, 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()
|
||||
|
||||
|
||||
|
||||
-- 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("Lion stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Lion will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:femaleliontame", S("Tamed Female Lion"), "afemalelion.png" )
|
||||
|
||||
mobs:register_mob("nativevillages:grasslandcat", {
|
||||
stay_near = {"singleplayer", 10},
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
mesh = "Grasslandcat.b3d",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.5, 0.4},
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_speed = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_speed = 50,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
stand3_speed = 50,
|
||||
stand3_start = 200,
|
||||
stand3_end = 300,
|
||||
stand4_speed = 50,
|
||||
stand4_start = 0,
|
||||
stand4_end = 100,
|
||||
stand5_speed = 50,
|
||||
stand5_start = 200,
|
||||
stand5_end = 300,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_start = 400,
|
||||
punch_end = 500,
|
||||
die_start = 400,
|
||||
die_end = 500,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
textures = {
|
||||
{"texturegrasslandcat.png"},
|
||||
{"texturegrasslandcat2.png"},
|
||||
{"texturegrasslandcat3.png"},
|
||||
{"texturegrasslandcat4.png"},
|
||||
{"texturegrasslandcat5.png"},
|
||||
},
|
||||
fear_height = 5,
|
||||
stepheight = 2,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
jump_height = 8,
|
||||
stay_near = {{"people:villagerbed", "mobs:meatblock", "animalworld:blackbirdpillow", "animalworld:hyenapillow", "animalworld:monitorstool", "animalworld:owltrophy", "animalworld:vulturepillow", "animalworld:snowleopardpillow", "animalworld:tigerpillow", "animalworld:tigerstool", "chair"}, 5},
|
||||
fly = false,
|
||||
walk_velocity = 2,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
view_range = 12,
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
damage = 4,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npcs = false,
|
||||
pathfinding = true,
|
||||
group_attack = true,
|
||||
hp_min = 25,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
knock_back = 2,
|
||||
lava_damage = 5,
|
||||
fall_damage = 1,
|
||||
water_damage = 1,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_cat",
|
||||
random = "nativevillages_cat2",
|
||||
damage = "nativevillages_cat3",
|
||||
death = "nativevillages_cat4",
|
||||
distance = 10,
|
||||
},
|
||||
follow = {"ethereal:fish_raw", "animalworld: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", "nativevillages:chicken_raw", "nativevillages:chicken_cooked", "nativevillages:catfish_raw", "nativevillages:catfish_cooked", "fishing:fish_cooked", "marinaramobs:cooked_exotic_fish", "animalworld:cookedfish", "marinara:mussels", "nativevillages:catfish_cooked", "fishing:pike_cooked", "animalworld:cooked_athropod", "livingfloatlands:theropodcooked", "mobs:meatblock", "animalworld:whelaemeat_cooked", "animalworld:rat_cooked", "mobs:meat", "animalworld:chicken_cooked", "livingfloatlands:sauropodcooked", "livingfloatlands:ornithischiacooked", "nativevillages:driedhumanmeat", "livingfloatlands:largemammalcooked", "pie:meat"},
|
||||
on_rightclick = function(self, clicker)
|
||||
if mobs:feed_tame(self, clicker, 6, 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
|
||||
|
||||
if clicker:get_wielded_item():is_empty() and clicker:get_player_name() == self.owner then
|
||||
if clicker:get_player_control().sneak then
|
||||
self.order = ""
|
||||
self.state = "walk"
|
||||
self.walk_velocity = 2
|
||||
self.stepheight = 2
|
||||
else
|
||||
if self.order == "follow" then
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self.walk_velocity = 2
|
||||
self.stepheight = 2
|
||||
else
|
||||
self.order = "follow"
|
||||
self.state = "walk"
|
||||
self.walk_velocity = 3
|
||||
self.stepheight = 2
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
mobs:register_egg("nativevillages:grasslandcat", S"Cat", "agrasslandcat.png")
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_node("nativevillages:driedpeople", {
|
||||
description = S"Dried Human Remains",
|
||||
tiles = {
|
||||
"nativevillages_driedpeople_top.png",
|
||||
"nativevillages_driedpeople_bottom.png",
|
||||
"nativevillages_driedpeople_right.png",
|
||||
"nativevillages_driedpeople_left.png",
|
||||
"nativevillages_driedpeople_back.png",
|
||||
"nativevillages_driedpeople_front.png"
|
||||
},
|
||||
groups = {crumbly = 3},
|
||||
drop = "nativevillages:driedhumanmeat 9",
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "nativevillages:driedpeople",
|
||||
recipe = {
|
||||
{"nativevillages:driedhumanmeat", "nativevillages:driedhumanmeat", "nativevillages:driedhumanmeat"},
|
||||
{"nativevillages:driedhumanmeat", "nativevillages:driedhumanmeat", "nativevillages:driedhumanmeat"},
|
||||
{"nativevillages:driedhumanmeat", "nativevillages:driedhumanmeat", "nativevillages:driedhumanmeat"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem(":nativevillages:driedhumanmeat", {
|
||||
description = S("Dried Human Meat"),
|
||||
inventory_image = "nativevillages_driedhumanmeat.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {mushroom = 1, snappy = 3, attached_node = 1, flammable = 1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("nativevillages:cannibalshrine", {
|
||||
description = S"Cannibal Shrine",
|
||||
visual_scale = 1,
|
||||
mesh = "Cannibalshrine.b3d",
|
||||
tiles = {"texturecannibalshrine.png"},
|
||||
inventory_image = "acannibalshrine.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
walkable = false,
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:bronzeblock",
|
||||
recipe = "nativevillages:cannibalshrine",
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
mobs
|
||||
default
|
||||
people
|
||||
farming
|
||||
bucket
|
||||
animalworld?
|
||||
ethereal?
|
||||
xocean?
|
||||
fishing?
|
||||
hunger_ng?
|
||||
@@ -0,0 +1 @@
|
||||
Adds villages of native people to the world.
|
||||
@@ -0,0 +1,134 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_node("nativevillages:hookah", {
|
||||
description = S"Hookah",
|
||||
visual_scale = 1,
|
||||
mesh = "Hookah.b3d",
|
||||
tiles = {"texturehookah.png"},
|
||||
inventory_image = "ahookah.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2},
|
||||
--[[{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2},
|
||||
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:bronzeblock",
|
||||
recipe = "nativevillages:hookah",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:desertcrpet", {
|
||||
description = S"Desert Carpet",
|
||||
visual_scale = 1,
|
||||
mesh = "Desertcarpet.b3d",
|
||||
tiles = {"texturedesertcarpet.png"},
|
||||
inventory_image = "adesertcarpet.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "wool:red",
|
||||
recipe = "nativevillages:desertcarpet",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:desertcage", {
|
||||
description = S"Slave Bracelet",
|
||||
visual_scale = 1,
|
||||
mesh = "Desertcage.b3d",
|
||||
tiles = {"texturedesertcage.png"},
|
||||
inventory_image = "adesertcage.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
walkable = false,
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:steelblock",
|
||||
recipe = "nativevillages:desertcage",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:desertseeds", {
|
||||
description = S"Desert Seeds",
|
||||
visual_scale = 1,
|
||||
mesh = "Desertseeds.b3d",
|
||||
tiles = {"texturedesertseeds.png"},
|
||||
inventory_image = "adesertseeds.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "farming:bread",
|
||||
recipe = "nativevillages:deserseeds",
|
||||
})
|
||||
@@ -0,0 +1,121 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:deserthouse1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"desert"},
|
||||
y_max = 30.5,
|
||||
y_min = 25.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/deserthouse1_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:deserthouse2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"desert"},
|
||||
y_max = 30.5,
|
||||
y_min = 25.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/deserthouse2_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:deserthouse3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"desert"},
|
||||
y_max = 30.5,
|
||||
y_min = 25.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/deserthouse3_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:deserthouse4",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"desert"},
|
||||
y_max = 30.5,
|
||||
y_min = 25.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/deserthouse4_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:deserthouse5",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"desert"},
|
||||
y_max = 30.5,
|
||||
y_min = 25.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/deserthouse5_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:desertwell",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00004,
|
||||
biomes = {"desert"},
|
||||
y_max = 30.5,
|
||||
y_min = 25.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/desertwell_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:desertmarket",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00008,
|
||||
biomes = {"desert"},
|
||||
y_max = 30.5,
|
||||
y_min = 25.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/desertmarket_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:desertstable",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00004,
|
||||
biomes = {"desert"},
|
||||
y_max = 30.5,
|
||||
y_min = 25.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/deserstable_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -0,0 +1,878 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
mobs.desertvillagermale_drops = {
|
||||
"farming:salt"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:desertvillagermale", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 2,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = false,
|
||||
attack_npcs = true,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Desertvillagermale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturedesertvillagermale.png"},
|
||||
{"texturedesertvillagermale2.png"},
|
||||
{"texturedesertvillagermale3.png"},
|
||||
{"texturedesertvillagermale4.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_desertmale2",
|
||||
random = "nativevillages_desertmale",
|
||||
damage = "nativevillages_desertmale4",
|
||||
death = "nativevillages_desertmaledesertmale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
stay_near = {{"nativevillages:hookah", "nativevillages:desertcrpet"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.desertvillagermale_drops
|
||||
if item:get_name() == "default:stick" 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.desertvillagermale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Desert Villager dropped you an item for a stick!"))
|
||||
|
||||
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("Desert Villager stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Desert Villager will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:desertvillagermale",
|
||||
nodes = {"default:desert_sand", "group:wool"},
|
||||
neighbors = {"nativevillages:desertcrpet"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:desertvillagermale", S("Male Desert Villager"), "adesertvillagermale.png")
|
||||
|
||||
mobs.desertvillagerfemale_drops = {
|
||||
"farming:salt"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:desertvillagerfemale", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 1,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = false,
|
||||
attack_npcs = true,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 20,
|
||||
hp_max = 40,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Desertvillagerfemale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturedesertvillagerfemale.png"},
|
||||
{"texturedesertvillagerfemale2.png"},
|
||||
{"texturedesertvillagerfemale3.png"},
|
||||
{"texturedesertvillagerfemale4.png"},
|
||||
{"texturedesertvillagerfemale5.png"},
|
||||
{"texturedesertvillagerfemale6.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_desertfemale2",
|
||||
random = "nativevillages_desertfemale",
|
||||
damage = "nativevillages_desertfemale4",
|
||||
death = "nativevillages_desertfemale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
stay_near = {{"nativevillages:hookah", "nativevillages:desertcrpet"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.desertvillagerfemale_drops
|
||||
if item:get_name() == "default:stick" 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.desertvillagerfemale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Desert Villager dropped you an item for a stick!"))
|
||||
|
||||
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("Desert Villager stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Desert will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:desertvillagerfemale",
|
||||
nodes = {"default:desert_sand", "group:wool"},
|
||||
neighbors = {"nativevillages:desertcrpet"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:desertvillagerfemale", S("Female Desert Villager"), "adesertvillagerfemale.png")
|
||||
|
||||
mobs.desertslavetrader_drops = {
|
||||
"nativevillages:slavechickenbreeder", "nativevillages:slavecowherder", "nativevillages:slaveliontrainer",
|
||||
"nativevillages:slavefemaledancer", "nativevillages:slaveloyalcannibal", "nativevillages:slavemaledancer"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:desertslavetrader", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Desertslavetrader.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturedesertslavetrader.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_desertmale2",
|
||||
random = "nativevillages_desertmale",
|
||||
damage = "nativevillages_desertmale4",
|
||||
death = "nativevillages_desertmale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
stay_near = {{"nativevillages:desertcage"}, 4},
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 75,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.desertslavetrader_drops
|
||||
if item:get_name() == "default:gold_ingot" 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.desertslavetrader_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Slave delivered!"))
|
||||
|
||||
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("Slavetrader stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Slavetrader will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:desertslavetrader",
|
||||
nodes = {"default:desert_sand", "group:wool"},
|
||||
neighbors = {"nativevillages:desertcage"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:desertslavetrader", S("Slave Trader"), "adesertslavetrader.png")
|
||||
|
||||
mobs:register_mob("nativevillages:desertranger", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 7,
|
||||
raeach = 4,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = false,
|
||||
attack_npcs = true,
|
||||
attack_player = true,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 50,
|
||||
hp_max = 85,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Desertranger.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturedesertranger.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_desertmale2",
|
||||
random = "nativevillages_desertmale",
|
||||
damage = "nativevillages_desertmale4",
|
||||
death = "nativevillages_desertmaledesertmale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 2,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "default:apple", chance = 2, min = 1, max = 2},
|
||||
{name = "default:sword_stone", chance = 5, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
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, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:desertranger",
|
||||
nodes = {"default:desert_sand", "group:wool"},
|
||||
neighbors = {"nativevillages:hookah"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:desertranger", S("Desert Ranger"), "adesertranger.png")
|
||||
|
||||
|
||||
mobs:register_mob("nativevillages:desertraider", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 7,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = false,
|
||||
attack_npcs = true,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 50,
|
||||
hp_max = 100,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Desertraider.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturedesertraider.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_desertmale2",
|
||||
random = "nativevillages_desertmale",
|
||||
damage = "nativevillages_desertmale4",
|
||||
death = "nativevillages_desertmale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "default:apple", chance = 2, min = 1, max = 2},
|
||||
{name = "default:sword_stone", chance = 5, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
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, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:desertraider",
|
||||
nodes = {"default:desert_sand", "group:wool"},
|
||||
neighbors = {"nativevillages:hookah"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:desertraider", S("Desert Raider"), "adesertraider.png")
|
||||
|
||||
mobs:register_mob("nativevillages:desertchicken", {
|
||||
stepheight = 1,
|
||||
type = "animal",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 3,
|
||||
hp_min = 10,
|
||||
hp_max = 20,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, -0.01, -0.3, 0.4, 0.8, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "Desertchicken.b3d",
|
||||
textures = {
|
||||
{"texturedesertchicken.png"},
|
||||
|
||||
},
|
||||
child_texture = {
|
||||
{"texturedesertchickenbaby.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_chicken",
|
||||
damage = "nativevillages_chicken2",
|
||||
death = "nativevillages_chicken3",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
stay_near = {{"nativevillages:desertseeds"}, 4},
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion"},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
follow = {},
|
||||
view_range = 10,
|
||||
|
||||
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,
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
self.egg_timer = (self.egg_timer or 0) + dtime
|
||||
if self.egg_timer < 10 then
|
||||
return
|
||||
end
|
||||
self.egg_timer = 0
|
||||
|
||||
if self.child
|
||||
or math.random(1, 100) > 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
minetest.add_item(pos, "mobs:egg")
|
||||
|
||||
minetest.sound_play("default_place_node_hard", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:desertchicken",
|
||||
nodes = {"default:clay", "default:desert_sand"},
|
||||
neighbors = {"nativevillages:desertseeds"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 1, -- 15000
|
||||
active_object_count = 3,
|
||||
min_height = 0,
|
||||
max_height = 100,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:desertchicken", S("Desert Chicken"), "adesertchicken.png", 0)
|
||||
|
||||
|
||||
|
||||
|
||||
-- egg entity
|
||||
|
||||
mobs:register_arrow("nativevillages:egg_entity", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"mobs_chicken_egg.png"},
|
||||
velocity = 6,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 1},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 1},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
|
||||
if math.random(1, 10) > 1 then
|
||||
return
|
||||
end
|
||||
|
||||
pos.y = pos.y + 1
|
||||
|
||||
local nod = minetest.get_node_or_nil(pos)
|
||||
|
||||
if not nod
|
||||
or not minetest.registered_nodes[nod.name]
|
||||
or minetest.registered_nodes[nod.name].walkable == true then
|
||||
return
|
||||
end
|
||||
|
||||
local mob = minetest.add_entity(pos, "nativevillages:desertchicken")
|
||||
local ent2 = mob:get_luaentity()
|
||||
|
||||
mob:set_properties({
|
||||
textures = ent2.child_texture[1],
|
||||
visual_size = {
|
||||
x = ent2.base_size.x / 2,
|
||||
y = ent2.base_size.y / 2
|
||||
},
|
||||
collisionbox = {
|
||||
ent2.base_colbox[1] / 2,
|
||||
ent2.base_colbox[2] / 2,
|
||||
ent2.base_colbox[3] / 2,
|
||||
ent2.base_colbox[4] / 2,
|
||||
ent2.base_colbox[5] / 2,
|
||||
ent2.base_colbox[6] / 2
|
||||
},
|
||||
})
|
||||
|
||||
ent2.child = true
|
||||
ent2.tamed = true
|
||||
ent2.owner = self.playername
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
-- egg throwing item
|
||||
|
||||
local egg_GRAVITY = 9
|
||||
local egg_VELOCITY = 19
|
||||
|
||||
-- shoot egg
|
||||
local mobs_shoot_egg = function (item, player, pointed_thing)
|
||||
|
||||
local playerpos = player:get_pos()
|
||||
|
||||
minetest.sound_play("default_place_node_hard", {
|
||||
pos = playerpos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5,
|
||||
})
|
||||
|
||||
local obj = minetest.add_entity({
|
||||
x = playerpos.x,
|
||||
y = playerpos.y +1.5,
|
||||
z = playerpos.z
|
||||
}, "nativevillages:egg_entity")
|
||||
|
||||
local ent = obj:get_luaentity()
|
||||
local dir = player:get_look_dir()
|
||||
|
||||
ent.velocity = egg_VELOCITY -- needed for api internal timing
|
||||
ent.switch = 1 -- needed so that egg doesn't despawn straight away
|
||||
|
||||
obj:setvelocity({
|
||||
x = dir.x * egg_VELOCITY,
|
||||
y = dir.y * egg_VELOCITY,
|
||||
z = dir.z * egg_VELOCITY
|
||||
})
|
||||
|
||||
obj:setacceleration({
|
||||
x = dir.x * -3,
|
||||
y = -egg_GRAVITY,
|
||||
z = dir.z * -3
|
||||
})
|
||||
|
||||
-- pass player name to egg for chick ownership
|
||||
local ent2 = obj:get_luaentity()
|
||||
ent2.playername = player:get_player_name()
|
||||
|
||||
item:take_item()
|
||||
|
||||
return item
|
||||
end
|
||||
|
||||
|
||||
-- egg
|
||||
minetest.register_node(":nativevillages:egg", {
|
||||
description = S("Bird Egg"),
|
||||
tiles = {"mobs_chicken_egg.png"},
|
||||
inventory_image = "mobs_chicken_egg.png",
|
||||
visual_scale = 0.7,
|
||||
drawtype = "plantlike",
|
||||
wield_image = "mobs_chicken_egg.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
sunlight_propagates = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
||||
},
|
||||
groups = {food_egg = 1, snappy = 2, dig_immediate = 3},
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "nativevillages:egg", param2 = 1})
|
||||
end
|
||||
end,
|
||||
on_use = mobs_shoot_egg
|
||||
})
|
||||
|
||||
|
||||
-- fried egg
|
||||
minetest.register_craftitem(":nativevillages:chicken_egg_fried", {
|
||||
description = S("Fried Desert Chicken Egg"),
|
||||
inventory_image = "nativevillages_chicken_egg_fried.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {food_egg_fried = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
recipe = "nativevillages:egg",
|
||||
output = "nativevillages:chicken_egg_fried",
|
||||
})
|
||||
|
||||
-- raw chicken
|
||||
minetest.register_craftitem(":nativevillages:chicken_raw", {
|
||||
description = S("Raw Desert Chicken meat"),
|
||||
inventory_image = "nativevillages_chicken_raw.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {food_meat_raw = 1, food_chicken_raw = 1, flammable = 2},
|
||||
})
|
||||
|
||||
-- cooked chicken
|
||||
minetest.register_craftitem(":nativevillages:chicken_cooked", {
|
||||
description = S("Cooked Desert Chicken"),
|
||||
inventory_image = "nativevillages_chicken_cooked.png",
|
||||
on_use = minetest.item_eat(6),
|
||||
groups = {food_meat = 1, food_chicken = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
recipe = "nativevillages:chicken_raw",
|
||||
output = "nativevillages:chicken_cooked",
|
||||
})
|
||||
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
mobs:register_mob("nativevillages:toad", {
|
||||
stepheight = 3,
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "explode",
|
||||
explosion_radius = 1,
|
||||
explosion_damage__radius = 3,
|
||||
explosion_timer = 4,
|
||||
attack_npcs = false,
|
||||
attack_animals = false,
|
||||
reach = 3,
|
||||
damage = 18,
|
||||
hp_min = 15,
|
||||
hp_max = 30,
|
||||
armor = 100,
|
||||
collisionbox = {-0.268, -0.01, -0.268, 0.268, 0.25, 0.268},
|
||||
visual = "mesh",
|
||||
mesh = "Toad.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturetoad.png"},
|
||||
|
||||
},
|
||||
sounds = {
|
||||
random = "",},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2,
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion"},
|
||||
jump = true,
|
||||
jump_height = 6,
|
||||
sounds = {
|
||||
attack = "nativevillages_toad",
|
||||
random = "nativevillages_toad2",
|
||||
damage = "nativevillages_toad",
|
||||
death = "nativevillages_toad",
|
||||
distance = 10,
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fear_height = 6,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 1,
|
||||
stand_end = 100,
|
||||
walk_speed = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
fly_start = 300, -- swim animation
|
||||
fly_end = 400,
|
||||
},
|
||||
fly_in = {"default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing"},
|
||||
floats = 0,
|
||||
follow = {"fishing:bait:worm", "ethereal:worm", "animalworld:ant", "animalworld:termite"},
|
||||
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 minetest.get_modpath("ethereal") then
|
||||
spawn_on = "ethereal:prairie_dirt", "default:dirt_with_grass", "ethereal:green_dirt"
|
||||
end
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:toad",
|
||||
nodes = {"default:dirt_with_grass"}, {"default:dirt_with_rainforest_litter"}, {"default:dry_dirt_with_dry_grass"},
|
||||
neighbors = {"group:grass", "group:normal_grass"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 2000, -- 15000
|
||||
active_object_count = 1,
|
||||
min_height = 1,
|
||||
max_height = 15,
|
||||
day_toogle = false
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:toad", S("Toad"), "atoad.png", 0)
|
||||
|
||||
|
||||
mobs:alias_mob("nativevillages:toad", "nativevillages:toad") -- compatibility
|
||||
|
||||
|
||||
mobs:register_mob("nativevillages:toadtamed", {
|
||||
stepheight = 3,
|
||||
type = "NPC",
|
||||
passive = false,
|
||||
attack_type = "explode",
|
||||
explosion_radius = 1,
|
||||
explosion_damage__radius = 3,
|
||||
explosion_timer = 4,
|
||||
attack_npcs = false,
|
||||
attack_animals = false,
|
||||
attack_monsters = true,
|
||||
reach = 3,
|
||||
damage = 550,
|
||||
hp_min = 25,
|
||||
hp_max = 50,
|
||||
armor = 100,
|
||||
collisionbox = {-0.268, -0.01, -0.268, 0.268, 0.25, 0.268},
|
||||
visual = "mesh",
|
||||
mesh = "Toad.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturetoad.png"},
|
||||
|
||||
},
|
||||
sounds = {
|
||||
random = "",},
|
||||
makes_footstep_sound = true,
|
||||
owner_loyal = true,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
pathfinding = true,
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2,
|
||||
runaway = false,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion"},
|
||||
jump = true,
|
||||
jump_height = 6,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fear_height = 6,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 1,
|
||||
stand_end = 100,
|
||||
walk_speed = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
fly_start = 300, -- swim animation
|
||||
fly_end = 400,
|
||||
},
|
||||
fly_in = {"default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing"},
|
||||
floats = 0,
|
||||
follow = {"fishing:bait:worm", "ethereal:worm", "animalworld:ant", "animalworld:termite"},
|
||||
view_range = 13,
|
||||
|
||||
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, nil, 5, 80, 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()
|
||||
|
||||
|
||||
|
||||
|
||||
-- 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("Exploding Toad stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Exploding Toad will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:toadtamed", S("Tamed Exploding Toad"), "atoad.png", 0)
|
||||
|
||||
|
||||
mobs:alias_mob("nativevillages:toadtamed", "nativevillages:toadtamed") -- compatibility
|
||||
|
||||
minetest.register_node("nativevillages:toadbag", {
|
||||
description = S"Bag full of toads!",
|
||||
tiles = {
|
||||
"nativevillages_toadbag_top.png",
|
||||
"nativevillages_toadbag_bottom.png",
|
||||
"nativevillages_toadbag_right.png",
|
||||
"nativevillages_toadbag_left.png",
|
||||
"nativevillages_toadbag_back.png",
|
||||
"nativevillages_toadbag_front.png"
|
||||
},
|
||||
groups = {crumbly = 3},
|
||||
drop = "nativevillages:toadtamed 9",
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_node("nativevillages:grasslandaltar", {
|
||||
description = "Altar",
|
||||
visual_scale = 1,
|
||||
mesh = "Grasslandaltar.b3d",
|
||||
tiles = {"texturegrasslandaltar.png"},
|
||||
inventory_image = "agrasslandaltar.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:cobble",
|
||||
recipe = "nativevillages:grasslandaltar",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:grasslandbarrel", {
|
||||
description = S"Barrel",
|
||||
visual_scale = 1,
|
||||
mesh = "Grasslandbarrel.b3d",
|
||||
tiles = {"texturegrasslandbarrel.png"},
|
||||
inventory_image = "agrasslandbarrel.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 1, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, 1, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 1, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 1, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:cobble",
|
||||
recipe = "nativevillages:grasslandbarrel",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:cowdropping", {
|
||||
description = S"Cow Dropping",
|
||||
visual_scale = 1,
|
||||
mesh = "Cowdropping.b3d",
|
||||
tiles = {"texturecowdropping.png"},
|
||||
inventory_image = "acowdropping.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:coal_lump",
|
||||
recipe = "nativevillages:cowdropping",
|
||||
|
||||
})
|
||||
@@ -0,0 +1,125 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:grasslandblot",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00004,
|
||||
biomes = {"grassland", "snowy_grassland"},
|
||||
y_max = 20.5,
|
||||
y_min = 15.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/grasslandblot_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:grasslandhouse1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"grassland", "snowy_grassland"},
|
||||
y_max = 20.5,
|
||||
y_min = 15.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/grasslandhouse1_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:grasslandhouse2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"grassland", "snowy_grassland"},
|
||||
y_max = 20.5,
|
||||
y_min = 15.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/grasslandhouse2_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:grasslandhouse3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"grassland", "snowy_grassland"},
|
||||
y_max = 20.5,
|
||||
y_min = 15.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/grasslandhouse3_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:grasslandhouse4",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"grassland", "snowy_grassland"},
|
||||
y_max = 20.5,
|
||||
y_min = 15.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/grasslandhouse4_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:grasslandhouse5",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"grassland", "snowy_grassland"},
|
||||
y_max = 20.5,
|
||||
y_min = 15.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/grasslandhouse5_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:grasslandpond",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00004,
|
||||
biomes = {"grassland", "snowy_grassland"},
|
||||
y_max = 20.5,
|
||||
y_min = 15.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/grasslandpond_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:grasslandstable",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00004,
|
||||
biomes = {"grassland", "snowy_grassland"},
|
||||
y_max = 20.5,
|
||||
y_min = 15.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/grasslandstable_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -0,0 +1,533 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
mobs:register_mob("nativevillages:grasslandcow", {
|
||||
stepheight = 1,
|
||||
type = "animal",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 4,
|
||||
hp_min = 20,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.25, -0.01, -0.25, 0.25, 1.5, 0.25},
|
||||
visual = "mesh",
|
||||
mesh = "Grasslandcow.b3d",
|
||||
textures = {
|
||||
{"texturegrasslandcow.png"},
|
||||
{"texturegrasslandcow2.png"},
|
||||
{"texturegrasslandcow3.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_cow",
|
||||
attack = "nativevillages_cow2",
|
||||
damage = "nativevillages_cow3",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = false,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
follow = {},
|
||||
view_range = 10,
|
||||
stay_near = {{"nativevillages:cowdropping"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 2,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
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,
|
||||
},
|
||||
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, 0, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:grasslandcow",
|
||||
nodes = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter", "default:clay"},
|
||||
neighbors = {"nativevillages:cowdropping"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 3,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:grasslandcow", S("Grassland Cow"), "agrasslandcow.png")
|
||||
|
||||
|
||||
mobs:alias_mob("nativevillages:grasslandcow", "nativevillages:grasslandcow") -- compatibility
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
mobs.grasslandfemale_drops = {
|
||||
"nativevillages:bucket_milk", "nativevillages:cheese", "default:iron_lump",
|
||||
"default:copper_lump", "default:tin_lump", "mobs:meat"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:grasslandfemale", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 40,
|
||||
hp_max = 70,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Grasslandfemale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturegrasslandfemale.png"},
|
||||
{"texturegrasslandfemale2.png"},
|
||||
{"texturegrasslandfemale3.png"},
|
||||
{"texturegrasslandfemale4.png"},
|
||||
|
||||
},
|
||||
child_texture = {
|
||||
{"texturegrasslandbabyf.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_grasslandfemale2",
|
||||
random = "nativevillages_grasslandfemale",
|
||||
damage = "nativevillages_grasslandfemale3",
|
||||
death = "nativevillages_grasslandfemale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
stay_near = {{"nativevillages:grasslandbarrel"}, 5},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.grasslandfemale_drops
|
||||
if item:get_name() == "farming:bread" or item:get_name() == "farming:garlic_bread" or item:get_name() == "ethereal:banana_bread" 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.grasslandfemale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Grasslander dropped you an item for bread!"))
|
||||
|
||||
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("Grasslander stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Grasslander will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:grasslandfemale",
|
||||
nodes = {"default:dirt_with_grass", "default:cobble", "default:dirt_with_coniferous_litter", "default:clay"},
|
||||
neighbors = {"nativevillages:grasslandbarrel"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:grasslandfemale", S("Female Grasslander"), "agrasslandfemale.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("nativevillages:grasslandfemale", "nativevillages:grasslandfemale")
|
||||
|
||||
mobs.grasslandmale_drops = {
|
||||
"nativevillages:bucket_milk", "nativevillages:cheese", "default:iron_lump",
|
||||
"default:copper_lump", "default:tin_lump", "mobs:meat"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:grasslandmale", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 70,
|
||||
hp_max = 90,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Grasslandmale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturegrasslandmale.png"},
|
||||
{"texturegrasslandmale2.png"},
|
||||
{"texturegrasslandmale3.png"},
|
||||
{"texturegrasslandmale4.png"},
|
||||
|
||||
},
|
||||
child_texture = {
|
||||
{"texturegrasslandbabym.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_grasslandmale2",
|
||||
random = "nativevillages_grasslandmale",
|
||||
damage = "nativevillages_grasslandmale3",
|
||||
death = "nativevillages_grasslandmale3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
stay_near = {{"nativevillages:grasslandbarrel"}, 5},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.grasslandmale_drops
|
||||
if item:get_name() == "farming:bread" or item:get_name() == "farming:garlic_bread" or item:get_name() == "ethereal:banana_bread" 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.grasslandmale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Grasslander dropped you an item for bread!"))
|
||||
|
||||
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("Grasslander stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Grasslander will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:grasslandmale",
|
||||
nodes = {"default:dirt_with_grass", "default:cobble", "default:dirt_with_coniferous_litter", "default:clay"},
|
||||
neighbors = {"nativevillages:grasslandbarrel"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:grasslandmale", S("Male Grasslander"), "agrasslandmale.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("nativevillages:grasslandmale", "nativevillages:grasslandmale")
|
||||
|
||||
|
||||
mobs.grasslandwitch_drops = {
|
||||
"nativevillages:grasslandcat", "nativevillages:toadbag"
|
||||
}
|
||||
|
||||
|
||||
mobs:register_mob("nativevillages:grasslandwitch", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
attack_type = "shoot",
|
||||
shoot_interval = 1,
|
||||
arrow = "nativevillages:fireball",
|
||||
shoot_offset = 2,
|
||||
attack_animals = false,
|
||||
damage = 7,
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 20,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Grasslandwitch.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturegrasslandwitch.png"},
|
||||
{"texturegrasslandwitch2.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
shoot = "nativevillages_witch2",
|
||||
random = "nativevillages_witch",
|
||||
damage = "nativevillages_witch4",
|
||||
death = "nativevillages_witch3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "default:coal_lump", chance = 1, min = 1, max = 3},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
stay_near = {{"nativevillages:grasslandalta"}, 4},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
shoot_speed = 100,
|
||||
shoot_start = 200,
|
||||
shoot_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, 0, 15, 25, 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.grasslandwitch_drops
|
||||
if item:get_name() == "default:diamond" 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.grasslandwitch_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Witch dropped you an item for diamond!"))
|
||||
|
||||
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("Witch stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Witch will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:grasslandwitch",
|
||||
nodes = {"default:dirt_with_grass", "default:clay"},
|
||||
neighbors = {"nativevillages:grasslandaltar"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:grasslandwitch", S("Grassland Witch"), "agrasslandwitch.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("nativevillages:grasslandwitch", "nativevillages:grasslandwitch")
|
||||
@@ -0,0 +1,91 @@
|
||||
People Mod provides NPCs to be integrated in your own village, follow you and provide many trading items.
|
||||
Native Villages is focused on ambience. The villagers of this mod can be found in the specific biomes but
|
||||
wont follow you and some are even aggressive by nature.
|
||||
As an additional challenge similar to Minecraft Creepers, you will find now exploding toads at night near the coastal regions
|
||||
of jungle, savanna and forest biomes.
|
||||
|
||||
This guide will shortly introduce you to the trading options of every specific tribe provided by the mod.
|
||||
All trading drops are random (Like in People Mod)
|
||||
|
||||
Arctic/Icelander Tribe:
|
||||
|
||||
Sledge Trader
|
||||
Sells Ice Dogs and Dog Sledges for steel ingots.
|
||||
|
||||
Ice Villager
|
||||
Sells brown and white wool, leather and meat for iron lumps.
|
||||
|
||||
Sledge with Dog
|
||||
Can be fed with meat(Mod Mobs Redo), dogfood or cooked dogfood.
|
||||
|
||||
Desert Tribe:
|
||||
|
||||
Villagers, Raiders and Rangers are aggressive and don't like to trade with you.
|
||||
|
||||
Desert Slave Trader
|
||||
Sells Chicken Breeders, Cow Herders, Lion Trainers, Dancers and Loyal Cannibals for gold ingots.
|
||||
|
||||
Grasslander Tribe:
|
||||
|
||||
Grasslander
|
||||
Sells milk buckets, mozzarella cheese, iron lumps, copper lumps, tin lumps and meat for bread, garlic bread and ethereal banana bread.
|
||||
|
||||
Grassland Witch
|
||||
Sells cats and bags of exploding toads for diamonds.
|
||||
|
||||
Lake Tribe:
|
||||
|
||||
Lake Villager
|
||||
Sells cooked catfish, strings, water buckets, salt and pearls for ethereal bananas, sugar, cocoa and bananas(farming).
|
||||
|
||||
Fisher
|
||||
Sells domesticated catfish(can be bred) and pearls for gold lumps.
|
||||
|
||||
Savanna Tribe:
|
||||
|
||||
Witch Doctor
|
||||
Sells tamed zombies for all graves found in People Mod.
|
||||
|
||||
Savanna Queen + King
|
||||
Sells gold block for diamond.
|
||||
|
||||
Savanna Villagers
|
||||
Sells pumpkin, vanilla, potatoes, pineapple, pepper, onion, peas, melon, cucumber and coffee beans for pearls.
|
||||
|
||||
Various Creatures:
|
||||
|
||||
Tamed Catfish
|
||||
Can be bred with worm, seaweed, grass, cucumber, cabbage, ants, termite, fish food.
|
||||
|
||||
Tamed Zombie
|
||||
Can be bred with dried human meat(Can be found in Jungle/Cannibal settlements).
|
||||
|
||||
Cow Herder
|
||||
Sells domestic cows for various farming dishes.
|
||||
|
||||
Domestic Cow
|
||||
Can be milked with a bucket, can be bred with wheat, grass, barley, oat, rye, carrot, beans and lettuce.
|
||||
|
||||
Chicken Breeder
|
||||
Sells tamed desert chickens for various farming dishes.
|
||||
|
||||
Tamed Desert Chicken
|
||||
Can be bred with wheat seeds, cotton seeds, barley seeds, oat seeds and rye seeds.
|
||||
|
||||
Lion Trainer
|
||||
Sells tamed lions for gold lumps.
|
||||
|
||||
Tamed Lions
|
||||
Can be fed with many kind of raw meat and fish.
|
||||
|
||||
Grassland Cat
|
||||
Can be fed with many kind of raw meat and fish.
|
||||
|
||||
Dancers
|
||||
Can be fed with various farming dishes.
|
||||
|
||||
Loyal Cannibal
|
||||
Can be fed with dried human meat(Can be found in Jungle/Cannibal settlements).
|
||||
|
||||
|
||||
It is useless to kill animals to be found in the villages, they wont drop anything and wont get tame to prevent cheating.
|
||||
@@ -0,0 +1,91 @@
|
||||
People Mod stellt NPCs zur Verfügung, die in Ihr eigenes Dorf integriert werden können, Ihnen folgen und viele Handelsgegenstände bereitstellen.
|
||||
Native Villages konzentriert sich auf das Ambiente. Die Dorfbewohner dieser Mod(nativevillages) sind in den spezifischen Biomen zu finden,
|
||||
werden dir nicht folgen und einige sind sogar von Natur aus aggressiv.
|
||||
Als zusätzliche Herausforderung, ähnlich wie bei Minecraft Creepers, findet ihr nun nachts explodierende Kröten in der Nähe der Küstenregionen
|
||||
von Dschungel, Savannen und Waldbiomen.
|
||||
|
||||
Dieser Leitfaden wird Sie kurz in die Handelsoptionen jedes spezifischen Stammes einführen, der von der Mod bereitgestellt wird.
|
||||
Alle Trading-Drops sind zufällig (wie in People Mod)
|
||||
|
||||
Arktischer/Eisländer Stamm:
|
||||
|
||||
Schlittenhändler
|
||||
Verkauft Eishunde und Hundeschlitten für Stahlbarren.
|
||||
|
||||
Eisländer
|
||||
Verkauft braune und weiße Wolle, Leder und Fleisch für Eisenklumpen.
|
||||
|
||||
Schlitten mit Hund
|
||||
Kann mit Fleisch (Mod Mobs Redo), Hundefutter oder gekochtem Hundefutter gefüttert werden.
|
||||
|
||||
Wüsten-Stamm:
|
||||
|
||||
Wüstendorfbewohner, Wüstenplünderer und Wüstenwächter sind aggressiv und handeln nicht gerne mit dir.
|
||||
|
||||
Sklavenhändler
|
||||
Verkauft Hühnerzüchterin, Kuhzüchterin, Löwentrainer, Tänzer und Loyale Kannibalen für Goldbarren.
|
||||
|
||||
Graslandbewohner Stamm:
|
||||
|
||||
Graslandbewohner
|
||||
Verkauft Milcheimer, Mozzarella-Käse, Eisenklumpen, Kupferklumpen, Zinnklumpen und Fleisch für Brot, Knoblauchbrot und etheral Bananenbrot.
|
||||
|
||||
Wiesenhexe
|
||||
Verkauft Katzen und Säcke mit explodierenden Kröten für Diamanten.
|
||||
|
||||
Seebewohner Stamm:
|
||||
|
||||
Seebewohner
|
||||
Verkauft gekochten Wels, Schnüre, Wassereimer, Salz und Perlen für ethereal Bananen, Zucker, Kakao und Bananen (Farming mod).
|
||||
|
||||
Angler
|
||||
Verkauft domestizierten Wels (kann gezüchtet werden) und Perlen für Goldklumpen.
|
||||
|
||||
Savannenbewohner Stamm:
|
||||
|
||||
Hexendoktor
|
||||
Verkauft gezähmte Zombies für alle Gräber, die in People Mod gefunden werden.
|
||||
|
||||
Savannenkönigin + Savennenkönig
|
||||
Verkauft Goldblock für Diamant.
|
||||
|
||||
Savannenbewohner
|
||||
Verkauft Kürbis, Vanille, Kartoffeln, Ananas, Paprika, Zwiebeln, Erbsen, Melonen, Gurken und Kaffeebohnen für Perlen.
|
||||
|
||||
Diverse Kreaturen:
|
||||
|
||||
Domestizierter Wels
|
||||
Kann mit Wurm, Algen, Gras, Gurken, Kohl, Ameisen, Termiten, Fischfutter gezüchtet werden.
|
||||
|
||||
Gezähmter Zombie
|
||||
Kann mit getrocknetem Menschenfleisch gezüchtet werden (Kann in Dschungel-/Kannibalensiedlungen gefunden werden).
|
||||
|
||||
Kuhzüchterin
|
||||
Verkauft Domestizierte Kühe für verschiedene bäuerliche Gerichte.
|
||||
|
||||
Domestizierte Kuh
|
||||
Kann mit einem Eimer gemolken werden, kann mit Weizen, Gras, Gerste, Hafer, Roggen, Karotten, Bohnen und Salat gezüchtet werden.
|
||||
|
||||
Hühnerzüchterin
|
||||
Verkauft gezähmte Wüstenhühner für verschiedene landwirtschaftliche Gerichte.
|
||||
|
||||
Domestiziertes Wüstenhuhn
|
||||
Kann mit Weizensamen, Baumwollsamen, Gerstensamen, Hafersamen und Roggensamen gezüchtet werden.
|
||||
|
||||
Löwentrainer
|
||||
Verkauft gezähmte Löwen für Goldklumpen.
|
||||
|
||||
Gezähmte Löwen
|
||||
Kann mit vielen Arten von rohem Fleisch und Fisch gefüttert werden.
|
||||
|
||||
Katze
|
||||
Kann mit vielen Arten von rohem Fleisch und Fisch gefüttert werden.
|
||||
|
||||
Tänzer
|
||||
Kann mit verschiedenen bäuerlichen Gerichten gefüttert werden.
|
||||
|
||||
Loyaler Kannibale
|
||||
Kann mit getrocknetem Menschenfleisch gefüttert werden (Kann in Dschungel-/Kannibalensiedlungen gefunden werden).
|
||||
|
||||
|
||||
Es ist sinnlos, Tiere zu töten, die in den Dörfern zu finden sind, sie lassen nichts fallen(Keine Drops) und werden nicht zahm, um Betrug/Farming zu verhindern.
|
||||
@@ -0,0 +1,29 @@
|
||||
if minetest.get_modpath("hunger_ng") ~= nil then
|
||||
hunger_ng.add_hunger_data('nativevillages:bucket_milk', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('nativevillages:cheese', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('nativevillages:catfish_raw', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('nativevillages:catfish_cooked', {
|
||||
satiates = 2.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('nativevillages:chicken_raw', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('nativevillages:chicken_cooked', {
|
||||
satiates = 2.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('nativevillages:chicken_egg_fried', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('nativevillages:butter', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('nativevillages:driedhumanmeat', {
|
||||
satiates = 2.0,
|
||||
})
|
||||
end
|
||||
@@ -0,0 +1,91 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:icehouse1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:snowblock", "default:ice"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0001,
|
||||
biomes = {"icesheet", "icesheet_ocean"},
|
||||
y_max = 3.5,
|
||||
y_min = 1.0,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/icehouse1_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:icehouse2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:snowblock", "default:ice"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0001,
|
||||
biomes = {"icesheet", "icesheet_ocean"},
|
||||
y_max = 3.5,
|
||||
y_min = 1.0,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/icehouse2_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:icehouse3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:snowblock", "default:ice"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0001,
|
||||
biomes = {"icesheet", "icesheet_ocean"},
|
||||
y_max = 3.5,
|
||||
y_min = 1.0,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/icehouse3_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:icelogs",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:snowblock", "default:ice"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0001,
|
||||
biomes = {"icesheet", "icesheet_ocean"},
|
||||
y_max = 3.5,
|
||||
y_min = 1.0,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/icelogs_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:icepelts",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:snowblock", "default:ice"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0001,
|
||||
biomes = {"icesheet", "icesheet_ocean"},
|
||||
y_max = 3.5,
|
||||
y_min = 1.0,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/icepelts_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:icesledge",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:snowblock", "default:ice"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0001,
|
||||
biomes = {"icesheet", "icesheet_ocean"},
|
||||
y_max = 3.5,
|
||||
y_min = 1.0,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/icesledge_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
-- Load support for intllib.
|
||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||
|
||||
local S = minetest.get_translator and minetest.get_translator("nativevillages") or
|
||||
dofile(path .. "intllib.lua")
|
||||
|
||||
mobs.intllib = S
|
||||
|
||||
|
||||
-- Check for custom mob spawn file
|
||||
local input = io.open(path .. "spawn.lua", "r")
|
||||
|
||||
if input then
|
||||
mobs.custom_spawn_nativevillages = true
|
||||
input:close()
|
||||
input = nil
|
||||
end
|
||||
|
||||
|
||||
-- Buildings
|
||||
|
||||
|
||||
dofile(path .. "cannibalblocks.lua") --
|
||||
dofile(path .. "savannablocks.lua") --
|
||||
dofile(path .. "arcticblocks.lua") --
|
||||
dofile(path .. "grasslandblocks.lua") --
|
||||
dofile(path .. "lakeblocks.lua") --
|
||||
dofile(path .. "desertblocks.lua") --
|
||||
dofile(path .. "junglebuildings.lua") --
|
||||
dofile(path .. "icebuildings.lua") --
|
||||
dofile(path .. "grasslandbuildings.lua") --
|
||||
dofile(path .. "lakebuildings.lua") --
|
||||
dofile(path .. "desertbuildings.lua") --
|
||||
dofile(path .. "savannabuildings.lua") --
|
||||
dofile(path .. "grasslandcreatures.lua") --
|
||||
dofile(path .. "junglecreatures.lua") --
|
||||
dofile(path .. "arcticcreatures.lua") --
|
||||
dofile(path .. "savannacreatures.lua") --
|
||||
dofile(path .. "lakecreatures.lua") --
|
||||
dofile(path .. "desertcreatures.lua") --
|
||||
dofile(path .. "slavecreatures.lua") --
|
||||
dofile(path .. "buyablestuff.lua") --
|
||||
dofile(path .. "explodingtoad.lua") --
|
||||
dofile(path .. "lootchest.lua") --
|
||||
dofile(path .. "hunger.lua") --
|
||||
|
||||
|
||||
-- Load custom spawning
|
||||
if mobs.custom_spawn_nativevillages then
|
||||
dofile(path .. "spawn.lua")
|
||||
end
|
||||
|
||||
|
||||
|
||||
print (S("[MOD] Buildings loaded"))
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Support for the old multi-load method
|
||||
dofile(minetest.get_modpath("intllib").."/init.lua")
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:junglehouse1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_rainforest_litter"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"rainforest"},
|
||||
y_max = 20.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/cannibalhouse1_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:junglehouse2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_rainforest_litter"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"rainforest"},
|
||||
y_max = 20.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/cannibalhouse2_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:junglehouse3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_rainforest_litter"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"rainforest"},
|
||||
y_max = 20.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/cannibalhouse3_30_90.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:junglecage",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_rainforest_litter"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"rainforest"},
|
||||
y_max = 20.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/cannibalcage_30_270.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:junglepit",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_rainforest_litter"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"rainforest"},
|
||||
y_max = 20.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/cannibalpit_30_270.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:jungletower",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_rainforest_litter"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"rainforest"},
|
||||
y_max = 20.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/cannibaltower_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -0,0 +1,355 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
mobs:register_mob("nativevillages:cannibalking", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "shoot",
|
||||
shoot_interval = 1,
|
||||
arrow = "nativevillages:fireball",
|
||||
shoot_offset = 2,
|
||||
attack_animals = true,
|
||||
damage = 7,
|
||||
hp_min = 55,
|
||||
hp_max = 85,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Cannibalking.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturecannibalking.png"},
|
||||
},
|
||||
sounds = {
|
||||
random = "nativevillages_cannibalmale",
|
||||
shoot = "nativevillages_cannibalmale2",
|
||||
damage = "nativevillages_cannibalmale3",
|
||||
death = "nativevillages_cannibalmale4",
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
jump_height = 2,
|
||||
stepheight = 2,
|
||||
fear_height = 3,
|
||||
stay_near = {{"nativevillages:cannibalshrine", "nativevillages:driedpeople"}, 5},
|
||||
drops = {
|
||||
{name = "default:copper_lump", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 5,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 75,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
shoot_speed = 100,
|
||||
shoot_start = 200,
|
||||
shoot_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
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, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:cannibalking",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"nativevillages:cannibalshrine"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 2, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 40,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_arrow("nativevillages:fireball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"nativevillages_fireball.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,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("nativevillages:cannibalking", S("Cannibal King"), "acannibalking.png")
|
||||
|
||||
mobs:register_mob("nativevillages:cannibalarcher", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "shoot",
|
||||
shoot_interval = 2,
|
||||
arrow = "people:bolt",
|
||||
shoot_offset = 2,
|
||||
attacks_monsters = false,
|
||||
damage = 4,
|
||||
hp_min = 55,
|
||||
hp_max = 85,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Cannibalarcher.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturecannibalarcher.png"},
|
||||
},
|
||||
sounds = {
|
||||
random = "nativevillages_cannibalmale",
|
||||
attack = "nativevillages_cannibalmale2",
|
||||
damage = "nativevillages_cannibalmale3",
|
||||
death = "nativevillages_cannibalmale4",
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
jump_height = 2,
|
||||
stepheight = 2,
|
||||
fear_height = 3,
|
||||
stay_near = {{"nativevillages:cannibalshrine", "nativevillages:driedpeople"}, 5},
|
||||
drops = {
|
||||
{name = "default:tin_lump", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 5,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 75,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
shoot_speed = 50,
|
||||
shoot_start = 200,
|
||||
shoot_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
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, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:cannibalarcher",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"nativevillages:cannibalshrine"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 2, -- 15000
|
||||
active_object_count = 2,
|
||||
min_height = 0,
|
||||
max_height = 40,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:cannibalarcher", S("Cannibal Hunter"), "acannibalarcher.png")
|
||||
|
||||
mobs:register_mob("nativevillages:cannibalmurderer", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 6,
|
||||
hp_min = 55,
|
||||
hp_max = 85,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Cannibalmurderer.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturecannibalmurderer.png"},
|
||||
},
|
||||
sounds = {
|
||||
random = "nativevillages_cannibalfemale",
|
||||
attack = "nativevillages_cannibalfemale2",
|
||||
damage = "nativevillages_cannibalfemale3",
|
||||
death = "nativevillages_cannibalfemale4",
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
jump_height = 2,
|
||||
stepheight = 2,
|
||||
fear_height = 3,
|
||||
stay_near = {{"nativevillages:cannibalshrine", "nativevillages:driedpeople"}, 5},
|
||||
drops = {
|
||||
{name = "default:copper_lump", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 5,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 75,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
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, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:cannibalmurderer",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"nativevillages:driedpeople"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 2, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 40,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:cannibalmurderer", S("Cannibal Murderer"), "acannibalmurderer.png")
|
||||
|
||||
mobs:register_mob("nativevillages:cannibalchild", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 6,
|
||||
hp_min = 15,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Cannibalchild.b3d",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {
|
||||
{"texturecannibalchild.png"},
|
||||
},
|
||||
sounds = {
|
||||
random = "nativevillages_cannibalchild3",
|
||||
attack = "nativevillages_cannibalchild2",
|
||||
damage = "nativevillages_cannibalchild",
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 3,
|
||||
run_velocity = 5,
|
||||
runaway = false,
|
||||
stepheight = 4,
|
||||
fear_height = 6,
|
||||
jump = true,
|
||||
jump_height = 4,
|
||||
stepheight = 2,
|
||||
fear_height = 5,
|
||||
stay_near = {{"nativevillages:cannibalshrine", "nativevillages:driedpeople"}, 5},
|
||||
drops = {
|
||||
{name = "default:iron_lump", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 5,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 150,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
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, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:cannibalchild",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"nativevillages:driedpeople"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 2, -- 15000
|
||||
active_object_count = 2,
|
||||
min_height = 0,
|
||||
max_height = 40,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:cannibalchild", S("Cannibal Child"), "acannibalchild.png")
|
||||
@@ -0,0 +1,72 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_node("nativevillages:fishtrap", {
|
||||
description = S"Fish Trap",
|
||||
visual_scale = 1,
|
||||
mesh = "Fishtrap.b3d",
|
||||
tiles = {"texturefishtrap.png"},
|
||||
inventory_image = "afishtrap.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.25, -0.5, -0.5, 0.25, 0.12, 0.5},
|
||||
--[[{-0.25, -0.5, -0.5, 0.25, 0.12, 0.5},
|
||||
{-0.25, -0.5, -0.5, 0.25, 0.12, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.25, -0.5, -0.5, 0.25, 0.12, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "nativevillages:fishtrap",
|
||||
burntime = 3,
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:hangingfish", {
|
||||
description = S"Hangning Fish",
|
||||
visual_scale = 1,
|
||||
mesh = "Hangingfish.b3d",
|
||||
tiles = {"texturehangingfish.png"},
|
||||
inventory_image = "ahangingfish.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1, -0.5, -0.2, 1, 0.9, 0.2},
|
||||
--[[{-1, -0.5, -0.2, 1, 0.9, 0.2},
|
||||
{-1, -0.5, -0.2, 1, 0.9, 0.2}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1, -0.5, -0.2, 1, 0.9, 0.2}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "nativevillages:hangingfish",
|
||||
burntime = 3,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("nativevillages:pearl", {
|
||||
description = S("Pearl"),
|
||||
inventory_image = "nativevillages_pearl.png",
|
||||
})
|
||||
@@ -0,0 +1,91 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:lakehouse1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt", "default:sand"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"deciduous_forest_ocean", "deciduous_forest_shore", "coniferous_forest_ocean"},
|
||||
y_max = -0.5,
|
||||
y_min = -0.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/lakehouse1_0_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:lakehouse2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt", "default:sand"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"deciduous_forest_ocean", "deciduous_forest_shore", "coniferous_forest_ocean"},
|
||||
y_max = -0.5,
|
||||
y_min = -0.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/lakehouse2_0_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:lakehouse3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt", "default:sand"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"deciduous_forest_ocean", "deciduous_forest_shore", "coniferous_forest_ocean"},
|
||||
y_max = -0.5,
|
||||
y_min = -0.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/lakehouse3_0_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:lakehouse4",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt", "default:sand"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"deciduous_forest_ocean", "deciduous_forest_shore", "coniferous_forest_ocean"},
|
||||
y_max = -0.5,
|
||||
y_min = -0.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/lakehouse4_0_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:lakefishtrap",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt", "default:sand"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00003,
|
||||
biomes = {"deciduous_forest_ocean", "deciduous_forest_shore", "coniferous_forest_ocean"},
|
||||
y_max = -0.5,
|
||||
y_min = -0.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/lakefishtrap_0_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:lakeharbour",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt", "default:sand"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00003,
|
||||
biomes = {"deciduous_forest_ocean", "deciduous_forest_shore", "coniferous_forest_ocean"},
|
||||
y_max = -0.5,
|
||||
y_min = -0.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/lakeharbour_0_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -0,0 +1,501 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
mobs:register_mob("nativevillages:lakecatfish", {
|
||||
stepheight = 0.0,
|
||||
type = "animal",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = false,
|
||||
reach = 1,
|
||||
damage = 1,
|
||||
hp_min = 15,
|
||||
hp_max = 55,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.5, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "Lakecatfish.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturelakecatfish.png"},
|
||||
},
|
||||
sounds = {},
|
||||
makes_footstep_sound = false,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
fly = true,
|
||||
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing",
|
||||
fall_speed = 0,
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
|
||||
jump = false,
|
||||
stepheight = 0.0,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
air_damage = 1,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fear_height = 2,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 200,
|
||||
stand_end = 300,
|
||||
fly_start = 0,
|
||||
fly_end = 100,
|
||||
fly2_start = 100,
|
||||
fly2_end = 200,
|
||||
die_start = 200,
|
||||
die_end = 300,
|
||||
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"},
|
||||
floats = 0,
|
||||
follow = {},
|
||||
view_range = 10,
|
||||
|
||||
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, 15, 25, 0, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:lakecatfish",
|
||||
nodes = {"default:water_source"}, {"default:river_water_source"},
|
||||
neighbors = {"nativevillages:fishtrap"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 1, -- 15000
|
||||
active_object_count = 3,
|
||||
min_height = -10,
|
||||
max_height = 30,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:lakecatfish", S("Catfish"), "alakecatfish.png")
|
||||
|
||||
mobs.lakevillagerfemale_drops = {
|
||||
"nativevillages:catfish_cooked", "farming:string", "bucket:bucket_water", "farming:salt", "nativevillages:pearl"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:lakevillagerfemale", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 40,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Lakevillagerfemale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturelakevillagerfemale.png"},
|
||||
{"texturelakevillagerfemale2.png"},
|
||||
{"texturelakevillagerfemale3.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_lakefemale",
|
||||
attack = "nativevillages_lakefemale2",
|
||||
damage = "nativevillages_lakefemale4",
|
||||
death = "nativevillages_lakefemale3",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = false,
|
||||
jump_height = 1,
|
||||
stepheight = 0,
|
||||
fear_height = 1,
|
||||
stay_near = {{"nativevillages:hangingfish"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 200,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.lakevillagerfemale_drops
|
||||
if item:get_name() == "ethereal:banana" or item:get_name() == "farming:sugar" or item:get_name() == "group:food_cocoa" or item:get_name() == "farming:banana" 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.lakevillagerfemale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Lake Villager dropped you an item 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, S("Lake Villager stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Lake Villager will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:lakevillagerfemale",
|
||||
nodes = {"default:pine_wood"},
|
||||
neighbors = {"nativevillages:hangingfish"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:lakevillagerfemale", S("Female Lake Villager"), "alakevillagerfemale.png")
|
||||
|
||||
mobs.lakevillagerfisher_drops = {
|
||||
"nativevillages:tamecatfish", "nativevillages:pearl"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:lakevillagerfisher", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 40,
|
||||
hp_max = 80,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Lakevillagerfisher.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturelakevillagerfisher.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_lakemale",
|
||||
attack = "nativevillages_lakemale2",
|
||||
damage = "nativevillages_lakemale4",
|
||||
death = "nativevillages_lakemale3",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = false,
|
||||
jump_height = 1,
|
||||
stepheight = 0,
|
||||
fear_height = 1,
|
||||
stay_near = {{"nativevillages:fishtrap"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 200,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.lakevillagerfisher_drops
|
||||
if item:get_name() == "default:gold_lump" 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.lakevillagerfisher_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Fisher bred you a catfish for gold!"))
|
||||
|
||||
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("Fisher stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Fisher will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:lakevillagerfisher",
|
||||
nodes = {"default:pine_wood"},
|
||||
neighbors = {"nativevillages:fishtrap"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:lakevillagerfisher", S("Fisher"), "alakevillagerfisher.png")
|
||||
|
||||
|
||||
mobs.lakevillagermale_drops = {
|
||||
"nativevillages:catfish_cooked", "farming:string", "bucket:bucket_water", "farming:salt", "nativevillages:pearl"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:lakevillagermale", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 40,
|
||||
hp_max = 90,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Lakevillagermale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturelakevillagermale.png"},
|
||||
{"texturelakevillagermale2.png"},
|
||||
{"texturelakevillagermale3.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_lakemale",
|
||||
attack = "nativevillages_lakemale2",
|
||||
damage = "nativevillages_lakemale4",
|
||||
death = "nativevillages_lakemale3",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = false,
|
||||
jump_height = 1,
|
||||
stepheight = 0,
|
||||
fear_height = 1,
|
||||
stay_near = {{"nativevillages:hangingfish"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 200,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.lakevillagermale_drops
|
||||
if item:get_name() == "ethereal:banana" or item:get_name() == "farming:sugar" or item:get_name() == "group:food_cocoa" or item:get_name() == "farming:banana" 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.lakevillagermale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Lake Villager dropped you an item 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, S("NPC stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("NPC will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:lakevillagermale",
|
||||
nodes = {"default:pine_wood"},
|
||||
neighbors = {"nativevillages:hangingfish"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:lakevillagermale", S("Male Lake Villager"), "alakevillagermale.png")
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
# textdomain: nativevillages
|
||||
|
||||
Sledge=Schlitten
|
||||
Blanket=Decke
|
||||
Ice Dog=Eishund
|
||||
Trader dropped you an item for steel!=Händler hat einen Gegenstand für Stahl gegeben!
|
||||
NPC stands still.=NPC wartet.
|
||||
NPC will follow you.=NPC folgt dir.
|
||||
Sledge Trader=Schlittenhändler
|
||||
Icelander dropped you an item for iron!=Eisländer hat einen Gegenstand für Eisen gegeben!
|
||||
Icelander stands still.=Eisländer wartet.
|
||||
Icelander will follow you.=Eisländer folgt dir.
|
||||
Female Icelander=Eisländerin
|
||||
Male Icelander=Eisländer
|
||||
Sledge with Dog=Schlitten mit Hund
|
||||
Domesticated Catfish=Domestizierter Wels
|
||||
Raw Catfish=Rohes Welsfleisch
|
||||
Cooked Catfish=Gekochtes Welsfleisch
|
||||
Zombie stands still.=Zombie wartet.
|
||||
Zombie will follow you.=Zombie folgt dir.
|
||||
Tamed Zombie=Gezähmter Zombie
|
||||
Cow already milked!=Kuh bereits gemolken!
|
||||
Domesticated Cow=Domestizierte Kuh
|
||||
Bucket of Milk=Milcheimer
|
||||
Glass of Milk=Milchglas
|
||||
Butter=Butter
|
||||
Mozzarella Cheese=Mozzarella
|
||||
Mozzarella Cheese Block=Mozzarella Block
|
||||
Domesticated Desert Chicken=Domestiziertes Wüstenhuhn
|
||||
Lion stands still.=Löwe wartet.
|
||||
Lion will follow you.=Löwe folgt dir.
|
||||
Tamed Male Lion=Gezähmter Männlicher Löwe
|
||||
Tamed Female Lion=Gezähmter Weiblicher Löwe
|
||||
Cat=Katze
|
||||
Dried Human Remains=Getrocknete Menschliche Überreste
|
||||
Dried Human Meat=Getrocknetes Menschenfleisch
|
||||
Cannibal Shrine=Kannibalenschrein
|
||||
Hookah=Wasserpfeife
|
||||
Desert Carpet=Wüstenteppich
|
||||
Slave Bracelet=Sklavenkette
|
||||
Desert Seeds=Wüstensamen
|
||||
Desert Villager dropped you an item for a stick!=Wüstendorf Bewohner hat einen Gegenstand für einen Stock gegeben!
|
||||
Desert Villager stands still.=Wüstendorf Bewohner wartet.
|
||||
Desert Villager will follow you.=Wüstendorf Bewohner folgt dir.
|
||||
Male Desert Villager=Wüstendorf Bewohner
|
||||
Female Desert Villager=Wüstendorf Bewohnerin
|
||||
Slave delivered!=Sklave ausgeliefert!
|
||||
Slavetrader stands still.=Sklavenhändler wartet.
|
||||
Slavetrader will follow you.=Sklavenhändler folgt dir.
|
||||
Slave Trader=Sklavenhändler
|
||||
Desert Ranger=Wüstenwächter
|
||||
Desert Raider=Wüstenplünderer
|
||||
Desert Chicken=Wüstenhuhn
|
||||
Bird Egg=Vogelei
|
||||
Fried Desert Chicken Egg=Gebratenes Wüstenhühnerei
|
||||
Raw Desert Chicken meat=Rohes Wüstenhuhnfleisch
|
||||
Cooked Desert Chicken=Gekochtes Wüstenhuhnfleisch
|
||||
Toad=Kröte
|
||||
Tamed Exploding Toad=Gezähmte Explodierende Kröte
|
||||
Barrel=Fass
|
||||
Cow Dropping=Kuhfladen
|
||||
Grassland Cow=Graslandkuh
|
||||
Grasslander dropped you an item for bread!=Graslandbewohner hat einen Gegenstand für Brot fallen lassen!
|
||||
Grasslander stands still.=Graslandbewohner wartet.
|
||||
Grasslander will follow you.=Graslandbewohner folgt dir.
|
||||
Female Grasslander=Graslandbewohnerin
|
||||
Male Grasslander=Graslandbewohner
|
||||
Witch dropped you an item for diamond!=Die Hexe hat einen Gegenstand für einen Diamenten fallen lassen!
|
||||
Witch stands still.=Hexe wartet.
|
||||
Witch will follow you.=Hexe folgt dir.
|
||||
Grassland Witch=Graslandhexe
|
||||
Cannibal King=Kannibalenkönig
|
||||
Cannibal Hunter=Kannibalenjäger
|
||||
Cannibal Murderer=Kannibalenmörderin
|
||||
Cannibal Child=Kannibalenkind
|
||||
Fish Trap=Fischfalle
|
||||
Hangning Fish=Hängender Fisch
|
||||
Pearl=Perle
|
||||
Catfish=Wels
|
||||
Lake Villager dropped you an item for fruit!=Seebewohner hat einen Gegenstand für Früchte fallen lassen!
|
||||
Lake Villager stands still.=Seebewohner wartet.
|
||||
Lake Villager will follow you.=Seebewohner folgt dir.
|
||||
Female Lake Villager=Seebewohnerin
|
||||
Fisher bred you a catfish for gold!=Angler hat dir einen Wels für Gold gezüchtet!
|
||||
Fisher stands still.=Angler wartet.
|
||||
Fisher will follow you.=Angler folgt dir.
|
||||
Fisher=Angler
|
||||
Male Lake Villager=Seebewohner
|
||||
Savanna Throne=Savannenthron
|
||||
Savanna Vessels=Savannen Vasen
|
||||
Savanna Shrine=Savannenschrein
|
||||
Savanna Corpse=Savannenleiche
|
||||
Male Lion=Männlicher Löwe
|
||||
Female Lion=Weiblicher Löwe
|
||||
Witch Doctor created a tame Zombie!=Hexendoktor hat einen zahmen Zombie erschaffen!
|
||||
Witch Doctor stands still.=hexendoktor wartet.
|
||||
Witch Doctor will follow you.=Hexendoktor folgt dir.
|
||||
Witch Doctor=Hexendoktor
|
||||
Royalty dropped you an item for gold!=Der Adel hat einen Gegenstand für Gold gegeben!
|
||||
Royalty stands still.=Der Adel wartet.
|
||||
Royalty will follow you.=Der Adel folgt dir.
|
||||
Savanna Queen=Savannenkönigin
|
||||
Savanna Villager dropped you an item for a pearl!=Savannenbewohner hat einen Gegenstand für eine Perle gegeben!
|
||||
Savanna Villager stands still.=Savannenbewohner wartet.
|
||||
Savanna Villager will follow you.=Savannenbewohner folgt dir.
|
||||
Male Savanna Villager=Savannenbewohner
|
||||
Savanna King=Savennenkönig
|
||||
Female Savanna Villager=Savannenbewohnerin
|
||||
Chicken hatched!=Huhn geschlüpft!
|
||||
Chicken Breeder stands still.=Hühnerzüchterin wartet.
|
||||
Chicken Breeder will follow you.=Hühnerzüchterin folgt dir,
|
||||
Chicken Breeder=Hühnerzüchterin
|
||||
Cow has been raised!=Kuh wurde aufgezogen!
|
||||
Cow Herder=Kuhzüchterin
|
||||
Cow Herder stands still.=Kuhzüchterin wartet.
|
||||
Cow Herder will follow you.=Kuhzüchterin folgt dir.
|
||||
Lion has been raised!=Löwe wurde aufgezogen!
|
||||
Lion Trainer stands still.=Löwentrainer wartet.
|
||||
Lion Trainer will follow you.=Löwentrainer folgt dir.
|
||||
Lion Trainer=Löwentrainer
|
||||
NPC dropped you an item for gold!=NPC hat einen Gegenstand für Gold gegeben!
|
||||
Dancer will dance!=Tänzerin wird tanzen!
|
||||
Dancer will follow you.=Tänzerin wir dir folgen.
|
||||
Female Dancer=Tänzerin
|
||||
Cannibal stands still.=Kannibale wartet.
|
||||
Cannibal will follow you.=Kannibale folgt dir.
|
||||
Loyal Cannibal=Loyaler Kannibale
|
||||
Dancer will dance!=Tänzer wird tanzen!
|
||||
Dancer will follow you.=Tänzer folgt dir.
|
||||
Male Dancer=Tänzer
|
||||
Bag full of toads!=Sack voller Kröten!
|
||||
Exploding Toad stands still.=Explodierende Kröte wartet.
|
||||
Exploding Toad will follow you.=Explodierende Kröte folgt dir.
|
||||
Loot Chest=Beutetruhe
|
||||
@@ -0,0 +1,55 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_node("nativevillages:lootchest", {
|
||||
description = S("Loot Chest"),
|
||||
tiles = {
|
||||
"default_chest_top.png",
|
||||
"default_chest_top.png",
|
||||
"default_chest_side.png",
|
||||
"default_chest_side.png",
|
||||
"default_chest_side.png",
|
||||
"default_chest_front.png"
|
||||
},
|
||||
groups = {wood = 1, choppy = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
drop = {
|
||||
max_items = 35,
|
||||
items = {
|
||||
{items = {"default:iron_lump"}, rarity = 5},
|
||||
{items = {"default:apple"}, rarity = 5},
|
||||
{items = {"farming:bread"}, rarity = 6},
|
||||
{items = {"default:book"}, rarity = 8},
|
||||
{items = {"default:coal_lump"}, rarity = 6},
|
||||
{items = {"farming:cotton"}, rarity = 6},
|
||||
{items = {"bucket:bucket_empty"}, rarity = 10},
|
||||
{items = {"default:paper"}, rarity = 8},
|
||||
{items = {"farming:string"}, rarity = 8},
|
||||
{items = {"farming:seed_wheat"}, rarity = 10},
|
||||
{items = {"default:obsidian_shard"}, rarity = 20},
|
||||
{items = {"default:stick"}, rarity = 6},
|
||||
{items = {"default:torch"}, rarity = 8},
|
||||
{items = {"farming:seed_cotton"}, rarity = 9},
|
||||
{items = {"people:dogfood"}, rarity = 12},
|
||||
{items = {"people:firsaidkit"}, rarity = 12},
|
||||
{items = {"farming:beans"}, rarity = 7},
|
||||
{items = {"farming:corn_cob"}, rarity = 7},
|
||||
{items = {"farming:potato"}, rarity = 7},
|
||||
{items = {"farming:soy_pod"}, rarity = 10},
|
||||
{items = {"farming:tomato"}, rarity = 10},
|
||||
{items = {"farming:sugar"}, rarity = 7},
|
||||
{items = {"farming:salt"}, rarity = 7},
|
||||
{items = {"farming:turkish_delight"}, rarity = 15},
|
||||
{items = {"farming:donut"}, rarity = 15},
|
||||
{items = {"farming:porridge"}, rarity = 15},
|
||||
{items = {"farming:apple_pie"}, rarity = 15},
|
||||
{items = {"farming:pasta"}, rarity = 15},
|
||||
{items = {"farming:bibimbap"}, rarity = 15},
|
||||
{items = {"farming:burger"}, rarity = 15},
|
||||
{items = {"farming:potato_omelet"}, rarity = 15},
|
||||
{items = {"farming:paella"}, rarity = 15},
|
||||
{items = {"default:flint"}, rarity = 15},
|
||||
{items = {"farming:rice"}, rarity = 15},
|
||||
{items = {"default:chest"}}
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1 @@
|
||||
name = nativevillages
|
||||
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.
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.
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.
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.
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.
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.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,136 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_node("nativevillages:savannathrone", {
|
||||
description = S"Savanna Throne",
|
||||
visual_scale = 1,
|
||||
mesh = "Savannathrone.b3d",
|
||||
tiles = {"texturesavannathrone.png"},
|
||||
inventory_image = "asavannathrone.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
walkable = false,
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:bronzeblock",
|
||||
recipe = "nativevillages:savannathrone",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:savannavessels", {
|
||||
description = S"Savanna Vessels",
|
||||
visual_scale = 1,
|
||||
mesh = "Savannavessels.b3d",
|
||||
tiles = {"texturesavannavessels.png"},
|
||||
inventory_image = "asavannavessels.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:bronzeblock",
|
||||
recipe = "nativevillages:savannavessels",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:savannavshrine", {
|
||||
description = S"Savanna Shrine",
|
||||
visual_scale = 1,
|
||||
mesh = "Savannashrine.b3d",
|
||||
tiles = {"texturesavannashrine.png"},
|
||||
inventory_image = "asavannashrine.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
walkable = false,
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
--[[{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:bronzeblock",
|
||||
recipe = "nativevillages:savannashrine",
|
||||
})
|
||||
|
||||
minetest.register_node("nativevillages:savannacorpse", {
|
||||
description = S"Savanna Corpse",
|
||||
visual_scale = 1,
|
||||
mesh = "Savannacorpse.b3d",
|
||||
tiles = {"texturesavannacorpse.png"},
|
||||
inventory_image = "asavannacorpse.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1, -0.5, -0.5, 0.5, 0.1, 1.3},
|
||||
--[[{-1, -0.5, -0.5, 0.5, 0.1, 1.3},
|
||||
{-1, -0.5, -0.5, 0.5, 0.1, 1.3}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1, -0.5, -0.5, 0.5, 0.1, 1.3}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mobs:meat",
|
||||
recipe = "nativevillages:savannacorpse",
|
||||
})
|
||||
@@ -0,0 +1,129 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:savannahouse1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"savanna"},
|
||||
y_max = 15.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/savannahouse1_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:savannahouse2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"savanna"},
|
||||
y_max = 15.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/savannahouse2_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:savannahouse3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"savanna"},
|
||||
y_max = 15.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/savannahouse3_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:savannawitchhouse",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00003,
|
||||
biomes = {"savanna"},
|
||||
y_max = 15.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/savannawitchhouse_30_0.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:savannawell",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00003,
|
||||
biomes = {"savanna"},
|
||||
y_max = 15.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/savannawell_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:savannastable",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00003,
|
||||
biomes = {"savanna"},
|
||||
y_max = 15.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/savannastable_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:savannapond",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00003,
|
||||
biomes = {"savanna"},
|
||||
y_max = 15.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/savannapond_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "nativevillages:savannalogs",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
place_offset_y = -29,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00003,
|
||||
biomes = {"savanna"},
|
||||
y_max = 15.5,
|
||||
y_min = 10.5,
|
||||
schematic = minetest.get_modpath("nativevillages").."/schematics/savannalogs_30_180.mts",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,868 @@
|
||||
local S = minetest.get_translator("nativevillages")
|
||||
|
||||
mobs:register_mob("nativevillages:malelion", {
|
||||
stepheight = 1,
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 10,
|
||||
hp_min = 45,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Lionmale.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturelionmale.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "nativevillages_lion2",
|
||||
random = "nativevillages_lion",
|
||||
damage = "nativevillages_lion4",
|
||||
death = "nativevillages_lion3",
|
||||
distance = 10,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "nativevillages_lion2",
|
||||
random = "nativevillages_lion",
|
||||
damage = "nativevillages_lion4",
|
||||
death = "nativevillages_lion3",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = false,
|
||||
jump_height = 2,
|
||||
stay_near = {{"nativevillages:savannacorpse"}, 4},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fear_height = 4,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
die_start = 300,
|
||||
die_end = 400,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
|
||||
follow = {
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
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, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:malelion",
|
||||
neighbors = {"nativevillages:savannacorpse"},
|
||||
nodes = {"default:dry_dirt_with_dry_grass"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 10,
|
||||
max_height = 50,
|
||||
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:malelion", S("Male Lion"), "amalelion.png")
|
||||
|
||||
mobs:register_mob("nativevillages:femalelion", {
|
||||
stepheight = 1,
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 7,
|
||||
hp_min = 45,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Lionfemale.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturelionfemale.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "nativevillages_lion2",
|
||||
random = "nativevillages_lion",
|
||||
damage = "nativevillages_lion4",
|
||||
death = "nativevillages_lion3",
|
||||
distance = 10,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 4,
|
||||
runaway = false,
|
||||
jump = false,
|
||||
jump_height = 2,
|
||||
stay_near = {{"nativevillages:savannacorpse"}, 4},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fear_height = 4,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
die_start = 300,
|
||||
die_end = 400,
|
||||
die_speed = 50,
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
|
||||
follow = {
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
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, 15, 25, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:femalelion",
|
||||
neighbors = {"nativevillages:savannacorpse"},
|
||||
nodes = {"default:dry_dirt_with_dry_grass"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 10,
|
||||
max_height = 50,
|
||||
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:femalelion", S("Female Lion"), "afemalelion.png")
|
||||
|
||||
mobs.savannadoctor_drops = {
|
||||
"nativevillages:zombietame"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:savannadoctor", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
range = 4,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 40,
|
||||
hp_max = 70,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Savannadoctor.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturesavannadoctor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_witchdoctor",
|
||||
attack = "nativevillages_witchdoctor2",
|
||||
damage = "nativevillages_savannamale4",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
stay_near = {{"nativevillages:savannavshrine"}, 4},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
die_start = 300,
|
||||
die_end = 400,
|
||||
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, 0, 15, 25, 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.savannadoctor_drops
|
||||
if item:get_name() == "people:warriorgrave" or item:get_name() == "people:doctorgrave" or item:get_name() == "people:minergrave" or item:get_name() == "people:farmergrave" or item:get_name() == "people:villagergrave" or item:get_name() == "people:instructorgrave" or item:get_name() == "people:smithgrave" 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.savannadoctor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Witch Doctor created a tame Zombie!"))
|
||||
|
||||
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("Witch Doctor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Witch Doctor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:savannadoctor",
|
||||
nodes = {"default:dry_dirt_with_dry_grass", "default:clay"},
|
||||
neighbors = {"nativevillages:savannavshrine"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:savannadoctor", S("Witch Doctor"), "asavannadoctor.png")
|
||||
|
||||
mobs.savannaqueen_drops = {
|
||||
"default:goldblock"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:savannaqueen", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 50,
|
||||
hp_max = 100,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Savannaqueen.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturesavannaqueen.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_savannafemale",
|
||||
attack = "nativevillages_savannafemale3",
|
||||
damage = "nativevillages_savannafemale4",
|
||||
death = "nativevillages_savannafemale2",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
stay_near = {{"nativevillages:savannavshrine", "nativevillages:savannathrone", "nativevillages:savannavessels"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.savannaqueen_drops
|
||||
if item:get_name() == "default:diamond" 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.savannaqueen_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Royalty dropped you an item for gold!"))
|
||||
|
||||
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("Royalty stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Royalty will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:savannaqueen",
|
||||
nodes = {"default:dry_dirt_with_dry_grass", "default:clay"},
|
||||
neighbors = {"nativevillages:savannathrone"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:savannaqueen", S("Savanna Queen"), "asavannaqueen.png")
|
||||
|
||||
mobs.savannamale_drops = {
|
||||
"farming:vanilla", "farming:pumpkin", "farming:potato", "farming:pineapple", "farming:pepper", "farming:onion", "farming:peas", "farming:melon", "farming:cucumber", "farming:coffee_beans"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:savannamale", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 40,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Savannamale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturesavannamale.png"},
|
||||
{"texturesavannamale2.png"},
|
||||
{"texturesavannamale3.png"},
|
||||
{"texturesavannamale4.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_savannamale",
|
||||
attack = "nativevillages_savannamale3",
|
||||
damage = "nativevillages_savannamale4",
|
||||
death = "nativevillages_savannamale2",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
stay_near = {{"nativevillages:savannavshrine", "nativevillages:savannathrone", "nativevillages:savannavessels"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.savannamale_drops
|
||||
if item:get_name() == "nativevillages:pearl" 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.savannamale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Savanna Villager dropped you an item for a pearl!"))
|
||||
|
||||
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("Savanna Villager stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Savanna Villager will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:savannamale",
|
||||
nodes = {"default:dry_dirt_with_dry_grass", "default:clay"},
|
||||
neighbors = {"nativevillages:savannavessels"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:savannamale", S("Male Savanna Villager"), "asavannamale.png")
|
||||
|
||||
mobs.savannaking_drops = {
|
||||
"default:goldblock"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:savannaking", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 50,
|
||||
hp_max = 120,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Savannaking.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturesavannaking.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_savannamale",
|
||||
attack = "nativevillages_savannamale3",
|
||||
damage = "nativevillages_savannamale4",
|
||||
death = "nativevillages_savannamale2",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
stay_near = {{"nativevillages:savannavshrine", "nativevillages:savannathrone", "nativevillages:savannavessels"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.savannaking_drops
|
||||
if item:get_name() == "default:diamond" 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.savannaking_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Royalty dropped you an item for gold!"))
|
||||
|
||||
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("Royalty stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Royalty will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:savannaking",
|
||||
nodes = {"default:dry_dirt_with_dry_grass", "default:clay"},
|
||||
neighbors = {"nativevillages:savannathrone"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 1,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:savannaking", S("Savanna King"), "asavannaking.png")
|
||||
|
||||
mobs.savannafemale_drops = {
|
||||
"farming:vanilla", "farming:pumpkin", "farming:potato", "farming:pineapple", "farming:pepper", "farming:onion", "farming:peas", "farming:melon", "farming:cucumber", "farming:coffee_beans"
|
||||
}
|
||||
|
||||
mobs:register_mob("nativevillages:savannafemale", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Savannafemale.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturesavannafemale.png"},
|
||||
{"texturesavannafemale2.png"},
|
||||
{"texturesavannafemale3.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "nativevillages_savannafemale",
|
||||
attack = "nativevillages_savannafemale3",
|
||||
damage = "nativevillages_savannafemale4",
|
||||
death = "nativevillages_savannafemale2",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
walk_chance = 15,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
stay_near = {{"nativevillages:savannavshrine", "nativevillages:savannathrone", "nativevillages:savannavessels"}, 5},
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_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, 0, 15, 25, 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.savannafemale_drops
|
||||
if item:get_name() == "nativevillages:pearl" 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.savannafemale_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Savanna Villager dropped you an item for a pearl!"))
|
||||
|
||||
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("Savanna Villager stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Savanna Villager will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_nativevillages then
|
||||
mobs:spawn({
|
||||
name = "nativevillages:savannafemale",
|
||||
nodes = {"default:dry_dirt_with_dry_grass", "default:clay"},
|
||||
neighbors = {"nativevillages:savannavessels"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
active_object_count = 2,
|
||||
chance = 1, -- 15000
|
||||
min_height = 0,
|
||||
max_height = 120,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("nativevillages:savannafemale", S("Female Savanna Villager"), "asavannafemale.png")
|
||||
|
||||
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user