1.7.10 compatibility

This commit is contained in:
kepler155c
2018-03-07 22:43:50 -05:00
parent b970aa047e
commit 37d3264999
2 changed files with 13 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ function Adapter.wrap(args)
'chestAdapter18',
-- adapters for version 1.7
--'meAdapter',
'meAdapter',
'chestAdapter',
}

View File

@@ -224,6 +224,18 @@ function MEAdapter:provide(item, count, slot, direction)
end)
end
function MEAdapter:eject(item, qty, direction)
if not _G.turtle then
error('Only a turtle can eject')
end
local s, m = pcall(function()
self:provide(item, qty)
_G.turtle.emptyInventory()
end)
return s, m
end
function MEAdapter:insert(slot, count)
local s, m = pcall(function() self.pullItem(self.direction, slot, count) end)
if not s and m then