Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --@Author: Zach Combs aka TehNoiseBomb
- --@Version: 1.5
- local inputs = {...}
- local seed = ... --variable passed in (inputs)
- --Check the first 15 slots in the turtle's inventory:
- -- Create a variable to store the table returned when getting the details of the item in the selected slot
- -- If the item's unlocalized name is equal to the seed's:
- -- Create an entry in the table named slot and set it to the current slot
- -- Create an entry in the table named count and set it to the number of items in the slot
- -- Create an entry in the table named name and set it to the name of the item in the slot
- -- Create an entry in the table named damage and set it to the damage value of the item in the slot
- -- Return the table
- for i = 1, 15 do
- local seeds = turtle.getItemDetail(i)
- if seeds and seeds.name == seed then
- seeds.slot = i
- return seeds
- end
- end
- --Default route, the code will not reach this point when it finds the slot containing the seeds
- return seeds
Add Comment
Please, Sign In to add comment