03-09-2014, 06:27 AM
Now I see why the pattern shows so much regularity in the cardinal directions, and also some other directions (you can see that in the stone picture much more clearly).
I think you've misunderstood the concept of rays. The point is to cast a bunch of rays and then process whatever they hit. Instead, you create a ray for each block in the range. This skews the chances for the blocks that are on coords that are integer-multiples of other integers relative to the explosion center.
Also, you've created an O(N^3) algorithm (where N is the size of the explosion). However, the rays should be only an O(N^2) algorithm - project them only at the walls of the cube, not the internals. You'll end up with a faster thing and a better looking result
Side note for your code - it doesn't do any blockentity checking, so things like chests and furnaces will break without spilling their items. Whether this is expected behavior or not I leave upon you.
I think you've misunderstood the concept of rays. The point is to cast a bunch of rays and then process whatever they hit. Instead, you create a ray for each block in the range. This skews the chances for the blocks that are on coords that are integer-multiples of other integers relative to the explosion center.
Also, you've created an O(N^3) algorithm (where N is the size of the explosion). However, the rays should be only an O(N^2) algorithm - project them only at the walls of the cube, not the internals. You'll end up with a faster thing and a better looking result
Side note for your code - it doesn't do any blockentity checking, so things like chests and furnaces will break without spilling their items. Whether this is expected behavior or not I leave upon you.