mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2024-12-22 08:50:27 +01:00
add additional tree monster types for ethereal trees
This commit is contained in:
parent
b1a94c5abc
commit
05ccc87150
@ -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 = {
|
||||
|
BIN
textures/mobs_oerkki3.png
Normal file
BIN
textures/mobs_oerkki3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/mobs_tree_monster3.png
Normal file
BIN
textures/mobs_tree_monster3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/mobs_tree_monster4.png
Normal file
BIN
textures/mobs_tree_monster4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/mobs_tree_monster5.png
Normal file
BIN
textures/mobs_tree_monster5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
@ -1,6 +1,39 @@
|
||||
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user