Advertisement
MigasRocha

MysticalAgriculture "Crafter ItemCounter"/Computer ID:28

Dec 26th, 2024
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | Gaming | 0 0
  1. while true do
  2.    
  3. sleep(0.1)
  4.    
  5.     crafter = peripheral.wrap("left")
  6.     items = crafter.list()
  7.     totalCount = 0
  8.        
  9.         for slot, item in pairs(items) do
  10.             totalCount = totalCount + (item.count or 0)
  11.         end
  12.  
  13.         if totalCount >= 500 then
  14.         redstone.setOutput("back", true)
  15.         else
  16.         redstone.setOutput("back", false)
  17.         end
  18. end  
  19.    
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement