Skip to content

Commit

Permalink
Fixed AIOOBE
Browse files Browse the repository at this point in the history
see Chisel-Team#174 for more information
  • Loading branch information
justliliandev committed Feb 1, 2022
1 parent 3736602 commit 2ab632c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -97,7 +99,7 @@ public boolean connectTo(CTMLogic ctm, BlockState from, BlockState to, Direction
try {
Object2ByteMap<BlockState> sidecache = connectionCache.get(new CacheKey(from, dir),
() -> {
Object2ByteMap<BlockState> map = new Object2ByteOpenCustomHashMap<>(new IdentityStrategy<>());
Object2ByteMap<BlockState> map = Object2ByteMaps.synchronize(new Object2ByteOpenCustomHashMap<>(new IdentityStrategy<>()));
map.defaultReturnValue((byte) -1);
return map;
});
Expand Down

0 comments on commit 2ab632c

Please sign in to comment.