aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java
index 856a9d86..2fa8d5be 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java
@@ -226,7 +226,14 @@ public class DwarvenMinesTextures {
public static void tick() {
time = System.currentTimeMillis();
- lastRetextureCheck.entrySet().removeIf((checks) -> time - checks.getValue() > 30*1000);
+ Set<ChunkCoordIntPair> remove = new HashSet<>();
+ for(Map.Entry<ChunkCoordIntPair, Long> entry : lastRetextureCheck.entrySet()) {
+ if(time - entry.getValue() > 30*1000) {
+ remove.add(entry.getKey());
+ }
+ }
+ lastRetextureCheck.keySet().removeAll(remove);
+ loadedChunkData.keySet().removeAll(remove);
/*if(Minecraft.getMinecraft().theWorld == null) return;