mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-19 11:59:40 +00:00
Check before casting.
Fixes https://github.com/GTNewHorizons/Angelica/issues/388
This commit is contained in:
1 parent
464af945b2
commit
852bcbb38b
2 files changed
+5
-5
No files matched your search
@@ -21,10 +21,10 @@ public class AnimationsRenderUtils {
|
||||
if (textureAtlasSprite != null && textureAtlasSprite.hasAnimationMetadata()) {
|
||||
// null if called by anything but chunk render cache update (for example to get blocks rendered as items in
|
||||
// inventory)
|
||||
if (blockAccess instanceof ITexturesCache) {
|
||||
((ITexturesCache) blockAccess).getRenderedTextures().add(textureAtlasSprite);
|
||||
} else {
|
||||
((IPatchedTextureAtlasSprite) textureAtlasSprite).markNeedsAnimationUpdate();
|
||||
if (blockAccess instanceof ITexturesCache texturesCache) {
|
||||
texturesCache.getRenderedTextures().add(textureAtlasSprite);
|
||||
} else if(textureAtlasSprite instanceof IPatchedTextureAtlasSprite patchedSprite){
|
||||
patchedSprite.markNeedsAnimationUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user