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

Oraxen API Update #191

Closed lucian929 closed 2 years ago

lucian929 commented 2 years ago

What happened?

Oraxen recently underwent an API overhaul, so the hook is not currently working. When placing an Oraxen item in the interface to create a recipe, upon clicking, the items disappear and an error is displayed in console.

How can the bug be reproduced?

Run /cc, click "Crafting Table Recipe", place an oraxen item in the 3x3 grid, and click somewhere in your inventory.

Expected Behaviour?

Oraxen hook works as intended and does not display any console errors

Plugin version

CC 4.16.3.1 WolfyScript 4.16.9.0

Server software

Pufferfish 1.19.2

Relevant log output

[18:01:29 WARN]: [CustomCrafting] Task #56008 for CustomCrafting v4.16.3.1 generated an exception
java.lang.NullPointerException: Cannot invoke "java.util.Map.values()" because "io.th0rgal.oraxen.items.OraxenItems.map" is null
        at io.th0rgal.oraxen.items.OraxenItems.entryStream(OraxenItems.java:151) ~[oraxen-1.147.1.jar:?]
        at io.th0rgal.oraxen.items.OraxenItems.exists(OraxenItems.java:57) ~[oraxen-1.147.1.jar:?]
        at me.wolfyscript.utilities.compatibility.plugins.oraxen.OraxenRefImpl.getLinkedItem(OraxenRefImpl.java:51) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at me.wolfyscript.utilities.api.inventory.custom_items.CustomItem.getItemStack(CustomItem.java:674) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at me.wolfyscript.utilities.api.inventory.custom_items.CustomItem.<init>(CustomItem.java:196) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at me.wolfyscript.utilities.api.inventory.custom_items.CustomItem.getReferenceByItemStack(CustomItem.java:350) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at me.wolfyscript.customcrafting.gui.recipe_creator.ButtonRecipeIngredient.lambda$new$1(ButtonRecipeIngredient.java:59) ~[customcrafting-spigot-4.16.3.1.jar:?]
        at me.wolfyscript.utilities.api.inventory.gui.button.buttons.ActionButton.postExecute(ActionButton.java:145) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at me.wolfyscript.utilities.api.inventory.gui.button.buttons.ItemInputButton.postExecute(ItemInputButton.java:98) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at me.wolfyscript.utilities.api.inventory.gui.GuiUpdate.lambda$postExecuteButtons$0(GuiUpdate.java:202) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
        at me.wolfyscript.utilities.api.inventory.gui.GuiUpdate.postExecuteButtons(GuiUpdate.java:200) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at me.wolfyscript.utilities.api.inventory.gui.GuiWindow.lambda$update$0(GuiWindow.java:264) ~[wolfyutils-spigot-4.16.9.0.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[pufferfish-1.19.2.jar:git-Pufferfish-34]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[pufferfish-1.19.2.jar:git-Pufferfish-34]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1495) ~[pufferfish-1.19.2.jar:git-Pufferfish-34]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:449) ~[pufferfish-1.19.2.jar:git-Pufferfish-34]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1419) ~[pufferfish-1.19.2.jar:git-Pufferfish-34]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1195) ~[pufferfish-1.19.2.jar:git-Pufferfish-34]
        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:307) ~[pufferfish-1.19.2.jar:git-Pufferfish-34]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Submit issue

WolfyScript commented 2 years ago

I did update to the new API now and the update should be available soonish.

But I am not really sure if the issue really is caused by the API change, as the error occurs inside Oraxen.
Plus, the old API is still available (just deprecated and marked for removal), so you should probably report this error to th0rgal.

lucian929 commented 2 years ago

I do believe as of the latest update the old API was removed, since some of the plugins my team has made were reporting basically the same errors. If the new update of CC doesn't fix it, I will certainly report it to Oraxen's team 😄