lumien231 / Random-Things

The Random Things Minecraft Mod
69 stars 41 forks source link

Fixed bug where the spectre illuminator caused tile entities to sway #467

Closed Benjamin-L closed 4 years ago

Benjamin-L commented 4 years ago

Previously, when a spectre illuminator was nearby, all tile entities would sway wildly. This starts out not that bad, but get progressively worse over time. My guess is that this was caused by floating point imprecision, since the rotation for the spectre illuminator was reversed, not by using pushMatrix and popMatrix, but by doing another rotation in the opposite direction. Since the angle gets larger over time, the precision gets progressively worse to the point that this no longer restores the previous matrix and causes visible issues. I replaced this with pushMatrix and popMatrix, which fixed the issue.

zperk13 commented 4 years ago

Time in a bottle also seems to be causing this affect but I wouldn't say "wildly".