1
0
mirror of https://codeberg.org/tenplus1/mobs_monster.git synced 2025-07-04 17:30:21 +02: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

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