Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 1672
- y = 42
- z = -4115
- facing = 0 -- 1 = North, 2 = East, 3 = South, 4 = West
- blacklistedTop = false
- blacklistedFront = false
- function CheckBlacklist()
- local blacklistedBlocks = {"chest", "barrel", "storage"}
- local inspectSuccess, inspectData = turtle.inspect()
- if(inspectSuccess) then
- for i = 1, 2 do
- if(string.match(inspectData.name, blacklistedBlocks[i])) then
- blacklistedFront = true
- end
- end
- end
- local inspectSuccess, inspectData = turtle.inspectUp()
- if(inspectSuccess) then
- for i = 1, 2 do
- if(string.match(inspectData.name, blacklistedBlocks[i])) then
- blacklistedTop = true
- end
- end
- end
- end
- function Reset()
- blacklistedFront = false
- blacklistedTop = false
- end
Add Comment
Please, Sign In to add comment