Mods update

master
daretmavi 2021-03-03 23:39:58 +01:00
parent dae04b113e
commit 35f0cbc617
37 changed files with 688 additions and 51 deletions

View File

@ -63,8 +63,9 @@ function read(stream)
if mantissa == 0 then
return sign * math.huge
end
-- TODO differentiate quiet and signalling NaN as well as positive and negative
return 0/0
-- Differentiating quiet and signalling nan is not possible in Lua, hence we don't have to do it
-- HACK ((0/0)^1) yields nan, 0/0 yields -nan
return sign == 1 and ((0/0)^1) or 0/0
end
if exponent == 0 then
-- subnormal value

View File

@ -292,7 +292,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
mobkit.clear_queue_low(pet)
petz.ownthing(pet)
elseif fields.btn_alight then
petz.alight(pet)
petz.alight(pet, 0, "stand")
elseif fields.btn_fly then
mobkit.clear_queue_low(pet)
mobkit.clear_queue_high(pet)

View File

@ -60,11 +60,11 @@ petz.follow = function(self, player)
end
end
petz.alight = function(self)
petz.alight = function(self, prty, end_status)
mobkit.clear_queue_low(self)
mobkit.clear_queue_high(self)
if not(petz.node_name_in(self, "below") == "air") then
mobkit.animate(self, "fly")
end
petz.hq_alight(self, 0)
petz.hq_alight(self, prty, end_status)
end

View File

@ -183,7 +183,7 @@ petz.init_lay_eggs = function(self)
if self.eggs_count > 0 then
return
end
petz.alight(self)
petz.alight(self, 0, "stand")
minetest.after(10.0, function()
if not(mobkit.is_alive(self)) then
return

View File

@ -68,7 +68,7 @@ petz.milk_refill = function(self)
end
petz.milk_milk = function(self, clicker)
if not self.is_male then
if self.is_male then
minetest.chat_send_player(clicker:get_player_name(), S("Milk only female animals!"))
return
end

View File

@ -59,4 +59,46 @@ if minetest.get_modpath("hunger_ng") ~= nil then
hunger_ng.add_hunger_data('petz:candy_cane', {
satiates = 6.0,
})
hunger_ng.add_hunger_data('petz:beef', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:roasted_ducky', {
satiates = 3.0,
})
hunger_ng.add_hunger_data('petz:roasted_rabbit', {
satiates = 3.0,
})
hunger_ng.add_hunger_data('petz:roasted_goat_meat', {
satiates = 4.0,
})
hunger_ng.add_hunger_data('petz:raw_rabbit', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:frog_leg', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:honey_bottle', {
satiates = 7.0,
})
hunger_ng.add_hunger_data('petz:mini_lamb_chop', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:raw_chicken', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:raw_ducky', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:raw_goat', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:raw_parrot', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:raw_porkchop', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:chicken_legs', {
satiates = 1.0,
})
end

View File

