bug due to adapter rework
This commit is contained in:
@@ -6,13 +6,11 @@ local turtle = _G.turtle
|
|||||||
local CRAFTING_TABLE = 'minecraft:crafting_table'
|
local CRAFTING_TABLE = 'minecraft:crafting_table'
|
||||||
|
|
||||||
local function clearGrid(inventory)
|
local function clearGrid(inventory)
|
||||||
print('clearing')
|
|
||||||
for i = 1, 16 do
|
for i = 1, 16 do
|
||||||
local count = turtle.getItemCount(i)
|
local count = turtle.getItemCount(i)
|
||||||
if count > 0 then
|
if count > 0 then
|
||||||
inventory:insert(i, count)
|
inventory:insert(i, count)
|
||||||
if turtle.getItemCount(i) ~= 0 then
|
if turtle.getItemCount(i) ~= 0 then
|
||||||
print('failed to insert')
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ local function craftItem(item, qty)
|
|||||||
|
|
||||||
Util.print('Crafting %d %s', (qty or 1), item)
|
Util.print('Crafting %d %s', (qty or 1), item)
|
||||||
success, msg = turtle.craftItem(item, qty or 1, {
|
success, msg = turtle.craftItem(item, qty or 1, {
|
||||||
wrapSide = 'top',
|
side = 'top',
|
||||||
direction = 'down',
|
direction = 'down',
|
||||||
})
|
})
|
||||||
repeat until not turtle.suckUp()
|
repeat until not turtle.suckUp()
|
||||||
|
|||||||
Reference in New Issue
Block a user