summaryrefslogtreecommitdiff
path: root/cow.lua
diff options
context:
space:
mode:
Diffstat (limited to 'cow.lua')
-rw-r--r--cow.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/cow.lua b/cow.lua
index 44ef581..30c71f9 100644
--- a/cow.lua
+++ b/cow.lua
@@ -59,9 +59,9 @@ mobs:register_mob("mobs_animal:cow", {
on_rightclick = function(self, clicker)
-- feed or tame
- if mobs:feed_tame(self, clicker, 8, true, true) then
- return
- end
+ if mobs:feed_tame(self, clicker, 8, true, true) then return end
+ if mobs:protect(self, clicker) then return end
+ if mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) then return end
local tool = clicker:get_wielded_item()
local name = clicker:get_player_name()
@@ -96,9 +96,6 @@ mobs:register_mob("mobs_animal:cow", {
return
end
-
- mobs:protect(self, clicker)
- mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
end,
})