Update 'Turtle/Wheat.lua'
This commit is contained in:
parent
71e4a2b6b2
commit
f0e0650089
@ -23,5 +23,21 @@ end
|
|||||||
|
|
||||||
function Wheat:getPlantable(update)
|
function Wheat:getPlantable(update)
|
||||||
self:assertInvUpdate(update)
|
self:assertInvUpdate(update)
|
||||||
|
for i = 1, 16 do
|
||||||
|
if(self:isPlantable(i, false)) then
|
||||||
|
return i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function Wheat:selectPlantable(update)
|
||||||
|
self:assertInvUpdate(update)
|
||||||
|
local slot = self:getPlantable(false)
|
||||||
|
if(slot == false) then
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
turtle.select(slot)
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
Loading…
x
Reference in New Issue
Block a user