<commit_before>--- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java
@@ -28,6 +28,8 @@
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;
 
+import net.minecraftforge.client.ForgeHooksClient;
+
 @SideOnly(Side.CLIENT)
 public class RenderEngine
 {
@@ -186,6 +188,7 @@
 
                 try
                 {
+                    ForgeHooksClient.onTextureLoadPre(par1Str);
                     int i = GLAllocation.generateTextureNames();
                     TextureFXManager.instance().bindTextureToName(par1Str, i);
                     boolean flag = par1Str.startsWith("%blur%");
@@ -216,6 +219,7 @@
                     }
 
                     this.textureMap.put(s1, Integer.valueOf(i));
+                    ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack());
                     return i;
                 }
                 catch (Exception exception)<commit_msg>Fix potential GL issue when atlas animations bind textures without informating RenderEngine.<commit_after>--- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java
@@ -28,6 +28,8 @@
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;
 
+import net.minecraftforge.client.ForgeHooksClient;
+
 @SideOnly(Side.CLIENT)
 public class RenderEngine
 {
@@ -186,6 +188,7 @@
 
                 try
                 {
+                    ForgeHooksClient.onTextureLoadPre(par1Str);
                     int i = GLAllocation.generateTextureNames();
                     TextureFXManager.instance().bindTextureToName(par1Str, i);
                     boolean flag = par1Str.startsWith("%blur%");
@@ -216,6 +219,7 @@
                     }
 
                     this.textureMap.put(s1, Integer.valueOf(i));
+                    ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack());
                     return i;
                 }
                 catch (Exception exception)
@@ -417,6 +421,7 @@
     {
         this.textureMapBlocks.updateAnimations();
         this.textureMapItems.updateAnimations();
+        this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture.
     }
 
     /**
@@ -515,6 +520,7 @@
     {
         this.textureMapBlocks.refreshTextures();
         this.textureMapItems.refreshTextures();
+        this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture.
     }
 
     public Icon getMissingIcon(int par1)
{'fraction_non_alphanumeric': 0.11847988077496274, 'fraction_numerical': 0.029433681073025336, 'mean_word_length': 2.147713950762016, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2016703', 'n_tokens_mistral': 830, 'n_tokens_neox': 765, 'n_words': 128}