Commit 05ccc871 authored by tenplus1's avatar tenplus1
Browse files

add additional tree monster types for ethereal trees

parent b1a94c5a
......@@ -20,6 +20,7 @@ mobs:register_mob("mobs_monster:oerkki", {
textures = {
{"mobs_oerkki.png"},
{"mobs_oerkki2.png"},
{"mobs_oerkki3.png"},
},
makes_footstep_sound = false,
sounds = {
......
local S = mobs.intllib
local tree_types = {
{ nodes = {"ethereal:sakura_leaves", "ethereal:sakura_leaves2"},
skins = {"mobs_tree_monster5.png"},
drops = {
{name = "default:stick", chance = 1, min = 1, max = 3},
{name = "ethereal:sakura_leaves", chance = 1, min = 1, max = 2},
{name = "ethereal:sakura_trunk", chance = 2, min = 1, max = 2},
{name = "ethereal:sakura_tree_sapling", chance = 2, min = 0, max = 2},
}
},
{ nodes = {"ethereal:frost_leaves"},
skins = {"mobs_tree_monster3.png"},
drops = {
{name = "default:stick", chance = 1, min = 1, max = 3},
{name = "ethereal:frost_leaves", chance = 1, min = 1, max = 2},
{name = "ethereal:frost_tree", chance = 2, min = 1, max = 2},
{name = "ethereal:crystal_spike", chance = 4, min = 0, max = 2},
}
},
{ nodes = {"ethereal:yellowleaves"},
skins = {"mobs_tree_monster4.png"},
drops = {
{name = "default:stick", chance = 1, min = 1, max = 3},
{name = "ethereal:yellowleaves", chance = 1, min = 1, max = 2},
{name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, max = 2},
{name = "ethereal:golden_apple", chance = 3, min = 0, max = 2},
}
}
}
-- Tree Monster (or Tree Gollum) by PilzAdam
......@@ -64,13 +97,39 @@ mobs:register_mob("mobs_monster:tree_monster", {
punch_start = 48,
punch_end = 62,
},
-- check surrounding nodes and spawn a specific spider
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1
local tmp
for n = 1, #tree_types do
tmp = tree_types[n]
if minetest.find_node_near(pos, 1, tmp.nodes) then
self.base_texture = tmp.skins
self.object:set_properties({textures = tmp.skins})
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:tree_monster",
nodes = {"default:leaves", "default:jungleleaves"},
nodes = {"group:leaves"}, --{"default:leaves", "default:jungleleaves"},
max_light = 7,
chance = 7000,
min_height = 0,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment