1
0
mirror of https://codeberg.org/tenplus1/mobs_monster.git synced 2024-12-23 01:10:26 +01:00

code tidy

This commit is contained in:
tenplus1 2022-09-27 11:27:47 +01:00
parent 1ee293dae0
commit 84a9b630ce
11 changed files with 188 additions and 183 deletions

View File

@ -29,19 +29,19 @@ mobs:register_mob("mobs_monster:dirt_monster", {
mesh = "mobs_stone_monster.b3d", mesh = "mobs_stone_monster.b3d",
textures = { textures = {
{"mobs_dirt_monster.png"}, {"mobs_dirt_monster.png"},
{"mobs_dirt_monster2.png"}, {"mobs_dirt_monster2.png"}
}, },
blood_texture = "default_dirt.png", blood_texture = "default_dirt.png",
makes_footstep_sound = true, makes_footstep_sound = true,
sounds = { sounds = {
random = "mobs_dirtmonster", random = "mobs_dirtmonster"
}, },
view_range = 15, view_range = 15,
walk_velocity = 1, walk_velocity = 1,
run_velocity = 3, run_velocity = 3,
jump = true, jump = true,
drops = { drops = {
{name = "default:dirt", chance = 1, min = 0, max = 2}, {name = "default:dirt", chance = 1, min = 0, max = 2}
}, },
water_damage = 1, water_damage = 1,
lava_damage = 5, lava_damage = 5,
@ -57,7 +57,7 @@ mobs:register_mob("mobs_monster:dirt_monster", {
run_start = 40, run_start = 40,
run_end = 63, run_end = 63,
punch_start = 40, punch_start = 40,
punch_end = 63, punch_end = 63
}, },
-- check surrounding nodes and spawn a specific monster -- check surrounding nodes and spawn a specific monster
@ -89,16 +89,17 @@ mobs:register_mob("mobs_monster:dirt_monster", {
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:dirt_monster", mobs:spawn({
nodes = {"default:dirt_with_grass", "ethereal:gray_dirt", "ethereal:dry_dirt"}, name = "mobs_monster:dirt_monster",
min_light = 0, nodes = {"default:dirt_with_grass", "ethereal:gray_dirt", "ethereal:dry_dirt"},
max_light = 7, min_light = 0,
chance = 6000, max_light = 7,
active_object_count = 2, chance = 6000,
min_height = 0, active_object_count = 2,
day_toggle = false, min_height = 0,
}) day_toggle = false
})
end end

View File

@ -35,12 +35,12 @@ mobs:register_mob("mobs_monster:dungeon_master", {
textures = { textures = {
{"mobs_dungeon_master.png"}, {"mobs_dungeon_master.png"},
{"mobs_dungeon_master2.png"}, {"mobs_dungeon_master2.png"},
{"mobs_dungeon_master3.png"}, {"mobs_dungeon_master3.png"}
}, },
makes_footstep_sound = true, makes_footstep_sound = true,
sounds = { sounds = {
random = "mobs_dungeonmaster", random = "mobs_dungeonmaster",
shoot_attack = "mobs_fireball", shoot_attack = "mobs_fireball"
}, },
walk_velocity = 1, walk_velocity = 1,
run_velocity = 3, run_velocity = 3,
@ -51,7 +51,7 @@ mobs:register_mob("mobs_monster:dungeon_master", {
{name = "mobs:leather", chance = 2, min = 0, max = 2}, {name = "mobs:leather", chance = 2, min = 0, max = 2},
{name = "default:mese_crystal", chance = 3, min = 0, max = 2}, {name = "default:mese_crystal", chance = 3, min = 0, max = 2},
{name = "default:diamond", chance = 4, min = 0, max = 1}, {name = "default:diamond", chance = 4, min = 0, max = 1},
{name = "default:diamondblock", chance = 30, min = 0, max = 1}, {name = "default:diamondblock", chance = 30, min = 0, max = 1}
}, },
water_damage = 1, water_damage = 1,
lava_damage = 1, lava_damage = 1,
@ -67,7 +67,7 @@ mobs:register_mob("mobs_monster:dungeon_master", {
shoot_start = 36, shoot_start = 36,
shoot_end = 48, shoot_end = 48,
speed_normal = 15, speed_normal = 15,
speed_run = 15, speed_run = 15
}, },
-- check surrounding nodes and spawn a specific monster -- check surrounding nodes and spawn a specific monster
@ -99,14 +99,15 @@ mobs:register_mob("mobs_monster:dungeon_master", {
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:dungeon_master", mobs:spawn({
nodes = {"default:stone", "nether:rack", "nether:rack_deep"}, name = "mobs_monster:dungeon_master",
max_light = 5, nodes = {"default:stone", "nether:rack", "nether:rack_deep"},
chance = 9000, max_light = 5,
active_object_count = 1, chance = 9000,
max_height = -70, active_object_count = 1,
}) max_height = -70
})
end end
@ -149,7 +150,7 @@ mobs:register_arrow("mobs_monster:fireball", {
self.object:set_velocity({ self.object:set_velocity({
x = dir.x * self.velocity, x = dir.x * self.velocity,
y = dir.y * self.velocity, y = dir.y * self.velocity,
z = dir.z * self.velocity, z = dir.z * self.velocity
}) })
end end
end end
@ -159,14 +160,14 @@ mobs:register_arrow("mobs_monster:fireball", {
hit_player = function(self, player) hit_player = function(self, player)
player:punch(self.object, 1.0, { player:punch(self.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = 8}, damage_groups = {fleshy = 8}
}, nil) }, nil)
end, end,
hit_mob = function(self, player) hit_mob = function(self, player)
player:punch(self.object, 1.0, { player:punch(self.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = 8}, damage_groups = {fleshy = 8}
}, nil) }, nil)
end, end,

View File

@ -82,16 +82,17 @@ mobs:register_mob("mobs_monster:fire_spirit", {
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:fire_spirit", mobs:spawn({
nodes = {"default:obsidian", "caverealms:hot_cobble"}, name = "mobs_monster:fire_spirit",
neighbors = {"group:fire"}, nodes = {"default:obsidian", "caverealms:hot_cobble"},
min_light = 12, neighbors = {"group:fire"},
max_light = 15, min_light = 12,
chance = 1500, max_light = 15,
active_object_count = 1, chance = 1500,
max_height = -150 active_object_count = 1,
}) max_height = -150
})
end end

View File

@ -2,8 +2,6 @@
-- Load support for intllib. -- Load support for intllib.
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/" local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
local S
-- Check for translation method -- Check for translation method
local S local S
if minetest.get_translator ~= nil then if minetest.get_translator ~= nil then
@ -12,11 +10,10 @@ else
if minetest.get_modpath("intllib") then if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua") dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then if intllib.make_gettext_pair then
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method S = intllib.make_gettext_pair() -- new gettext method
else else
gettext = intllib.Getter() -- old text file method S = intllib.Getter() -- old text file method
end end
S = gettext
else -- boilerplate function else -- boilerplate function
S = function(str, ...) S = function(str, ...)
local args = {...} local args = {...}
@ -61,7 +58,9 @@ end
-- Lucky Blocks -- Lucky Blocks
dofile(path .. "lucky_block.lua") if minetest.get_modpath("lucky_block") then
dofile(path .. "lucky_block.lua")
end
print ("[MOD] Mobs Redo Monsters loaded") print ("[MOD] Mobs Redo Monsters loaded")

View File

@ -1,42 +1,37 @@
local web = {name = "mobs:cobweb"}
local web_trap = {
size = {x = 3, y = 3, z = 3},
data = {
web, web, web,
web, web, web,
web, web, web,
if minetest.get_modpath("lucky_block") then web, web, web,
web, web, web,
web, web, web,
local web = {name = "mobs:cobweb"} web, web, web,
local web_trap = { web, web, web,
size = {x = 3, y = 3, z = 3}, web, web, web
data = {
web, web, web,
web, web, web,
web, web, web,
web, web, web,
web, web, web,
web, web, web,
web, web, web,
web, web, web,
web, web, web,
},
} }
}
lucky_block:add_schematics({ lucky_block:add_schematics({
{"webtrap", web_trap, {x = 1, y = 0, z = 1}}, {"webtrap", web_trap, {x = 1, y = 0, z = 1}},
}) })
lucky_block:add_blocks({ lucky_block:add_blocks({
{"sch", "webtrap", 1, true}, {"sch", "webtrap", 1, true},
{"spw", "mobs:dungeon_master", 1, nil, nil, 3, "Billy"}, {"spw", "mobs:dungeon_master", 1, nil, nil, 3, "Billy"},
{"spw", "mobs:sand_monster", 3}, {"spw", "mobs:sand_monster", 3},
{"spw", "mobs:stone_monster", 3, nil, nil, 3, "Bob"}, {"spw", "mobs:stone_monster", 3, nil, nil, 3, "Bob"},
{"spw", "mobs:dirt_monster", 3}, {"spw", "mobs:dirt_monster", 3},
{"spw", "mobs:tree_monster", 3}, {"spw", "mobs:tree_monster", 3},
{"spw", "mobs:oerkki", 3}, {"spw", "mobs:oerkki", 3},
{"exp"}, {"exp"},
{"spw", "mobs:spider", 5}, {"spw", "mobs:spider", 5},
{"spw", "mobs:mese_monster", 2}, {"spw", "mobs:mese_monster", 2},
{"spw", "mobs:lava_flan", 3}, {"spw", "mobs:lava_flan", 3},
{"nod", "default:chest", 0, { {"nod", "default:chest", 0, {
{name = "mobs:lava_orb", max = 1}}}, {name = "mobs:lava_orb", max = 1}}},
}) })
end

View File

@ -144,9 +144,9 @@ mobs:register_mob("mobs_monster:mese_monster", {
shoot_interval = 0.5, shoot_interval = 0.5,
arrow = "mobs_monster:mese_arrow", arrow = "mobs_monster:mese_arrow",
shoot_offset = 0.75, shoot_offset = 0.75,
--arrow_override = function(self) -- arrow_override = function(self)
-- self.velocity = 20 -- self.velocity = 20
--end, -- end,
knock_back = true, knock_back = true,
hp_min = 10, hp_min = 10,
hp_max = 25, hp_max = 25,
@ -296,14 +296,14 @@ mobs:register_arrow("mobs_monster:mese_arrow", {
hit_player = function(self, player) hit_player = function(self, player)
player:punch(self.object, 1.0, { player:punch(self.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}, damage_groups = {fleshy = self.damage}
}, nil) }, nil)
end, end,
hit_mob = function(self, player) hit_mob = function(self, player)
player:punch(self.object, 1.0, { player:punch(self.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}, damage_groups = {fleshy = self.damage}
}, nil) }, nil)
end, end,
@ -313,14 +313,15 @@ mobs:register_arrow("mobs_monster:mese_arrow", {
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:mese_monster", mobs:spawn({
nodes = {"default:stone"}, name = "mobs_monster:mese_monster",
max_light = 7, nodes = {"default:stone"},
chance = 5000, max_light = 7,
active_object_count = 1, chance = 5000,
max_height = -20 active_object_count = 1,
}) max_height = -20
})
end end

View File

@ -19,11 +19,11 @@ mobs:register_mob("mobs_monster:oerkki", {
textures = { textures = {
{"mobs_oerkki.png"}, {"mobs_oerkki.png"},
{"mobs_oerkki2.png"}, {"mobs_oerkki2.png"},
{"mobs_oerkki3.png"}, {"mobs_oerkki3.png"}
}, },
makes_footstep_sound = false, makes_footstep_sound = false,
sounds = { sounds = {
random = "mobs_oerkki", random = "mobs_oerkki"
}, },
walk_velocity = 1, walk_velocity = 1,
run_velocity = 3, run_velocity = 3,
@ -31,7 +31,7 @@ mobs:register_mob("mobs_monster:oerkki", {
jump = true, jump = true,
drops = { drops = {
{name = "default:obsidian", chance = 3, min = 0, max = 2}, {name = "default:obsidian", chance = 3, min = 0, max = 2},
{name = "default:gold_lump", chance = 2, min = 0, max = 2}, {name = "default:gold_lump", chance = 2, min = 0, max = 2}
}, },
water_damage = 2, water_damage = 2,
lava_damage = 4, lava_damage = 4,
@ -47,7 +47,7 @@ mobs:register_mob("mobs_monster:oerkki", {
punch_start = 37, punch_start = 37,
punch_end = 49, punch_end = 49,
speed_normal = 15, speed_normal = 15,
speed_run = 15, speed_run = 15
}, },
replace_rate = 5, replace_rate = 5,
replace_what = {"default:torch"}, replace_what = {"default:torch"},
@ -55,19 +55,20 @@ mobs:register_mob("mobs_monster:oerkki", {
replace_offset = -1, replace_offset = -1,
immune_to = { immune_to = {
{"default:sword_wood", 0}, -- no damage {"default:sword_wood", 0}, -- no damage
{"default:gold_lump", -10}, -- heals by 10 points {"default:gold_lump", -10} -- heals by 10 points
}, },
}) })
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:oerkki", mobs:spawn({
nodes = {"default:stone"}, name = "mobs_monster:oerkki",
max_light = 7, nodes = {"default:stone"},
chance = 7000, max_light = 7,
max_height = -10, chance = 7000,
}) max_height = -10
})
end end

View File

@ -2,8 +2,7 @@
local S = mobs.intllib_monster local S = mobs.intllib_monster
-- custom particle effects -- custom particle effects
local effect = function( local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)
pos, amount, texture, min_size, max_size, radius, gravity, glow)
radius = radius or 2 radius = radius or 2
min_size = min_size or 0.5 min_size = min_size or 0.5
@ -25,7 +24,7 @@ local effect = function(
minsize = min_size, minsize = min_size,
maxsize = max_size, maxsize = max_size,
texture = texture, texture = texture,
glow = glow, glow = glow
}) })
end end
@ -49,20 +48,20 @@ mobs:register_mob("mobs_monster:sand_monster", {
mesh = "mobs_sand_monster.b3d", mesh = "mobs_sand_monster.b3d",
textures = { textures = {
{"mobs_sand_monster.png"}, {"mobs_sand_monster.png"},
{"mobs_sand_monster2.png"}, {"mobs_sand_monster2.png"}
}, },
blood_texture = "default_desert_sand.png", blood_texture = "default_desert_sand.png",
makes_footstep_sound = true, makes_footstep_sound = true,
sounds = { sounds = {
random = "mobs_sandmonster", random = "mobs_sandmonster"
}, },
walk_velocity = 1.5, walk_velocity = 1.5,
run_velocity = 4, run_velocity = 4,
view_range = 8, --15 view_range = 8,
jump = true, jump = true,
floats = 0, floats = 0,
drops = { drops = {
{name = "default:desert_sand", chance = 1, min = 3, max = 5}, {name = "default:desert_sand", chance = 1, min = 3, max = 5}
}, },
water_damage = 3, water_damage = 3,
lava_damage = 4, lava_damage = 4,
@ -78,7 +77,7 @@ mobs:register_mob("mobs_monster:sand_monster", {
run_start = 74, run_start = 74,
run_end = 105, run_end = 105,
punch_start = 74, punch_start = 74,
punch_end = 105, punch_end = 105
}, },
immune_to = { immune_to = {
{"default:shovel_wood", 3}, -- shovels deal more damage to sand monster {"default:shovel_wood", 3}, -- shovels deal more damage to sand monster
@ -86,7 +85,7 @@ mobs:register_mob("mobs_monster:sand_monster", {
{"default:shovel_bronze", 4}, {"default:shovel_bronze", 4},
{"default:shovel_steel", 4}, {"default:shovel_steel", 4},
{"default:shovel_mese", 5}, {"default:shovel_mese", 5},
{"default:shovel_diamond", 7}, {"default:shovel_diamond", 7}
}, },
--[[ --[[
custom_attack = function(self, p) custom_attack = function(self, p)
@ -118,17 +117,19 @@ mobs:register_mob("mobs_monster:sand_monster", {
}) })
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:sand_monster", mobs:spawn({
nodes = {"default:desert_sand"}, name = "mobs_monster:sand_monster",
chance = 7000, nodes = {"default:desert_sand"},
active_object_count = 2, chance = 7000,
min_height = 0, active_object_count = 2,
}) min_height = 0
})
end end
mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1) mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"),
"default_desert_sand.png", 1)
mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") -- compatibility mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") -- compatibility

