forked from Mineclonia/Mineclonia
Refactor mobs_mc a bit
This commit is contained in:
parent
cc9b78215a
commit
2c599c4a0e
|
@ -195,8 +195,8 @@ if c("egg") then
|
||||||
}, nil)
|
}, nil)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_mob = function(self, player)
|
hit_mob = function(self, mob)
|
||||||
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
mob:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {},
|
damage_groups = {},
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
|
@ -87,8 +87,8 @@ mobs:register_arrow("mobs_mc:blaze_fireball", {
|
||||||
}, nil)
|
}, nil)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_mob = function(self, player)
|
hit_mob = function(self, mob)
|
||||||
player:punch(self.object, 1.0, {
|
mob:punch(self.object, 1.0, {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy = 5},
|
damage_groups = {fleshy = 5},
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
|
@ -4,35 +4,6 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
local S = minetest.get_translator("mobs_mc")
|
||||||
|
|
||||||
--[[
|
|
||||||
mobs:register_mob("mobs_mc:12enderdragon", {
|
|
||||||
type = "animal",
|
|
||||||
passive = true,
|
|
||||||
runaway = true,
|
|
||||||
stepheight = 1.2,
|
|
||||||
hp_min = 30,
|
|
||||||
hp_max = 60,
|
|
||||||
armor = 150,
|
|
||||||
collisionbox = {-0.35, -0.01, -0.35, 0.35, 2, 0.35},
|
|
||||||
visual = "mesh",
|
|
||||||
mesh = "enderdragon.b3d",
|
|
||||||
textures = {
|
|
||||||
{"enderdragon.png"},
|
|
||||||
},
|
|
||||||
visual_size = {x=1, y=1},
|
|
||||||
walk_velocity = 0.6,
|
|
||||||
run_velocity = 2,
|
|
||||||
jump = true,
|
|
||||||
animation = {
|
|
||||||
speed_normal = 25, speed_run = 50,
|
|
||||||
stand_start = 0, stand_end = 20,
|
|
||||||
walk_start = 0, walk_end = 20,
|
|
||||||
run_start = 0, run_end = 20,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_mc:12enderdragon", "Enderdragon", "enderdragon_inv.png", 0)
|
|
||||||
]]
|
|
||||||
mobs:register_mob("mobs_mc:enderdragon", {
|
mobs:register_mob("mobs_mc:enderdragon", {
|
||||||
type = "monster",
|
type = "monster",
|
||||||
pathfinding = 1,
|
pathfinding = 1,
|
||||||
|
|
|
@ -94,8 +94,8 @@ mobs:register_arrow(":mobs_monster:fireball", {
|
||||||
}, nil)
|
}, nil)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_mob = function(self, player)
|
hit_mob = function(self, mob)
|
||||||
player:punch(self.object, 1.0, {
|
mob: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)
|
||||||
|
|
|
@ -66,8 +66,8 @@ mobs:register_arrow("mobs_mc:shulkerbullet", {
|
||||||
}, nil)
|
}, nil)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_mob = function(self, player)
|
hit_mob = function(self, mob)
|
||||||
player:punch(self.object, 1.0, {
|
mob:punch(self.object, 1.0, {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy = 4},
|
damage_groups = {fleshy = 4},
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
|
@ -87,8 +87,8 @@ mobs:register_arrow(":mobs:potion_arrow", {
|
||||||
}, nil)
|
}, nil)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_mob = function(self, player)
|
hit_mob = function(self, mob)
|
||||||
player:punch(self.object, 1.0, {
|
mob:punch(self.object, 1.0, {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy = 2},
|
damage_groups = {fleshy = 2},
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
Loading…
Reference in New Issue