Skip to content

Commit e0de8fa

Browse files
committed
fix null strategy
1 parent b33fafb commit e0de8fa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/gregtech/api/recipes/RecipeContext.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import it.unimi.dsi.fastutil.Hash;
88
import it.unimi.dsi.fastutil.objects.Object2IntOpenCustomHashMap;
9+
import org.jetbrains.annotations.Nullable;
910

1011
import java.util.Map;
1112

@@ -15,8 +16,8 @@ public class RecipeContext<I> {
1516
ChanceBoostFunction boostFunction;
1617
public int baseTier, machineTier;
1718

18-
public RecipeContext(Hash.Strategy<I> strategy) {
19-
this.cache = new Object2IntOpenCustomHashMap<>(strategy);
19+
public RecipeContext(@Nullable Hash.Strategy<I> strategy) {
20+
this.cache = strategy == null ? null : new Object2IntOpenCustomHashMap<>(strategy);
2021
}
2122

2223
public RecipeContext() {

0 commit comments

Comments
 (0)