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

Wandering Trader exception #71

Open
ProjectHSI opened this issue Apr 4, 2024 · 1 comment
Open

Wandering Trader exception #71

ProjectHSI opened this issue Apr 4, 2024 · 1 comment
Labels
priority: normal This issue is an obvious bug or problem that does not majorly hinder gameplay or development. type: bug Something doesn't work as it was intended to.
Milestone

Comments

@ProjectHSI
Copy link
Collaborator

Unknown circumstances or reproduction steps, just found this in the server log.

[22:14:46] [Server thread/ERROR]: Could not pass event InventoryOpenEvent to STEMCraft v1.5
java.lang.IllegalStateException: MerchantRecipe can only have maximum 2 ingredients
        at com.google.common.base.Preconditions.checkState(Preconditions.java:512) ~[guava-32.1.2-jre.jar:?]
        at org.bukkit.inventory.MerchantRecipe.setIngredients(MerchantRecipe.java:117) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at com.stemcraft.feature.SMVillagerTrading.lambda$onEnable$0(SMVillagerTrading.java:59) ~[STEMCraft-1.5.jar:?]
        at com.stemcraft.core.event.SMEvent.lambda$register$0(SMEvent.java:27) ~[STEMCraft-1.5.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:git-Purpur-2159]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callInventoryOpenEventWithTitle(CraftEventFactory.java:1438) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at net.minecraft.server.level.ServerPlayer.openMenu(ServerPlayer.java:1628) ~[?:?]
        at net.minecraft.world.item.trading.Merchant.openTradingScreen(Merchant.java:41) ~[?:?]
        at net.minecraft.world.entity.npc.Villager.startTrading(Villager.java:454) ~[?:?]
        at net.minecraft.world.entity.npc.Villager.mobInteract(Villager.java:432) ~[?:?]
        at net.minecraft.world.entity.Mob.interact(Mob.java:1383) ~[?:?]
        at net.minecraft.world.entity.player.Player.interactOn(Player.java:1171) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl$4.performInteraction(ServerGamePacketListenerImpl.java:2824) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl$4.a(ServerGamePacketListenerImpl.java:2844) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundInteractPacket$InteractionAction.dispatch(ServerboundInteractPacket.java:131) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundInteractPacket.dispatch(ServerboundInteractPacket.java:80) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleInteract(ServerGamePacketListenerImpl.java:2783) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:67) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:12) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1498) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1475) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1398) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1590) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[purpur-1.20.4.jar:git-Purpur-2159]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.4.jar:git-Purpur-2159]
@nomadjimbob nomadjimbob added type: bug Something doesn't work as it was intended to. priority: normal This issue is an obvious bug or problem that does not majorly hinder gameplay or development. labels Apr 7, 2024
@nomadjimbob
Copy link
Member

Need the code to ensure that only 2 items are being placed in the recipe. I assume that the item cost is causing this, providing more than 2 types of coins

@nomadjimbob nomadjimbob added this to the 1.5 milestone Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: normal This issue is an obvious bug or problem that does not majorly hinder gameplay or development. type: bug Something doesn't work as it was intended to.
Development

No branches or pull requests

2 participants