Guide-API

Guide-API

76M Downloads

Crash (NPE) with recipes that use an enchanted book

Xilef11 opened this issue ยท 2 comments

commented

I'm using guide-api for my mod's documentation, but I get a NPE (that crashes the game) when opening the page for a recipe that uses an enchanted book because the CreativeTab passed to getSubItems() is null. (the recipe is defined in json with minecraft:enchanted_book and it works fine for crafting and in JEI)

log + recipe json

I'm not sure if this is a bug or if I'm doing something wrong though...

commented

I am unable to reproduce this with the following json. All I did was take yours and replace it with vanilla alternatives.

I had made a change I thought I'd removed. Removed that and I can reproduce.

{
  "result": {
    "item": "minecraft:potato"
  },
  "ingredients": [
    {
      "item": "minecraft:enchanted_book",
      "data": 32767
    },
    {
      "item": "minecraft:bone_block"
    }
  ],
  "type": "minecraft:crafting_shapeless"
}
commented

Thanks! good to know it wasn't me doing something stupid :p