Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --theoriginalbit's 1.5.2-1.6.4 compatible function for checking liquid amount
- local function getLiquidAmount(side, tankSide)
- local p = peripheral.wrap(side or "top")
- local getTankInfo = p.getTanks or p.getTankInfo
- local tankInfo = getTankInfo(tankSide or "unknown")
- local _,tank = next(tankInfo)
- return type(tank) == "table" and tank.amount or nil
- end
Advertisement
Add Comment
Please, Sign In to add comment