Advertisement
joacber

Untitled

Dec 12th, 2020 (edited)
1,082
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. local SLOT_COUNT = 16
  2. function getCoal()
  3.     for slot = 1, SLOT_COUNT, 1 do
  4.         local item = turtle.getItemDetail(slot)
  5.         if(item ~= nil) then
  6.             if(item["name"] == "minecraft:coal") then
  7.                 return slot
  8.             end
  9.         end
  10.     end
  11.     return nil
  12. end
  13.  
  14.  
  15. while(true) do
  16.     local slot = getCoal()
  17.     turtle.select(slot)
  18.     turtle.dropDown(8)
  19.     sleep(40)
  20.  
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement