Closed CCheukKa closed 2 months ago
I am very glad to hear someone wanted to tackle this problem - I'll give it a look!
Tested it out - logic makes a lot of sense! prevents needing to do a bunch of raycasts on blocks we expect to be valid as well, which is great.
Thanks!
Happy to contribute to a mod that I love :)
Fixes #40. This fix should drastically reduce the number of false negatives by exploring random offset points over a few ticks for the raycast. Theoretically, it should also give a slight performance boost since the random raycasts are only done when necessary (the old offset point becomes obstructed).
A slight caveat is that the time necessary to register the blocks is proportional to the exposed screenspace surface area. Empirically, this is <20 ticks for the worst cases. Scenarios that the original method could have taken care of incur no extra time penalties.