diff --git a/settings.gradle b/settings.gradle index e6d3c1f95..4d3528c2f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -16,5 +16,5 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.14' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.18' } diff --git a/src/main/java/com/gtnewhorizons/angelica/utils/AnimationsRenderUtils.java b/src/main/java/com/gtnewhorizons/angelica/utils/AnimationsRenderUtils.java index 38ed419a7..cb446f19a 100644 --- a/src/main/java/com/gtnewhorizons/angelica/utils/AnimationsRenderUtils.java +++ b/src/main/java/com/gtnewhorizons/angelica/utils/AnimationsRenderUtils.java @@ -21,10 +21,10 @@ public static void markBlockTextureForUpdate(IIcon icon, IBlockAccess blockAcces 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(); } } }