ravneravn

Compare down

Aug 3rd, 2021
792
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local BLACKLISTED_ITEMS = {
  2.   "minecraft:cobbelstone",
  3.   "minecraft:sand",
  4.   "minecraft:gravel",
  5.   "minecraft:grass_block",
  6.   "minecraft:stone",
  7.   "minecraft:dirt",
  8.   "minecraft:cobbelstone",
  9.   "minecraft:diorite",
  10.   "minecraft:bedrock",
  11.   "minecraft:granite",
  12. }
  13.  
  14.  
  15. local function compareDown()
  16.   local isMatch = false
  17.   local has_block, block = turtle.inspectDown()
  18.   if has_block then
  19.     for i = 1, #BLACKLISTED_ITEMS do
  20.       if BLACKLISTED_ITEMS[i] == block.name then
  21.         isMatch = true
  22.         print("BLACKLISTED: "..block.name.. " = "..BLACKLISTED_ITEMS[i])
  23.       else
  24.         print("WHITELISTED: "..block.name.. " = "..BLACKLISTED_ITEMS[i])
  25.         turtle.digDown()
  26.         bot.valuable = bot.valuable +1
  27.       end
  28.     end
  29.   end
  30. end
  31.  
  32.  
  33. compareDown()
RAW Paste Data