fix(turtle-utils): getMatureCrop implementation

This commit is contained in:
Guillaume ARM 2024-05-19 17:14:07 +02:00
parent 1438db9973
commit e20c7fd073

View File

@ -128,16 +128,14 @@ end
turtleUtils.getMatureCrop = function(inspectFn)
inspectFn = inspectFn or turtle.inspect
return function()
local isBlock, block = inspectFn()
local blockStateAge = block and block.state and block.state.age
local isBlock, block = inspectFn()
local blockStateAge = block and block.state and block.state.age
if blockStateAge == 7 then
return block.name
end
return nil
if blockStateAge == 7 then
return block.name
end
return nil
end
turtleUtils.selectFirstEmptySlot = function()