Skip to content

Instantly share code, notes, and snippets.

@jarrydstan
jarrydstan / woodburner.lua
Last active June 15, 2021 14:12
Transfers wood from chest to furnace
local SLOT_COUNT = 16
function getItemIndex(itemName)
for slot = 1, SLOT_COUNT, 1 do
local item = turtle.getItemDetail(slot)
if(item ~= nil) then
if(string.match(item.name, itemName)) then
return slot
end
end
@jarrydstan
jarrydstan / woodcut.lua
Last active June 16, 2021 02:37
Woodcutting bot for Turtle in Minecraft
local SLOT_COUNT = 16
local d = "north"
function getItemIndex(itemName)
for slot = 1, SLOT_COUNT, 1 do
local item = turtle.getItemDetail(slot)
if(item ~= nil) then
if(string.match(item.name, itemName)) then
return slot
end