diff --git a/src/main/java/team/chisel/ctm/client/texture/render/TextureCTM.java b/src/main/java/team/chisel/ctm/client/texture/render/TextureCTM.java index ead3961..4b96dd1 100644 --- a/src/main/java/team/chisel/ctm/client/texture/render/TextureCTM.java +++ b/src/main/java/team/chisel/ctm/client/texture/render/TextureCTM.java @@ -1,5 +1,6 @@ package team.chisel.ctm.client.texture.render; +import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -18,6 +19,7 @@ import com.google.common.cache.CacheBuilder; import it.unimi.dsi.fastutil.objects.Object2ByteMap; +import it.unimi.dsi.fastutil.objects.Object2ByteMaps; import it.unimi.dsi.fastutil.objects.Object2ByteOpenCustomHashMap; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -97,7 +99,7 @@ public boolean connectTo(CTMLogic ctm, BlockState from, BlockState to, Direction try { Object2ByteMap sidecache = connectionCache.get(new CacheKey(from, dir), () -> { - Object2ByteMap map = new Object2ByteOpenCustomHashMap<>(new IdentityStrategy<>()); + Object2ByteMap map = Object2ByteMaps.synchronize(new Object2ByteOpenCustomHashMap<>(new IdentityStrategy<>())); map.defaultReturnValue((byte) -1); return map; });