WolfyScript / CustomCrafting

Spigot based plugin to create your own custom Recipes & Items. Designed to be easy to use with in-game GUI and tons of configuration possibilities.
https://modrinth.com/plugin/customcrafting
GNU General Public License v3.0
113 stars 36 forks source link

Bug with nbt (Very important) #343

Closed 44wrw44 closed 11 months ago

44wrw44 commented 11 months ago

What happened?

During crafting (any craft), when I provide an item with nbt, it does nothing and gives an error...

How can the bug be reproduced?

During crafting (any craft), when I provide an item with nbt, it does nothing and gives an error...

Expected Behaviour?

The GUI will not work and an error will appear

Plugin version

CustomCrafting 4.16.9-beta.4-b; WolfyUtils 4.16.15-beta.5

Server software

Purpur 1.20.2

Relevant log output

[19:59:28 WARN]: [CustomCrafting] Task #13630 for CustomCrafting v4.16.9-beta.4 generated an exception
java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.setAmount(int)" because "stack" is null
at me.wolfyscript.utilities.compatibility.plugins.mythicmobs.MythicMobsStackIdentifier.stack(MythicMobsStackIdentifier.java:34) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at com.wolfyscript.utilities.bukkit.world.items.reference.StackReference.referencedStack(StackReference.java:118) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at me.wolfyscript.customcrafting.recipes.items.RecipeItemStack.getItemStack(RecipeItemStack.java:254) ~[customcrafting-spigot-4.16.9-beta.4.jar:?]
at me.wolfyscript.customcrafting.gui.recipe_creator.ButtonRecipeIngredient.lambda$new$2(ButtonRecipeIngredient.java:62) ~[customcrafting-spigot-4.16.9-beta.4.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.button.buttons.ItemInputButton.render(ItemInputButton.java:105) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.GuiUpdate.renderButton(GuiUpdate.java:185) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.GuiUpdate.setButton(GuiUpdate.java:117) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at me.wolfyscript.customcrafting.gui.recipe_creator.RecipeCreatorBrewing.onUpdateAsync(RecipeCreatorBrewing.java:372) ~[customcrafting-spigot-4.16.9-beta.4.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.GuiWindow.openInventory(GuiWindow.java:284) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.GuiWindow.lambda$callUpdate$1(GuiWindow.java:274) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.GuiWindow.callUpdate(GuiWindow.java:276) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.GuiWindow.lambda$update$0(GuiWindow.java:267) ~[wolfyutils-spigot-4.16.15-beta.5.jar:?]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.2.jar:git-Purpur-2092]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[purpur-1.20.2.jar:git-Purpur-2092]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1497) ~[purpur-1.20.2.jar:git-Purpur-2092]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:486) ~[purpur-1.20.2.jar:git-Purpur-2092]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1406) ~[purpur-1.20.2.jar:git-Purpur-2092]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1177) ~[purpur-1.20.2.jar:git-Purpur-2092]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.20.2.jar:git-Purpur-2092]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]

Submit issue

charlie-boi commented 11 months ago

I'm getting a very similar error but with vanilla mc items

44wrw44 commented 11 months ago

I only have this error with items that have NBT tags.

44wrw44 commented 11 months ago

The error is probably related to MythicMobsStackIdentifier, but I can't remove it because of the addiction.

WolfyScript commented 11 months ago

Forgot to answer...🤦‍♂️I am already working on a fix for the next beta version of WolfyUtils.

44wrw44 commented 11 months ago

Спс :D