PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

Custom crafts are broken #4085

Open umutardafiliz opened 1 week ago

umutardafiliz commented 1 week ago

Terms

Discord Username (optional)

No response

What happened?

custom crafting recipes dont work as intended. they feel they dont check the tags of the item, only the material instead.

Steps to reproduce the issue

Crafts are not working properly. they give the result of another recipe and items without a recipe also give certain results. It looks like it only checks the item material for the recipe, and not the custom model data. Problem may be caused by MMOItems support if it doesnt happen on anyone else. I didnt have this problem until upgrading my server to 1.21.1 from 1.20.4

Server version

Pufferfish version 1.21.1-18-HEAD@63ce67d

ItemsAdder Version

ItemsAdder 4.0.3

ProtocolLib Version

ProtocolLib version 5.3.0

LoneLibs Version

LoneLibs version 1.0.59

Full Server Log

https://mclo.gs/Qyq8Xfb

Error (optional)

[15:58:50 ERROR]: [CraftMagicNumbers] Exception modifying ItemStack
java.lang.Throwable: com.mojang.brigadier.exceptions.CommandSyntaxException: Unknown item 'minecraft:' at position 0: <--[HERE]
        at org.bukkit.craftbukkit.util.CraftMagicNumbers.modifyItemStack(CraftMagicNumbers.java:287) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at EssentialsX-2.20.1 (1).jar/com.earth2me.essentials.MetaItemStack.canSpawn(MetaItemStack.java:135) ~[EssentialsX-2.20.1 (1).jar:?]
        at EssentialsX-2.20.1 (1).jar/com.earth2me.essentials.commands.Commanditem.run(Commanditem.java:48) ~[EssentialsX-2.20.1 (1).jar:?]
        at EssentialsX-2.20.1 (1).jar/com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:170) ~[EssentialsX-2.20.1 (1).jar:?]
        at EssentialsX-2.20.1 (1).jar/com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:820) ~[EssentialsX-2.20.1 (1).jar:?]
        at EssentialsX-2.20.1 (1).jar/com.earth2me.essentials.Essentials.onCommand(Essentials.java:723) ~[EssentialsX-2.20.1 (1).jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.3.10.jar:?]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2219) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2193) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1542) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1519) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1512) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1471) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1478) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1323) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: com.mojang.brigadier.exceptions.CommandSyntaxException: Unknown item 'minecraft:' at position 0: <--[HERE]
[15:58:51 INFO]: djarda2 issued server command: /gm 0
[15:58:52 INFO]: djarda2 issued server command: /craft
[15:58:53 ERROR]: Could not pass event PrepareItemCraftEvent to ItemsAdder v4.0.3
java.lang.NullPointerException: Cannot invoke "itemsadder.m.mz.a(org.bukkit.inventory.CraftingInventory)" because "<local8>" is null
        at ItemsAdder_4.0.3.jar/itemsadder.m.nb.a(SourceFile:429) ~[ItemsAdder_4.0.3.jar:?]
        at ItemsAdder_4.0.3.jar/itemsadder.m.nb.a(SourceFile:396) ~[ItemsAdder_4.0.3.jar:?]
        at ItemsAdder_4.0.3.jar/itemsadder.m.nb.a(SourceFile:348) ~[ItemsAdder_4.0.3.jar:?]
        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-18-63ce67d]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPreCraftEvent(CraftEventFactory.java:1454) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.CraftingMenu.slotChangedCraftingGrid(CraftingMenu.java:98) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.CraftingMenu.lambda$slotsChanged$0(CraftingMenu.java:110) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.ContainerLevelAccess.lambda$execute$0(ContainerLevelAccess.java:85) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.ContainerLevelAccess$2.evaluate(ContainerLevelAccess.java:72) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.ContainerLevelAccess.execute(ContainerLevelAccess.java:84) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.CraftingMenu.slotsChanged(CraftingMenu.java:109) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.TransientCraftingContainer.setItem(TransientCraftingContainer.java:147) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.Slot.set(Slot.java:66) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.Slot.setByPlayer(Slot.java:62) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.Slot.setByPlayer(Slot.java:58) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.AbstractContainerMenu.moveItemStackTo(AbstractContainerMenu.java:866) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.AbstractContainerMenu.moveItemStackTo(AbstractContainerMenu.java:772) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.CraftingMenu.quickMoveStack(CraftingMenu.java:178) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.AbstractContainerMenu.doClick(AbstractContainerMenu.java:539) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.world.inventory.AbstractContainerMenu.clicked(AbstractContainerMenu.java:382) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3233) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1542) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1519) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1512) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1471) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1478) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1323) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[15:59:05 ERROR]: Could not pass event CraftItemEvent to ItemsAdder v4.0.3
java.lang.NullPointerException: Cannot invoke "itemsadder.m.mz.a(org.bukkit.inventory.CraftingInventory)" because "<local8>" is null
        at ItemsAdder_4.0.3.jar/itemsadder.m.nb.a(SourceFile:429) ~[ItemsAdder_4.0.3.jar:?]
        at ItemsAdder_4.0.3.jar/itemsadder.m.nb.a(SourceFile:474) ~[ItemsAdder_4.0.3.jar:?]
        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-18-63ce67d]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3225) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1542) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1519) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1512) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1471) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1478) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1323) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Problematic items yml configuration file (optional)

recipes:
  crafting_table:
    steeldust: 
      enabled: true
      pattern:
      - BAB
      - ABA
      - BAB
      ingredients:
        A: COAL
        B: IRON_INGOT
      result: 
        item: newores:steeldust
        amount: 4
    darksteel_ore: 
      enabled: true
      pattern:
      - BAB
      - ACA
      - BAB
      ingredients:
        A: steeldust
        B: gunpowder
        C: sulfur
      result: 
        item: newores:darksteel_ore
        amount: 1
    steel_block: 
      enabled: true
      pattern:
      - AAA
      - AAA
      - AAA
      ingredients:
        A: steel_ingot
      result: 
        item: newores:steel_block
        amount: 1
    steel_ingotfromblock: 
      enabled: true
      shapeless: true
      ingredients:
        A: steel_block
      result: 
        item: newores:steel_ingot
        amount: 9

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

Andre601 commented 1 week ago

Please test if this error appears with just ItemsAdder and its dependencies and a fresh Resource pack setup. If it doesn't then the chances are hight that another item causes the issues.

umutardafiliz commented 1 week ago

Please test if this error appears with just ItemsAdder and its dependencies and a fresh Resource pack setup. If it doesn't then the chances are hight that another item causes the issues.

It happens when MMOItems is installed on the server, and very likely only happen only with shapeless recipes