From 33e458dbf4327b60faef180322cfba5da7ce3370 Mon Sep 17 00:00:00 2001 From: IlmarsXd <74308163+IlmarsXd@users.noreply.github.com> Date: Sat, 13 Jan 2024 18:42:30 +0200 Subject: Actually fix the Concurrent Modification issue (#989) actually fix the issue --- .../github/moulberry/notenoughupdates/mixins/MixinTextureManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java index 01c053b8..387ffeaf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java @@ -35,6 +35,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.util.Collections; import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; @Mixin(TextureManager.class) public class MixinTextureManager { @@ -58,6 +59,6 @@ public class MixinTextureManager { */ @Inject(method = "", at = @At("RETURN")) public void constructor(CallbackInfo ci) { - listTickables = Collections.synchronizedList(Lists.newArrayList()); + listTickables = new CopyOnWriteArrayList<>(); } } -- cgit