21 lines
1.2 KiB
Diff
21 lines
1.2 KiB
Diff
--- a/net/minecraft/item/crafting/RecipeManager.java
|
|
+++ b/net/minecraft/item/crafting/RecipeManager.java
|
|
@@ -37,6 +37,8 @@
|
|
this.field_199523_e = false;
|
|
this.field_199522_d.clear();
|
|
|
|
+ net.minecraftforge.common.crafting.CraftingHelper.reloadConstants(p_195410_1_);
|
|
+
|
|
for(ResourceLocation resourcelocation : p_195410_1_.func_199003_a("recipes", (p_199516_0_) -> {
|
|
return p_199516_0_.endsWith(".json");
|
|
})) {
|
|
@@ -47,6 +49,8 @@
|
|
JsonObject jsonobject = (JsonObject)JsonUtils.func_188178_a(gson, IOUtils.toString(iresource.func_199027_b(), StandardCharsets.UTF_8), JsonObject.class);
|
|
if (jsonobject == null) {
|
|
field_199521_c.error("Couldn't load recipe {} as it's null or empty", (Object)resourcelocation1);
|
|
+ } else if (jsonobject.has("conditions") && !net.minecraftforge.common.crafting.CraftingHelper.processConditions(JsonUtils.func_151214_t(jsonobject, "conditions"))) {
|
|
+ field_199521_c.info("Skipping loading recipe {} as it's conditions were not met", resourcelocation1);
|
|
} else {
|
|
this.func_199509_a(RecipeSerializers.func_199572_a(resourcelocation1, jsonobject));
|
|
}
|