Epic Samurai's

Epic Samurai's

3M Downloads

[1.18.2] Battlemage Armor recipe failing to load due to JSON Parsing Error on startup

KeenbeanDev opened this issue ยท 2 comments

commented

Summary:
In 1.18.2, The Recipe for all four pieces of Battlemage Armor, loaded upon detecting Ars Nouveau being installed, fails to load due to a JSON Parsing Error being thrown.

Details:
Looking in the logs, the 'epicsamurai:source_gem_samruai_helmet_ritual' recipe outputs the following error (Outputted via KubeJS handling of recipes, but appears to fail in Forge parsing as well):

[Worker-Main-28/WARN] [KubeJS Server/]: Failed to parse recipe 'epicsamurai:source_gem_samruai_leggings_ritual[ars_nouveau:enchanting_apparatus]'! Falling back to vanilla: com.google.gson.JsonSyntaxException: Expected item to be a JsonObject, was "ars...er"
[Worker-Main-28/WARN] [KubeJS Server/]: Failed to parse recipe epicsamurai:source_gem_samruai_leggings_ritual[ars_nouveau:enchanting_apparatus]: com.google.gson.JsonSyntaxException: Expected item to be a JsonObject, was "ars...er"

Looking inside of the recipe, the pedestal reagants are structured as follows:

"pedestalItems": [
    {
      "item": "ars_nouveau:magebloom_fiber"
    },
    {
      "item": "ars_nouveau:magebloom_fiber"
    },
    {
      "item": "ars_nouveau:magebloom_fiber"
    },
    {
      "item": "ars_nouveau:magebloom_fiber"
    }
],

The argument is provided as a string and is erroring due to expecting an enclosed JsonObject.

Using an example from the mod 'Ars Elemental', an addon for Ars Nouveau, the recipe shows pedestal items with this structure:

"pedestalItems": [
  {
    "item": {
      "item": "ars_nouveau:water_essence"
    }
  },
  {
    "item": {
      "item": "ars_nouveau:water_essence"
    }
  },
  {
    "item": {
      "item": "ars_nouveau:water_essence"
    }
  },
  {
    "item": {
      "item": "minecraft:gold_ingot"
    }
  },
  {
    "item": {
      "item": "minecraft:gold_ingot"
    }
  },
  {
    "item": {
      "tag": "ars_nouveau:advanced_spellbook"
    }
  }
]

Note that the "item" parameter contains an internal "item" as well. I believe to fix this, you need to re-work the four recipes to this format. An example has been done on the samurai boots as below, for reference. Given all four recipes use the same pedestalItems, this should hopefully be a small fix!

{
    "type": "forge:conditional",
    "recipes": [
        {
            "conditions": [
                {
                    "type": "forge:mod_loaded",
                    "modid": "ars_nouveau"
                }
            ],
            "recipe": {
                "type": "ars_nouveau:enchanting_apparatus",
                "keepNbtOfReagent": true,
                "output": {
                    "item": "epicsamurai:mage_samurai_boots"
                },
                "pedestalItems": [
                    {
                        "item": {
                            "item": "ars_nouveau:magebloom_fiber"
                        }
                    },
                    {
                        "item": {
                            "item": "ars_nouveau:magebloom_fiber"
                        }
                    },
                    {
                        "item": {
                            "item": "ars_nouveau:magebloom_fiber"
                        }
                    },
                    {
                        "item": {
                            "item": "ars_nouveau:magebloom_fiber"
                        }
                    }
                ],
                "reagent": [
                    {
                        "tag": "epicsamurai:armors/gem_samurai_armor_boots"
                    }
                ],
                "sourceCost": 2500
            }
        }
    ]
}

Additional note; The recipe name itself has a typo, in all 4 battlemage recipe names. The recipe uses 'samruai', needing the 'r' and 'u' switched around for grammatical sense. Optional in the grand scheme of things, but helps for readability!

Versions:
EpicSamurai: epicsamurai-0.0.2-1.18.2-forge
Ars Nouveau: ars_nouveau-1.18.2-2.9.0.jar
KubeJS: kubejs-forge-1802.5.5-build.569
Forge: 40.2.4

commented

Sorry but 1.18.2 is no longer supported.

commented

Makes sense, thanks anyway!