Skip to content

Commit

Permalink
fix: merge error causing regression on conditional recipe loading
Browse files Browse the repository at this point in the history
my merging of 1.20.1 stuff into 1.20.4 caused miner recipes to switch from neoforge to the no longer supported forge condition syntax.

Closes #1102
  • Loading branch information
klikli-dev committed Mar 30, 2024
1 parent a608359 commit 34b7726
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ group=com.klikli_dev
mod_id=occultism
mod_name=Occultism
mod_license=MIT
mod_version=1.81.4
mod_version=1.124.0
mod_authors=Kli Kli
mod_description=A magic mod inspired by the world of Jonathan Stroud's Bartimaeus. With the help of occult rituals players can summon entities from the "Other Side" to perform magic.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"type": "occultism:miner",
"conditions": [
"neoforge:conditions": [
{
"type": "forge:not",
"type": "neoforge:not",
"value": {
"type": "forge:tag_empty",
"type": "neoforge:tag_empty",
"tag": "forge:ores/stella_arcanum"
}
}
],
"type": "occultism:miner",
"ingredient": {
"tag": "occultism:miners/master"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"type": "occultism:miner",
"conditions": [
"neoforge:conditions": [
{
"type": "forge:not",
"type": "neoforge:not",
"value": {
"type": "forge:tag_empty",
"type": "neoforge:tag_empty",
"tag": "forge:ores/arcane_crystal"
}
}
],
"type": "occultism:miner",
"ingredient": {
"tag": "occultism:miners/ores"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"type": "occultism:miner",
"conditions": [
"neoforge:conditions": [
{
"type": "forge:not",
"type": "neoforge:not",
"value": {
"type": "forge:tag_empty",
"type": "neoforge:tag_empty",
"tag": "forbidden_arcanus:runic_stones"
}
}
],
"type": "occultism:miner",
"ingredient": {
"tag": "occultism:miners/ores"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"type": "occultism:miner",
"conditions": [
"neoforge:conditions": [
{
"type": "forge:not",
"type": "neoforge:not",
"value": {
"type": "forge:tag_empty",
"type": "neoforge:tag_empty",
"tag": "forge:ores/xpetrified_ore"
}
}
],
"type": "occultism:miner",
"ingredient": {
"tag": "occultism:miners/ores"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public JsonObject buildMinerRecipeJson(String minerTag, String outputTag, int we
var recipe = new JsonObject();
recipe.addProperty("type", "occultism:miner");
var conditions = this.buildMinerRecipeConditionJson(outputTag);
recipe.add("conditions", conditions);
recipe.add("neoforge:conditions", conditions);
var ingredient = new JsonObject();
ingredient.addProperty("tag", minerTag);
recipe.add("ingredient", ingredient);
Expand All @@ -120,9 +120,9 @@ public JsonArray buildMinerRecipeConditionJson(String outputTag) {
var conditions = new JsonArray();
//multiple conditions on the root level array are treated as AND by forge, but we only have one
var condition = new JsonObject();
condition.addProperty("type", "forge:not");
condition.addProperty("type", "neoforge:not");
var value = new JsonObject();
value.addProperty("type", "forge:tag_empty");
value.addProperty("type", "neoforge:tag_empty");
value.addProperty("tag", outputTag);
condition.add("value", value);
conditions.add(condition);
Expand Down

0 comments on commit 34b7726

Please sign in to comment.