mirror of
https://github.com/Poikilos/mobs.git
synced 2023-10-03 07:28:50 -07:00
Fix more bugs
This commit is contained in:
parent
3d42d1cd8b
commit
0b7ff005d4
3
init.lua
3
init.lua
@ -205,6 +205,7 @@ mobs:register_mob("mobs:sheep", {
|
|||||||
end
|
end
|
||||||
self.food = (self.food or 0) + 1
|
self.food = (self.food or 0) + 1
|
||||||
if self.food >= 8 then
|
if self.food >= 8 then
|
||||||
|
self.food = 0
|
||||||
self.naked = false
|
self.naked = false
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
textures = {"mobs_sheep.png"},
|
textures = {"mobs_sheep.png"},
|
||||||
@ -214,7 +215,7 @@ mobs:register_mob("mobs:sheep", {
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if clicker:get_inventory() then
|
if clicker:get_inventory() and not self.naked then
|
||||||
self.naked = true
|
self.naked = true
|
||||||
if minetest.registered_items["wool:white"] then
|
if minetest.registered_items["wool:white"] then
|
||||||
clicker:get_inventory():add_item("main", ItemStack("wool:white "..math.random(1,3)))
|
clicker:get_inventory():add_item("main", ItemStack("wool:white "..math.random(1,3)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user