Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local block_exists, block_data_table = turtle.inspect()
- if block_exists then
- -- Prints out something like this:
- -- {
- -- name = "minecraft:wheat",
- -- state = { age = 2, },
- -- }
- print(textutils.serialize(block_data_table))
- -- Prints "minecraft:wheat"
- print(data["name"])
- -- Prints 2
- print(textutils.serialize(block_data_table["state"]["age"]))
- else
- print("No block in front of the turtle")
- end
Advertisement
Add Comment
Please, Sign In to add comment