aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-09-03 09:15:15 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-09-03 09:15:15 +0100
commitcdbc98dedd1db9ed6efbfe5964f71dc953dd92e4 (patch)
tree8b436b737f9368d09b792f74139fb9da017e30b4
parent59e3dcdaad9bf74a564b099824ca71ad8df37659 (diff)
downloadmob_horse-cdbc98dedd1db9ed6efbfe5964f71dc953dd92e4.tar.gz
mob_horse-cdbc98dedd1db9ed6efbfe5964f71dc953dd92e4.tar.bz2
mob_horse-cdbc98dedd1db9ed6efbfe5964f71dc953dd92e4.zip
added forgotten protection rune check (thanks to Adadov)
-rw-r--r--init.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 165c158..73923cf 100644
--- a/init.lua
+++ b/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