MatrexsVigil / harvestcraft

All rights reserved - None of my artwork is available to be used for FREE in your game EVER. If you want to HIRE ME, please contact me. Thank you. This code is here for people to learn from and to help find bugs ONLY.
https://www.patreon.com/pamsmods
89 stars 85 forks source link

Malformed JSON #331

Closed InterstellarRaccoon closed 5 years ago

InterstellarRaccoon commented 5 years ago

Loading Harvestcraft on 1.12.2zc throws an error about malformed JSONs and true enough, there is some weird syntax on them. They are

cucumbersandwichitem with a misplaced comma

{
  "result": {
    "item": "harvestcraft:cucumbersandwichitem"
  },

  "ingredients": [
    {
      "type": "forge:ore_dict",
      "ore": "toolCuttingboard"
    },
,
{
      "item": "minecraft:bread"
    }
{
      "type": "forge:ore_dict",
      "ore": "cropCucumber"
    },
{
      "type": "forge:ore_dict",
      "ore": "foodCheese"
    },
{
      "type": "forge:ore_dict",
      "ore": "listAllheavycream"
    }
  ],
  "type": "forge:ore_shapeless"
}

and cassouletitem with a missing double quote

{
  "result": {
    "item": "harvestcraft:cassouletitem"
  },

  "ingredients": [
    {
      "type": "forge:ore_dict",
      "ore": "toolPot"
    },
{
      "type": "forge:ore_dict",
      "ore": "listAllduckraw"
    },
{
      "type": "forge:ore_dict",
      "ore": "foodSausage"
    },
{
      "type": "forge:ore_dict",
      "ore": "listAllporkraw"
    },
{
      "type": "forge:ore_dict",
      "ore": "cropBean"
    },
{
      "type": "forge:ore_dict",
      "ore": cropOnion"
    },
{
      "type": "forge:ore_dict",
      "ore": "cropSpiceleaf"
    },
{
      "type": "forge:ore_dict",
      "ore": "cropGarlic"
    },
{
      "type": "forge:ore_dict",
      "ore": "cropCarrot"
    }
  ],
  "type": "forge:ore_shapeless"
}
miiichael commented 5 years ago

This is where I confess that I haven't actually gotten around to deploying this fix to my own server yet. :sweat_smile:

My advice is to either wait patiently for Pam (hopefully not still dealing with health-related dramas) to accept my pull request, or non-novices could have a go at monkey-patching the mod themselves, by unpacking the .jar with one's favourite zip file utility, editing the bugged files appropriately, and then re-zipping the whole lot up back into a .jar file again. (Of course, it goes without saying that if you break your server in the process, you get to keep both pieces :P)

Definitely not a critical issue; it's fine to do nothing for now. The items (and stuff that depends on those items, such as High Tea) will become craftable once the mod is updated with the fix.

miiichael commented 5 years ago

On the bright side, I have now tested (successfully!) my fix on my own server. :smile:

Pythonic-Rainbow commented 5 years ago

My server stuck after throwing parse error..

miiichael commented 5 years ago

This bug only breaks two recipes (adding a couple of error messages to the logs in the process), not the entire server. I'd say your broken modpack will likely be due to a different issue...

MatrexsVigil commented 5 years ago

Fixed in upcoming 1.12.2zd

And updates have been taking longer because I had an issue with a 7mm kidney stone and then when they removed the stent after that surgery, I had 11-13 1-3mm kidney stones come out in 24 hours. Health issues suck! :)