Feed sheep 5 times with wheat to tame

master
BlockMen 2015-10-09 10:59:12 +02:00
parent 265cd6a554
commit 73ac56cc15
1 changed files with 7 additions and 0 deletions

View File

@ -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
@ -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
}