summaryrefslogtreecommitdiff
path: root/bunny.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-04-27 14:00:57 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-04-27 14:00:57 +0100
commit8deab4025606e2469dc6d28b141abfe586531d70 (patch)
tree8fe7cf6e120124e36f2afc86466f2fb75adbeb2c /bunny.lua
parent7eb3bcb7f9d1bb83c0f76ef2728af07d25add52c (diff)
protect/capture returns added
Diffstat (limited to 'bunny.lua')
-rw-r--r--bunny.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/bunny.lua b/bunny.lua
index 1c882cd..66867ea 100644
--- a/bunny.lua
+++ b/bunny.lua
@@ -50,9 +50,9 @@ mobs:register_mob("mobs_animal:bunny", {
on_rightclick = function(self, clicker)
-- feed or tame
- if mobs:feed_tame(self, clicker, 4, true, true) then
- return
- end
+ if mobs:feed_tame(self, clicker, 4, true, true) then return end
+ if mobs:protect(self, clicker) then return end
+ if mobs:capture_mob(self, clicker, 30, 50, 80, false, nil) then return end
-- Monty Python tribute
local item = clicker:get_wielded_item()
@@ -73,9 +73,6 @@ mobs:register_mob("mobs_animal:bunny", {
return
end
-
- mobs:protect(self, clicker)
- mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
end,
attack_type = "dogfight",