diff --git a/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_loading/TextureAtlasMixin.java b/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_loading/TextureAtlasMixin.java index c8d15df4..6ca60bdf 100644 --- a/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_loading/TextureAtlasMixin.java +++ b/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_loading/TextureAtlasMixin.java @@ -85,6 +85,11 @@ public abstract class TextureAtlasMixin { cir.getReturnValue().addAll(storedResults); } + @Inject(method = "prepareToStitch", at = @At("HEAD")) + private void initMap(CallbackInfoReturnable cir) { + loadedImages = new ConcurrentHashMap<>(); + } + @Inject(method = "prepareToStitch", at = @At("RETURN")) private void clearLoadedImages(CallbackInfoReturnable cir) { loadedImages = Collections.emptyMap();