@ -504,7 +504,24 @@ minetest.register_craft({
--Halloween Update
minetest.register_node("petz:jack_o_lantern", {
if minetest.get_modpath("farming") ~= nil and farming.mod == "redo" then
minetest.register_alias("petz:jack_o_lantern", "farming:jackolantern")
minetest.register_craft({
type = "shapeless",
output = "petz:jack_o_lantern",
recipe = {"farming:pumpkin", "petz:beeswax_candle"},
})
minetest.register_craft({
type = "shapeless",
output = "petz:jack_o_lantern",
recipe = {"farming:pumpkin", "default:torch"},
})
else
minetest.register_node("petz:jack_o_lantern", {
description = S("Jack-o'-lantern"),
groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2 },
sounds = default.node_sound_wood_defaults({
@ -520,19 +537,8 @@ minetest.register_node("petz:jack_o_lantern", {
"petz_jackolantern_right.png", "petz_jackolantern_left.png",
"petz_jackolantern_back.png", "petz_jackolantern_front.png"
},
})
if minetest.get_modpath("farming") ~= nil and farming.mod == "redo" then
minetest.register_craft({
type = "shapeless",
output = "petz:jack_o_lantern",
recipe = {"farming:pumpkin", "petz:beeswax_candle"},
})
minetest.register_craft({
type = "shapeless",
output = "petz:jack_o_lantern",
recipe = {"farming:pumpkin", "default:torch"},
})
})
end
if minetest.get_modpath("crops") ~= nil then

View File

@ -169,7 +169,7 @@ end
-- Alight Behaviour ( 2 funtions: HQ & LQ)
--
function petz.hq_alight(self, prty)
function petz.hq_alight(self, prty, end_status)
local func = function()
local node_name = petz.node_name_in(self, "below")
if node_name == "air" then
@ -179,9 +179,9 @@ function petz.hq_alight(self, prty)
return true
else
--minetest.chat_send_player("singleplayer", "on ground")
mobkit.animate(self, "stand")
mobkit.animate(self, end_status)
mobkit.lq_idle(self, 2400)
self.status = "stand"
self.status = end_status
return true
end
end

View File

@ -0,0 +1,213 @@
-- 1. FLYING MOBS BRAIN
--
function petz.herbivore_brain(self)
local pos = self.object:get_pos()
local die = false
mobkit.vitals(self)
if self.hp <= 0 then
die = true
elseif not(petz.is_night()) and self.die_at_daylight then --it dies when sun rises up
if pos then
local node_light = minetest.get_node_light(pos, minetest.get_timeofday())
if node_light and self.max_daylight_level then
if node_light >= self.max_daylight_level then
die = true
end
end
end
end
if die then
petz.on_die(self)
return
end
--no gravity
self.object:set_acceleration({x=0, y=0, z=0})
petz.check_ground_suffocation(self, pos)
if mobkit.timer(self, 1) then
local prty = mobkit.get_queue_priority(self)
if prty < 30 then
petz.env_damage(self, pos, 30) --enviromental damage: lava, fire...
end
if prty < 25 then
if self.driver then
petz.hq_mountdriver(self, 25)
return
end
end
if prty < 20 then
if self.isinliquid and not self.can_swin then
petz.hq_liquid_recovery_flying(self, 20)
end
end
local player = mobkit.get_nearby_player(self)
--if player then petz.move_head(self, player:get_pos()) end
--Runaway from predator
if prty < 18 then
if petz.bh_runaway_from_predator(self, pos) then
return
end
end
--Follow Behaviour
if prty < 16 then
if petz.bh_start_follow(self, pos, player, 16) then
return
end
end
if prty == 16 then
if petz.bh_stop_follow(self, player) then
return
end
end
-- hunt a prey (another congener)
if prty < 12 and self.aggressive then
petz.bh_hunt(self, 12, true)
end
--Baby petz follow their parents
if prty < 10 then
if petz.settings.parent_search and self.parents then
if mobkit.timer(self, 5) then --each 5 seconds search for parents
petz.follow_parents(self, pos)
end
end
end
--if prty < 7 and self.type == "moth" and mobkit.is_queue_empty_high(self) then --search for a squareball
--local pos_torch_near = minetest.find_node_near(pos, self.view_range, "default:torch")
--if pos_torch_near then
--mobkit.hq_approach_torch(self, 7, pos_torch_near)
--return
--end
--end
if prty < 8 then
if (self.can_jump) and not(self.status) then
local random_number = math.random(1, self.jump_ratio)
if random_number == 1 then
--minetest.chat_send_player("singleplayer", "jump")
mobkit.clear_queue_high(self)
petz.hq_terrestial_jump(self, 8)
end
end
end
--Poop
if prty < 7 then
petz.poop(self, pos)
end
--Replace nodes by others
if prty < 6 then
petz.bh_replace(self)
end
if prty < 5 then
petz.bh_breed(self, pos)
end
--Herding
if prty < 4.5 and petz.settings.herding then
if mobkit.timer(self, petz.settings.herding_timing) then
if petz.bh_herding(self, pos, player) then
return
end
end
end
--search for a petz:pet_bowl or a bale
if prty < 4 and self.tamed then
local view_range = self.view_range
local nearby_nodes = minetest.find_nodes_in_area(
{x = pos.x - view_range, y = pos.y - 1, z = pos.z - view_range},
{x = pos.x + view_range, y = pos.y + 1, z = pos.z + view_range},
{"group:feeder"})
if #nearby_nodes >= 1 then
local tpos = nearby_nodes[1] --the first match
local distance = vector.distance(pos, tpos)
if distance > 3.0 then
mobkit.hq_goto(self, 4, tpos)
elseif distance <= 3.0 then
if petz.settings.tamagochi_mode and not(self.fed) then
petz.do_feed(self)
if self.eat_hay then
local node = minetest.get_node_or_nil(tpos)
if node and node.name == "bale:bale" then
minetest.remove_node(tpos)
mokapi.make_sound("pos", tpos, "petz_replace", 5 or mokapi.consts.DEFAULT_MAX_HEAR_DISTANCE)
end
end
end
end
end
end
--if prty < 5 and self.type == "puppy" and self.tamed == true and self.square_ball_attached == false then --search for a squareball
--local object_list = minetest.get_objects_inside_radius(self.object:get_pos(), 10)
--for i = 1,#object_list do
--local obj = object_list[i]
--local ent = obj:get_luaentity()
--if ent and ent.name == "__builtin:item" then
--minetest.chat_send_player("singleplayer", ent.itemstring)
--local spos = self.object:get_pos()
--local tpos = obj:get_pos()
--if vector.distance(spos, tpos) > 2 then
--if tpos then
--mobkit.hq_goto(self, 5, tpos)
--end
--else
--local meta = ent:get_meta()
--local shooter_name = meta:get_string("shooter_name")
--petz.attach_squareball(ent, self, self.object, nil)
--end
--end
--end
--end
--end
-- Default Random Sound
mokapi.make_misc_sound(self, petz.settings.misc_sound_chance, petz.settings.max_hear_distance)
if prty < 3 then
if self.is_arboreal then
if petz.bh_climb(self, pos, 3) then
return
end
end
end
if prty < 2 then --Sleep Behaviour
petz.bh_sleep(self, 2)
end
--Look_at Behaviour
if prty < 1 and player then
if petz.bh_look_at(self, player:get_pos(), 1) then
return
end
end
--Roam default
if mobkit.is_queue_empty_high(self) and not(self.status) then
petz.hq_wanderfly(self, 0)
end
end
end

View File

@ -0,0 +1,213 @@
-- 1. FLYING MOBS BRAIN
--
function petz.flying_brain(self)
local pos = self.object:get_pos()
local die = false
mobkit.vitals(self)
if self.hp <= 0 then
die = true
elseif not(petz.is_night()) and self.die_at_daylight then --it dies when sun rises up
if pos then
local node_light = minetest.get_node_light(pos, minetest.get_timeofday())
if node_light and self.max_daylight_level then
if node_light >= self.max_daylight_level then
die = true
end
end
end
end
if die then
petz.on_die(self)
return
end
--no gravity
self.object:set_acceleration({x=0, y=0, z=0})
petz.check_ground_suffocation(self, pos)
if mobkit.timer(self, 1) then
local prty = mobkit.get_queue_priority(self)
if prty < 30 then
petz.env_damage(self, pos, 30) --enviromental damage: lava, fire...
end
if prty < 25 then
if self.driver then
petz.hq_mountdriver(self, 25)
return
end
end
if prty < 20 then
if self.isinliquid and not self.can_swin then
petz.hq_liquid_recovery_flying(self, 20)
end
end
local player = mobkit.get_nearby_player(self)
--if player then petz.move_head(self, player:get_pos()) end
--Runaway from predator
if prty < 18 then
if petz.bh_runaway_from_predator(self, pos) then
return
end
end
--Follow Behaviour
if prty < 16 then
if petz.bh_start_follow(self, pos, player, 16) then
return
end
end
if prty == 16 then
if petz.bh_stop_follow(self, player) then
return
end
end
-- hunt a prey (another congener)
if prty < 12 and self.aggressive then
petz.bh_hunt(self, 12, true)
end
--Baby petz follow their parents
if prty < 10 then
if petz.settings.parent_search and self.parents then
if mobkit.timer(self, 5) then --each 5 seconds search for parents
petz.follow_parents(self, pos)
end
end
end
--if prty < 7 and self.type == "moth" and mobkit.is_queue_empty_high(self) then --search for a squareball
--local pos_torch_near = minetest.find_node_near(pos, self.view_range, "default:torch")
--if pos_torch_near then
--mobkit.hq_approach_torch(self, 7, pos_torch_near)
--return
--end
--end
if prty < 8 then
if (self.can_jump) and not(self.status) then
local random_number = math.random(1, self.jump_ratio)
if random_number == 1 then
--minetest.chat_send_player("singleplayer", "jump")
mobkit.clear_queue_high(self)
petz.hq_terrestial_jump(self, 8)
end
end
end
--Poop
if prty < 7 then
petz.poop(self, pos)
end
--Replace nodes by others
if prty < 6 then
petz.bh_replace(self)
end
if prty < 5 then
petz.bh_breed(self, pos)
end
--Herding
if prty < 4.5 and petz.settings.herding then
if mobkit.timer(self, petz.settings.herding_timing) then
if petz.bh_herding(self, pos, player) then
return
end
end
end
--search for a petz:pet_bowl or a bale
if prty < 4 and self.tamed then
local view_range = self.view_range
local nearby_nodes = minetest.find_nodes_in_area(
{x = pos.x - view_range, y = pos.y - 1, z = pos.z - view_range},
{x = pos.x + view_range, y = pos.y + 1, z = pos.z + view_range},
{"group:feeder"})
if #nearby_nodes >= 1 then
local tpos = nearby_nodes[1] --the first match
local distance = vector.distance(pos, tpos)
if distance > 3.0 then
mobkit.hq_goto(self, 4, tpos)
elseif distance <= 3.0 then
if petz.settings.tamagochi_mode and not(self.fed) then
petz.do_feed(self)
if self.eat_hay then
local node = minetest.get_node_or_nil(tpos)
if node and node.name == "bale:bale" then
minetest.remove_node(tpos)
mokapi.make_sound("pos", tpos, "petz_replace", 5 or mokapi.consts.DEFAULT_MAX_HEAR_DISTANCE)
end
end
end
end
end
end
--if prty < 5 and self.type == "puppy" and self.tamed == true and self.square_ball_attached == false then --search for a squareball
--local object_list = minetest.get_objects_inside_radius(self.object:get_pos(), 10)
--for i = 1,#object_list do
--local obj = object_list[i]
--local ent = obj:get_luaentity()
--if ent and ent.name == "__builtin:item" then
--minetest.chat_send_player("singleplayer", ent.itemstring)
--local spos = self.object:get_pos()
--local tpos = obj:get_pos()
--if vector.distance(spos, tpos) > 2 then
--if tpos then
--mobkit.hq_goto(self, 5, tpos)
--end
--else
--local meta = ent:get_meta()
--local shooter_name = meta:get_string("shooter_name")
--petz.attach_squareball(ent, self, self.object, nil)
--end
--end
--end
--end
--end
-- Default Random Sound
mokapi.make_misc_sound(self, petz.settings.misc_sound_chance, petz.settings.max_hear_distance)
if prty < 3 then
if self.is_arboreal then
if petz.bh_climb(self, pos, 3) then
return
end
end
end
if prty < 2 then --Sleep Behaviour
petz.bh_sleep(self, 2)
end
--Look_at Behaviour
if prty < 1 and player then
if petz.bh_look_at(self, player:get_pos(), 1) then
return
end
end
--Roam default
if mobkit.is_queue_empty_high(self) and not(self.status) then
petz.hq_wanderfly(self, 0)
end
end
end

View File

@ -1,4 +1,4 @@
-- 1. HERBIBORE/FLYING MOBS BRAIN
-- 1. HERBIBORE MOBS BRAIN
--
function petz.herbivore_brain(self)
@ -27,7 +27,8 @@ function petz.herbivore_brain(self)
return
end
if self.can_fly or self.status == "climb" then
--no gravity
if self.status == "climb" then
self.object:set_acceleration({x=0, y=0, z=0})
end
@ -50,11 +51,7 @@ function petz.herbivore_brain(self)
if prty < 20 then
if self.isinliquid then
if not self.can_fly then
mobkit.hq_liquid_recovery(self, 20)
else
petz.hq_liquid_recovery_flying(self, 20)
end
mobkit.hq_liquid_recovery(self, 20)
return
end
end
@ -85,7 +82,7 @@ function petz.herbivore_brain(self)
--Runaway from Player
if prty < 14 then
if not(self.can_fly) and not(self.tamed) then --if no tamed
if not(self.tamed) then --if no tamed
if player then
local player_pos = player:get_pos()
local wielded_item_name = player:get_wielded_item():get_name()
@ -226,11 +223,7 @@ function petz.herbivore_brain(self)
--Roam default
if mobkit.is_queue_empty_high(self) and not(self.status) then
if not(self.can_fly) then
mobkit.hq_roam(self, 0)
else
petz.hq_wanderfly(self, 0)
end
mobkit.hq_roam(self, 0)
end
end

View File

@ -25,3 +25,4 @@ assert(loadfile(modpath .. "/mobkit/br_predator.lua"))()
assert(loadfile(modpath .. "/mobkit/br_semiaquatic.lua"))()
assert(loadfile(modpath .. "/mobkit/helper_functions.lua"))()
assert(loadfile(modpath .. "/mobkit/bh_head.lua"))()
assert(loadfile(modpath .. "/mobkit/br_flying.lua"))()

View File

@ -54,7 +54,7 @@ minetest.register_entity("petz:"..pet_name,{
stand_fly={range={x=0, y=6}, speed=25, loop=true},
},
logic = petz.herbivore_brain,
logic = petz.flying_brain,
on_activate = function(self, staticdata, dtime_s) --on_activate, required
mobkit.actfunc(self, staticdata, dtime_s)

View File

@ -65,7 +65,7 @@ minetest.register_entity("petz:"..pet_name,{
moaning = "petz_moth_moaning",
},
logic = petz.herbivore_brain,
logic = petz.flying_brain,
on_activate = function(self, staticdata, dtime_s) --on_activate, required
mobkit.actfunc(self, staticdata, dtime_s)

View File

@ -65,7 +65,7 @@ minetest.register_entity("petz:"..pet_name,{
moaning = "petz_parrot_moaning",
},
logic = petz.herbivore_brain,
logic = petz.flying_brain,
on_activate = function(self, staticdata, dtime_s) --on_activate, required
mobkit.actfunc(self, staticdata, dtime_s)

View File

@ -65,7 +65,7 @@ minetest.register_entity("petz:"..pet_name,{
moaning = "petz_pigeon_moaning",
},
logic = petz.herbivore_brain,
logic = petz.flying_brain,
on_activate = function(self, staticdata, dtime_s) --on_activate, required
mobkit.actfunc(self, staticdata, dtime_s)

View File

@ -64,7 +64,7 @@ minetest.register_entity("petz:"..pet_name,{
moaning = "petz_toucan_moaning",
},
logic = petz.herbivore_brain,
logic = petz.flying_brain,
on_activate = function(self, staticdata, dtime_s) --on_activate, required
mobkit.actfunc(self, staticdata, dtime_s)

View File

@ -60,7 +60,7 @@ mobs:register_mob("mobs_monster:dirt_monster", {
punch_end = 63,
},
-- check surrounding nodes and spawn a specific spider
-- check surrounding nodes and spawn a specific monster
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1

View File

@ -16,8 +16,8 @@ mobs:register_mob("mobs_monster:dungeon_master", {
shoot_interval = 2.2,
arrow = "mobs_monster:fireball",
shoot_offset = 1,
hp_min = 22,
hp_max = 45,
hp_min = 42,
hp_max = 75,
armor = 60,
collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
visual = "mesh",

View File

@ -28,6 +28,7 @@ dofile(path .. "tree_monster.lua")
dofile(path .. "lava_flan.lua") -- Zeg9
dofile(path .. "mese_monster.lua")
dofile(path .. "spider.lua") -- AspireMint
dofile(path .. "land_guard.lua")
-- Load custom spawning

View File

@ -0,0 +1,127 @@
local S = mobs.intllib
local guard_types = {
{ nodes = {
"default:snow", "default:snowblock", "default:ice",
"default:dirt_with_snow"
},
skins = {"mobs_land_guard6.png", "mobs_land_guard7.png", "mobs_land_guard8.png"},
drops = {
{name = "default:ice", chance = 1, min = 1, max = 4},
{name = "mobs:leather", chance = 2, min = 0, max = 2},
{name = "default:diamond", chance = 4, min = 0, max = 2},
},
},
{ nodes = {
"ethereal:dry_dirt", "default:sand", "default:desert_sand",
"default:dry_dirt_with_dry_grass", "default:dry_dirt"
},
skins = {"mobs_land_guard4.png", "mobs_land_guard5.png"},
drops = {
{name = "default:sandstone", chance = 1, min = 1, max = 4},
{name = "mobs:leather", chance = 2, min = 0, max = 2},
{name = "default:mese_crystal", chance = 4, min = 0, max = 2},
},
}
}
-- Land Guard
mobs:register_mob("mobs_monster:land_guard", {
type = "monster",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 3,
damage = 15,
hp_min = 30,
hp_max = 65,
armor = 50,
collisionbox = {-0.5, -1.01, -0.5, 0.5, 1.6, 0.5},
visual_size = {x = 1, y = 1},
visual = "mesh",
mesh = "mobs_dungeon_master.b3d",
textures = {
{"mobs_land_guard.png"},
{"mobs_land_guard2.png"},
{"mobs_land_guard3.png"}
},
makes_footstep_sound = true,
sounds = {
random = "mobs_dungeonmaster",
},
walk_velocity = 1.5,
run_velocity = 3.4,
jump = true,
jump_height = 2.0,
floats = 0,
view_range = 15,
drops = {
{name = "mobs:leather", chance = 2, min = 0, max = 2},
{name = "default:mese_crystal", chance = 3, min = 0, max = 2},
{name = "default:diamond", chance = 4, min = 0, max = 1},
},
water_damage = 0,
lava_damage = 6,
light_damage = 0,
fear_height = 8,
animation = {
stand_start = 0,
stand_end = 19,
walk_start = 20,
walk_end = 35,
punch_start = 36,
punch_end = 48,
speed_normal = 15,
speed_run = 20,
},
-- check surrounding nodes and spawn a specific guard
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1
local tmp
for n = 1, #guard_types do
tmp = guard_types[n]
if minetest.find_node_near(pos, 1, tmp.nodes) then
self.base_texture = { tmp.skins[math.random(#tmp.skins)] }
self.object:set_properties({textures = self.base_texture})
self.docile_by_day = tmp.docile
if tmp.drops then
self.drops = tmp.drops
end
return true
end
end
return true -- run only once, false/nil runs every activation
end,
})
if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:land_guard",
nodes = {
"default:snow", "default:ice", "default:stone",
"default:dry_dirt_with_dry_grass", "ethereal:dry_dirt"
},
max_light = 7,
chance = 25000,
min_height = 0,
active_object_count = 1,
})
end
mobs:register_egg("mobs_monster:land_guard", S("Land Guard"), "default_ice.png", 1)

View File

@ -27,7 +27,7 @@ Sand Monster
Spiders
- Snowy spiders are found on higher cold areas, Tarantula's in higher jungle, Cave spider below -20 and Mese spider near areas containing the ore and Crystal spiders only in Ethereal's crystal biomes. Some are docile during the daytime and will drop string when killed.
- Snowy spiders are found on higher cold areas, spitting Tarantula's in higher jungle, small Cave spider below -20 and Mese spider near areas containing the ore and Crystal spiders only in Ethereal's crystal biomes. Some are docile during the daytime and will drop string when killed.
Stone Monster
@ -35,6 +35,10 @@ Stone Monster
Tree Monster
- Found atop tree's at night time they drop down and look for food in the form of players and animals. Can drop saplings and sometimes an apple or three.
- Found atop tree's at night time they drop down and look for food in the form of players and animals. Can drop saplings and sometimes an apple or three depending on type. Also note that green tree creepers exist and sometimes go boom.
Land Guard
- These huge monsters roam the land in cold, hot and temperate areas and don't like players wandering around their domain.
Lucky Blocks: 11

View File

@ -49,6 +49,7 @@ mobs:register_mob("mobs_monster:sand_monster", {
mesh = "mobs_sand_monster.b3d",
textures = {
{"mobs_sand_monster.png"},
{"mobs_sand_monster2.png"},
},
blood_texture = "default_desert_sand.png",
makes_footstep_sound = true,

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

View File

@ -31,7 +31,17 @@ local tree_types = {
{name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, max = 2},
{name = "ethereal:golden_apple", chance = 3, min = 0, max = 2},
}
}
},
{ nodes = {"default:acacia_bush_leaves"},
skins = {"mobs_tree_monster6.png"},
drops = {
{name = "tnt:gunpowder", chance = 1, min = 0, max = 2},
{name = "default:iron_lump", chance = 5, min = 0, max = 2},
{name = "default:coal_lump", chance = 3, min = 0, max = 3}
},
explode = true
},
}
@ -45,8 +55,8 @@ mobs:register_mob("mobs_monster:tree_monster", {
--specific_attack = {"player", "mobs_animal:chicken"},
reach = 2,
damage = 2,
hp_min = 7,
hp_max = 33,
hp_min = 20,
hp_max = 40,
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
visual = "mesh",
@ -98,7 +108,7 @@ mobs:register_mob("mobs_monster:tree_monster", {
punch_end = 62,
},
-- check surrounding nodes and spawn a specific spider
-- check surrounding nodes and spawn a specific tree monster
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1
@ -108,6 +118,8 @@ mobs:register_mob("mobs_monster:tree_monster", {
tmp = tree_types[n]
if tmp.explode and math.random(2) == 1 then return true end
if minetest.find_node_near(pos, 1, tmp.nodes) then
self.base_texture = tmp.skins
@ -117,6 +129,25 @@ mobs:register_mob("mobs_monster:tree_monster", {
self.drops = tmp.drops
end
if tmp.explode then
self.attack_type = "explode"
self.explosion_radius = 3
self.explosion_timer = 3
self.damage = 21
self.reach = 3
self.fear_height = 4
self.water_damage = 2
self.lava_damage = 15
self.light_damage = 0
self.makes_footstep_sound = false
self.runaway_from = {"mobs_animal:kitten"}
self.sounds = {
attack = "tnt_ignite",
explode = "tnt_explode",
fuse = "tnt_ignite"
}
end
return true
end
end

View File

@ -54,3 +54,7 @@ Mod: LessDirt/default
origin https://github.com/Treer/LessDirt.git (fetch)
* master 59d4434 [origin/master] Update forum link in README.md
Mod: LessDirt/default
origin https://github.com/Treer/LessDirt.git (fetch)
* master 59d4434 [origin/master] Update forum link in README.md
Mod: LessDirt/default