Fix removing of wheat

pull/4/head
PilzAdam 2013-05-26 23:35:41 +02:00
parent 853e981992
commit 3d42d1cd8b
1 changed files with 2 additions and 1 deletions

View File

@ -192,15 +192,16 @@ mobs:register_mob("mobs:sheep", {
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if item:get_name() == "farming:wheat" then
clicker:set_wielded_item(item)
if not self.tamed then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.tamed = true
elseif self.naked then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.food = (self.food or 0) + 1
if self.food >= 8 then