View File

@ -74,12 +74,12 @@ mobs:register_mob("mobs_monster:spider", {
{"mobs_spider_orange.png"}, {"mobs_spider_orange.png"},
{"mobs_spider_snowy.png"}, {"mobs_spider_snowy.png"},
{"mobs_spider_grey.png"}, {"mobs_spider_grey.png"},
{"mobs_spider_crystal.png"}, {"mobs_spider_crystal.png"}
}, },
makes_footstep_sound = false, makes_footstep_sound = false,
sounds = { sounds = {
random = "mobs_spider", random = "mobs_spider",
attack = "mobs_spider", attack = "mobs_spider"
}, },
walk_velocity = 1, walk_velocity = 1,
run_velocity = 3, run_velocity = 3,
@ -87,7 +87,7 @@ mobs:register_mob("mobs_monster:spider", {
view_range = 15, view_range = 15,
floats = 0, floats = 0,
drops = { drops = {
{name = "farming:string", chance = 1, min = 0, max = 2}, {name = "farming:string", chance = 1, min = 0, max = 2}
}, },
water_damage = 5, water_damage = 5,
lava_damage = 5, lava_damage = 5,
@ -102,7 +102,7 @@ mobs:register_mob("mobs_monster:spider", {
run_start = 1, run_start = 1,
run_end = 21, run_end = 21,
punch_start = 25, punch_start = 25,
punch_end = 45, punch_end = 45
}, },
-- check surrounding nodes and spawn a specific spider -- check surrounding nodes and spawn a specific spider
@ -224,32 +224,33 @@ mobs:register_mob("mobs_monster:spider", {
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
-- above ground spawn
mobs:spawn({
name = "mobs_monster:spider",
nodes = {
"default:dirt_with_rainforest_litter", "default:snowblock",
"default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
},
min_light = 0,
max_light = 8,
chance = 7000,
active_object_count = 1,
min_height = 25,
max_height = 31000,
})
-- below ground spawn -- above ground spawn
mobs:spawn({ mobs:spawn({
name = "mobs_monster:spider", name = "mobs_monster:spider",
nodes = {"default:stone_with_mese", "default:mese", "default:stone"}, nodes = {
min_light = 0, "default:dirt_with_rainforest_litter", "default:snowblock",
max_light = 7, "default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
chance = 7000, },
active_object_count = 1, min_light = 0,
min_height = -31000, max_light = 8,
max_height = -40, chance = 7000,
}) active_object_count = 1,
min_height = 25,
max_height = 31000
})
-- below ground spawn
mobs:spawn({
name = "mobs_monster:spider",
nodes = {"default:stone_with_mese", "default:mese", "default:stone"},
min_light = 0,
max_light = 7,
chance = 7000,
active_object_count = 1,
min_height = -31000,
max_height = -40
})
end end
@ -286,13 +287,15 @@ minetest.register_craft({
recipe = { recipe = {
{"farming:string", "", "farming:string"}, {"farming:string", "", "farming:string"},
{"", "farming:string", ""}, {"", "farming:string", ""},
{"farming:string", "", "farming:string"}, {"farming:string", "", "farming:string"}
} }
}) })
local web_place = function(pos) local web_place = function(pos)
if minetest.find_node_near(pos, 1, {"ignore"}) then return end
local pos2 = minetest.find_node_near(pos, 1, {"air", "group:leaves"}, true) local pos2 = minetest.find_node_near(pos, 1, {"air", "group:leaves"}, true)
if pos2 then if pos2 then
@ -316,7 +319,7 @@ mobs:register_arrow("mobs_monster:cobweb", {
player:punch(self.object, 1.0, { player:punch(self.object, 1.0, {
full_punch_interval = 2.0, full_punch_interval = 2.0,
damage_groups = {fleshy = 3}, damage_groups = {fleshy = 3}
}, nil) }, nil)
web_place(self.object:get_pos()) web_place(self.object:get_pos())
@ -330,7 +333,7 @@ mobs:register_arrow("mobs_monster:cobweb", {
player:punch(self.object, 1.0, { player:punch(self.object, 1.0, {
full_punch_interval = 2.0, full_punch_interval = 2.0,
damage_groups = {fleshy = 3}, damage_groups = {fleshy = 3}
}, nil) }, nil)
end end
}) })

View File

@ -31,11 +31,11 @@ mobs:register_mob("mobs_monster:stone_monster", {
mesh = "mobs_stone_monster.b3d", mesh = "mobs_stone_monster.b3d",
textures = { textures = {
{"mobs_stone_monster.png"}, {"mobs_stone_monster.png"},
{"mobs_stone_monster2.png"}, -- by AMMOnym {"mobs_stone_monster2.png"} -- by AMMOnym
}, },
makes_footstep_sound = true, makes_footstep_sound = true,
sounds = { sounds = {
random = "mobs_stonemonster", random = "mobs_stonemonster"
}, },
walk_velocity = 1, walk_velocity = 1,
run_velocity = 2, run_velocity = 2,
@ -61,7 +61,7 @@ mobs:register_mob("mobs_monster:stone_monster", {
run_start = 40, run_start = 40,
run_end = 63, run_end = 63,
punch_start = 40, punch_start = 40,
punch_end = 63, punch_end = 63
}, },
immune_to = { immune_to = {
{"default:pick_wood", 0}, -- wooden pick doesnt hurt stone monster {"default:pick_wood", 0}, -- wooden pick doesnt hurt stone monster
@ -69,7 +69,7 @@ mobs:register_mob("mobs_monster:stone_monster", {
{"default:pick_bronze", 5}, {"default:pick_bronze", 5},
{"default:pick_steel", 5}, {"default:pick_steel", 5},
{"default:pick_mese", 6}, {"default:pick_mese", 6},
{"default:pick_diamond", 7}, {"default:pick_diamond", 7}
}, },
-- check surrounding nodes and spawn a specific spider -- check surrounding nodes and spawn a specific spider
@ -101,13 +101,14 @@ mobs:register_mob("mobs_monster:stone_monster", {
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:stone_monster", mobs:spawn({
nodes = {"default:stone", "default:desert_stone", "default:sandstone"}, name = "mobs_monster:stone_monster",
max_light = 7, nodes = {"default:stone", "default:desert_stone", "default:sandstone"},
chance = 7000, max_light = 7,
max_height = 0, chance = 7000,
}) max_height = 0
})
end end

View File

@ -9,7 +9,7 @@ local tree_types = {
{name = "default:stick", chance = 1, min = 1, max = 3}, {name = "default:stick", chance = 1, min = 1, max = 3},
{name = "ethereal:sakura_leaves", chance = 1, min = 1, max = 2}, {name = "ethereal:sakura_leaves", chance = 1, min = 1, max = 2},
{name = "ethereal:sakura_trunk", chance = 2, 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}, {name = "ethereal:sakura_tree_sapling", chance = 2, min = 0, max = 2}
} }
}, },
@ -19,7 +19,7 @@ local tree_types = {
{name = "default:stick", chance = 1, min = 1, max = 3}, {name = "default:stick", chance = 1, min = 1, max = 3},
{name = "ethereal:frost_leaves", chance = 1, min = 1, max = 2}, {name = "ethereal:frost_leaves", chance = 1, min = 1, max = 2},
{name = "ethereal:frost_tree", chance = 2, min = 1, max = 2}, {name = "ethereal:frost_tree", chance = 2, min = 1, max = 2},
{name = "ethereal:crystal_spike", chance = 4, min = 0, max = 2}, {name = "ethereal:crystal_spike", chance = 4, min = 0, max = 2}
} }
}, },
@ -29,7 +29,7 @@ local tree_types = {
{name = "default:stick", chance = 1, min = 1, max = 3}, {name = "default:stick", chance = 1, min = 1, max = 3},
{name = "ethereal:yellowleaves", chance = 1, min = 1, max = 2}, {name = "ethereal:yellowleaves", chance = 1, min = 1, max = 2},
{name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, max = 2}, {name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, max = 2},
{name = "ethereal:golden_apple", chance = 3, min = 0, max = 2}, {name = "ethereal:golden_apple", chance = 3, min = 0, max = 2}
} }
}, },
@ -41,7 +41,7 @@ local tree_types = {
{name = "default:coal_lump", chance = 3, min = 0, max = 3} {name = "default:coal_lump", chance = 3, min = 0, max = 3}
}, },
explode = true explode = true
}, }
} }
@ -63,12 +63,12 @@ mobs:register_mob("mobs_monster:tree_monster", {
mesh = "mobs_tree_monster.b3d", mesh = "mobs_tree_monster.b3d",
textures = { textures = {
{"mobs_tree_monster.png"}, {"mobs_tree_monster.png"},
{"mobs_tree_monster2.png"}, {"mobs_tree_monster2.png"}
}, },
blood_texture = "default_wood.png", blood_texture = "default_wood.png",
makes_footstep_sound = true, makes_footstep_sound = true,
sounds = { sounds = {
random = "mobs_treemonster", random = "mobs_treemonster"
}, },
walk_velocity = 1, walk_velocity = 1,
run_velocity = 3, run_velocity = 3,
@ -78,7 +78,7 @@ mobs:register_mob("mobs_monster:tree_monster", {
{name = "default:stick", chance = 1, min = 0, max = 2}, {name = "default:stick", chance = 1, min = 0, max = 2},
{name = "default:sapling", chance = 2, min = 0, max = 2}, {name = "default:sapling", chance = 2, min = 0, max = 2},
{name = "default:junglesapling", chance = 3, min = 0, max = 2}, {name = "default:junglesapling", chance = 3, min = 0, max = 2},
{name = "default:apple", chance = 4, min = 1, max = 2}, {name = "default:apple", chance = 4, min = 1, max = 2}
}, },
water_damage = 0, water_damage = 0,
lava_damage = 0, lava_damage = 0,
@ -105,7 +105,7 @@ mobs:register_mob("mobs_monster:tree_monster", {
run_start = 48, run_start = 48,
run_end = 62, run_end = 62,
punch_start = 48, punch_start = 48,
punch_end = 62, punch_end = 62
}, },
-- check surrounding nodes and spawn a specific tree monster -- check surrounding nodes and spawn a specific tree monster
@ -158,14 +158,15 @@ mobs:register_mob("mobs_monster:tree_monster", {
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:tree_monster", mobs:spawn({
nodes = {"group:leaves"}, --{"default:leaves", "default:jungleleaves"}, name = "mobs_monster:tree_monster",
max_light = 7, nodes = {"group:leaves"},
chance = 7000, max_light = 7,
min_height = 0, chance = 7000,
day_toggle = false, min_height = 0,
}) day_toggle = false
})
end end