Skip to content
This repository has been archived by the owner on Dec 14, 2019. It is now read-only.

Commit

Permalink
Feed sheep 5 times with wheat to tame
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockMen committed Oct 9, 2015
1 parent 265cd6a commit 73ac56c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sheep/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ local def = {
self.target = clicker
self.mode = "follow"
self.modetimer = 0
if not self.tamed then
self.fed_cnt = (self.fed_cnt or 0) + 1
end
-- play eat sound?
item:take_item()
elseif name == "creatures:shears" and self.has_wool then
Expand All @@ -182,6 +185,10 @@ local def = {
self.regrow_wool = nil
self.object:set_properties({textures = {"creatures_sheep.png"}})
end
if self.fed_cnt and self.fed_cnt > 4 then
self.tamed = true
self.fed_cnt = nil
end
end
}

Expand Down

0 comments on commit 73ac56c

Please sign in to comment.