Skip to content

Instantly share code, notes, and snippets.

-- Smart Tree Farm
-- Slot 1: Saplings
-- Slots 2-16: Fuel + logs
-- Only dumps when inventory is full
local SAPLING_SLOT = 1
local MIN_FUEL = 80 -- keep at least 1 log worth of fuel
local DUMP_THRESHOLD = 15 -- inventory slots used before dumping
-- Count how many slots are filled
local mon = peripheral.find("monitor")
if mon then
term.redirect(mon)
mon.setTextScale(0.5) -- smaller = more characters
end
local w, h = term.getSize()
term.setBackgroundColor(colors.black)
term.clear()