fix FD on fabric being behind and making pan uncraftable
This commit is contained in:
parent
24e98169e6
commit
1978cf9c93
2 changed files with 16 additions and 8 deletions
|
@ -73,10 +73,14 @@ public class FabricModConditionalIngredient extends BaseCustomIngredient {
|
|||
JsonObject object = element.getAsJsonObject();
|
||||
|
||||
if (object.has("type") && object.getAsJsonPrimitive("type").getAsString().equals(ID.toString())) {
|
||||
if (object.has("modid") && IXplatAbstractions.INSTANCE.isModPresent(object.getAsJsonPrimitive("modid").getAsString()))
|
||||
return Ingredient.fromJson(object.get("if_loaded"));
|
||||
else
|
||||
return Ingredient.fromJson(object.get("default"));
|
||||
if (object.has("modid") && IXplatAbstractions.INSTANCE.isModPresent(object.getAsJsonPrimitive("modid").getAsString())) {
|
||||
Ingredient ingredient = Ingredient.fromJson(object.get("if_loaded"));
|
||||
if (!ingredient.isEmpty()) {
|
||||
return ingredient;
|
||||
}
|
||||
}
|
||||
|
||||
return Ingredient.fromJson(object.get("default"));
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -73,10 +73,14 @@ public class ForgeModConditionalIngredient extends AbstractIngredient {
|
|||
|
||||
public static Ingredient fromJson(JsonObject object) {
|
||||
if (object.has("type") && object.getAsJsonPrimitive("type").getAsString().equals(ID.toString())) {
|
||||
if (object.has("modid") && IXplatAbstractions.INSTANCE.isModPresent(object.getAsJsonPrimitive("modid").getAsString()))
|
||||
return Ingredient.fromJson(object.get("if_loaded"));
|
||||
else
|
||||
return Ingredient.fromJson(object.get("default"));
|
||||
if (object.has("modid") && IXplatAbstractions.INSTANCE.isModPresent(object.getAsJsonPrimitive("modid").getAsString())) {
|
||||
Ingredient ingredient = Ingredient.fromJson(object.get("if_loaded"));
|
||||
if (!ingredient.isEmpty()) {
|
||||
return ingredient;
|
||||
}
|
||||
}
|
||||
|
||||
return Ingredient.fromJson(object.get("default"));
|
||||
}
|
||||
|
||||
return Ingredient.of();
|
||||
|
|
Loading…
Reference in a new issue