forked from mtcontrib/mob_horse
added forgotten protection rune check (thanks to Adadov)
This commit is contained in:
parent
59e3dcdaad
commit
cdbc98dedd
7
init.lua
7
init.lua
@ -7,7 +7,7 @@ mobs:register_mob("mob_horse:horse", {
|
||||
visual_size = {x = 1.20, y = 1.20},
|
||||
mesh = "mobs_horse.x",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
|
||||
animation = {
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 30,
|
||||
stand_start = 25,
|
||||
@ -92,6 +92,11 @@ mobs:register_mob("mob_horse:horse", {
|
||||
return
|
||||
end
|
||||
|
||||
-- applying protection rune
|
||||
if mobs:protect(self, clicker) then
|
||||
return
|
||||
end
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == clicker:get_player_name() then
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user