Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getItemName()
- local arr = {"minecraft:dirt", "minecraft:grass"}
- local item = turtle.getItemDetail()
- if item then
- if item.name == arr[1] or item.name == arr[2] then
- return "blockOfDirt"
- else
- return item.name
- end
- else
- print("Error!")
- end
- end
- function getDownBlockName()
- local arr = {"minecraft:dirt", "minecraft:grass"}
- local success, block = turtle.inspectDown()
- if success then
- if block.name == arr[1] or block.name == arr[2] then
- return "blockOfDirt"
- else
- return block.name
- end
- else
- print("Error!")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement