From d6aadcaf9445cfb4eed329cf1b9a0c69ae4b970a Mon Sep 17 00:00:00 2001 From: CrushedPixel Date: Mon, 29 Jun 2015 12:30:15 +0200 Subject: [PATCH] Executes mc.refreshResources() in main thread to fix ConcurrentModificationExceptions | https://trello.com/c/4gBrdiyB/104 --- src/main/java/eu/crushedpixel/replaymod/ReplayMod.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/crushedpixel/replaymod/ReplayMod.java b/src/main/java/eu/crushedpixel/replaymod/ReplayMod.java index d127b0b2..f0bef10a 100755 --- a/src/main/java/eu/crushedpixel/replaymod/ReplayMod.java +++ b/src/main/java/eu/crushedpixel/replaymod/ReplayMod.java @@ -154,7 +154,12 @@ public class ReplayMod { public void run() { try { mc.defaultResourcePacks.add(new LocalizedResourcePack()); - mc.refreshResources(); + mc.addScheduledTask(new Runnable() { + @Override + public void run() { + mc.refreshResources(); + } + }); } catch(Exception e) { e.printStackTrace(); }