This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
marconi's profile picture

Falling Blocks

Started by marconi, 15 November 2017 - 08:27 PM
marconi #1
Posted 15 November 2017 - 09:27 PM
not sure if there's a good answer for this but . . . I have a program called horizon that clears an area length width [height] (horizon 16 16 10). it works from the bottom up in columns. When it detects no more blocks above, it returns to the bottom and digs into the next block in front. It also has routines in it to count falling sand or gravel. That way if it encounters a pocket of gravel it will not assume that there are no more blocks above it, and will continue up until it has checked the counted blocks above.

This worked fine in 1.7. I am now playing 1.12 and falling blocks now break on top of the turtle, rendering the count routine useless. also the broken sand blocks on top of the turtle aren't collected (turtle doesn't suck). any ideas?


pastebin.com/ZVkbPq2L : horizon

you will also need

pastebin.com/YE4R9kXL : functions
SquidDev #2
Posted 16 November 2017 - 08:49 AM
Sadly it doesn't appear this is an issue with Minecraft, and so I'm not sure it can be solved: the implementation of falling sand and gravel was changed between Minecraft 1.7.x and 1.8.x, meaning gravel effectively falls into the turtle and breaks.

With respect to your program, one possibility would be to run turtle.inspectUp() instead of .detectUp(), and determine whether the block is gravel. This won't help you determine a count, but should at least allow you to check whether to go up or not.