mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Fix sidedness issue, closes #3328
This commit is contained in:
1 parent
21eb7f8bf7
commit
633fe72f7f
1 file changed
+4
-2
@@ -33,6 +33,7 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class RecipeManaInfusion implements IManaInfusionRecipe {
|
||||
private final ResourceLocation id;
|
||||
@@ -123,10 +124,11 @@ public class RecipeManaInfusion implements IManaInfusionRecipe {
|
||||
if (catalystId == null) {
|
||||
throw new IllegalArgumentException("Invalid catalyst ID: " + s);
|
||||
}
|
||||
if (!Registry.BLOCK.containsKey(catalystId)) {
|
||||
Optional<Block> cat = Registry.BLOCK.getValue(catalystId);
|
||||
if (!cat.isPresent()) {
|
||||
throw new IllegalArgumentException("Unknown catalyst: " + s);
|
||||
}
|
||||
catalystState = Registry.BLOCK.getValue(catalystId).get().getDefaultState();
|
||||
catalystState = cat.get().getDefaultState();
|
||||
} else {
|
||||
catalystState = StateIngredientHelper.readBlockState(JSONUtils.getJsonObject(json, "catalyst"));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user