Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- core = peripheral.find("weakAutomata")
- itemName = "advancedperipherals:weak_automata_core"
- x=0
- successful, message = core.feedSoul("Sheep")
- local function findItemSlot(name)
- for i = 1, 16 do
- local detail = turtle.getItemDetail(i)
- if detail and detail.name == name then
- return i
- end
- end
- end
- if not findItemSlot(itemName) then
- print("no weak automata core found")
- return
- end
- while findItemSlot(itemName) do
- while not successful do
- if core.getOperationCooldown("feedSoul") then
- while core.getOperationCooldown("feedSoul") > 0 do
- print("wait")
- end
- end
- successful, message = core.feedSoul()
- if successful then
- print(successful)
- print(message)
- else
- if x < 1 then
- print(message)
- x=x+1
- end
- if core.lookAtEntity then
- info=core.lookAtEntity()
- file=fs.open("entity","w")
- file.writeLine(textutils.serialise(info))
- file.close()
- -- print("Looking at "..textutils.serialise(info))
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment