Fix a handful of broken animations #868
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a few of the remaining broken animations, and does so in a way that should be relatively future-proof. It hooks into the getMinU method instead of requiring renderers to mark IIcons dirty. Unfortunately this means that it requires a thread local stack, but I haven't noticed a performance hit at all. The thread local is only accessed when a chunk is rebuilt, so even if it's a slight performance hit, it shouldn't be noticeable.
In-world modded liquids are still broken, but I can't be bothered to figure out why since no one looks at them anyways.
Here's a spark profile from me spamming f3 + a. It didn't capture any of the worker threads, but I didn't notice any obvious slowdowns or memory leaks.
https://spark.lucko.me/pkwQWC2Sfr
These gifs loop very poorly, but that's from the recording software I used. In game the animations are fine.
Some fixed animations (catalyst housing & soul fire) + sanity test:

Fixed controller animations (they were so slow they were unnoticeable):

