Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: recipe cannot be null #2

Open
SnowSnakz opened this issue Mar 25, 2023 · 0 comments
Open

java.lang.IllegalArgumentException: recipe cannot be null #2

SnowSnakz opened this issue Mar 25, 2023 · 0 comments

Comments

@SnowSnakz
Copy link
Owner

SnowSnakz commented Mar 25, 2023

This exception is thrown when reloading the plugin, and when a player joins.
This issue seems to be related to a bug where crafting recipes do not work at all, even if the recipe isn't unlocked.

This error seems to be caused in ElementalFoods.java at line 72, the conditions to reach this error are as follows:

  1. At least one custom item is defined in the config
  2. unlock-recipes-on-join is set to true
  3. The custom item has a crafting-recipe section in the config
  4. The crafting recipe is not null (ci.recipe null check exists on line 68)
  5. The recipe has show-in-recipe-list undefined or set to true.
  6. The NamespacedKey of the crafting recipe is null (ci.recipeKey is referenced on line 72)

Potential Causes:

  • At CustomRecipe.java line 28: NamespacedKey.fromString() fails silently.
  • At CustomItem.java line 252: this line is not executing.
  • At ElementalFoods.java line 331: this line is not executing.
    • Lines 343 to 351 are also not executing.
SnowSnakz added a commit that referenced this issue Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant