File tree 2 files changed +9
-4
lines changed
common/src/main/java/dev/ftb/mods/ftbxmodcompat/ftbquests
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 9
9
import mezz .jei .api .recipe .RecipeType ;
10
10
import mezz .jei .api .recipe .advanced .IRecipeManagerPlugin ;
11
11
import mezz .jei .api .recipe .category .IRecipeCategory ;
12
+ import net .minecraft .client .Minecraft ;
12
13
import net .minecraft .world .item .ItemStack ;
13
14
14
15
import java .util .List ;
@@ -19,12 +20,16 @@ public enum LootCrateRecipeManagerPlugin implements IRecipeManagerPlugin {
19
20
private final WrappedLootCrateCache cache = new WrappedLootCrateCache (
20
21
crates -> {
21
22
if (FTBQuestsJEIIntegration .runtime != null && !crates .isEmpty ()) {
22
- FTBQuestsJEIIntegration .runtime .getIngredientManager ().removeIngredientsAtRuntime (VanillaTypes .ITEM_STACK , crates );
23
+ Minecraft .getInstance ().tell (() ->
24
+ FTBQuestsJEIIntegration .runtime .getIngredientManager ().removeIngredientsAtRuntime (VanillaTypes .ITEM_STACK , crates )
25
+ );
23
26
}
24
27
},
25
28
crates -> {
26
29
if (FTBQuestsJEIIntegration .runtime != null && !crates .isEmpty ()) {
27
- FTBQuestsJEIIntegration .runtime .getIngredientManager ().addIngredientsAtRuntime (VanillaTypes .ITEM_STACK , crates );
30
+ Minecraft .getInstance ().tell (() ->
31
+ FTBQuestsJEIIntegration .runtime .getIngredientManager ().addIngredientsAtRuntime (VanillaTypes .ITEM_STACK , crates )
32
+ );
28
33
}
29
34
}
30
35
);
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public List<WrappedLootCrate> getWrappedLootCrates() {
34
34
}
35
35
36
36
private void rebuildWrappedLootCrateCache () {
37
- preRebuild .accept (crateStacks );
37
+ preRebuild .accept (List . copyOf ( crateStacks ) );
38
38
39
39
wrappedLootCratesCache .clear ();
40
40
crateStacks .clear ();
@@ -49,7 +49,7 @@ private void rebuildWrappedLootCrateCache() {
49
49
}
50
50
}
51
51
52
- postRebuild .accept (crateStacks );
52
+ postRebuild .accept (List . copyOf ( crateStacks ) );
53
53
}
54
54
55
55
public void refresh () {
You can’t perform that action at this time.
0 commit comments