[Bug] Trading GUI could be closed by other players.
remanam opened this issue ยท 9 comments
Describe the bug
We have a trade npc. I want to buy something.
You also wants to buy from that npc. When you right click on trade npc you automatically close MY npc GUI
To Reproduce
- Create npc with trades
- Right click
- Right click on it with another player
- Your by another player GUI closed :(
Expected behavior
Every player has its own window for trading like with vanilla village traders
PS: no error in server log (easy npc debug is true)
Thanks for the report.
I actually technical using the vanilla villager trade window, so it's not custom implementation or so.
See:
Could you please perform the following steps, to isolate the issue more in detail:
- Enable the debug mode
- Open the trade by different players
- Close the trade window from another player
- Add the relevant debug.log or relevant line to this bug.
See: https://github.com/MarkusBordihn/BOs-Easy-NPC/wiki/Debugging
The debug.log should show something like Open trading screen for ... with ... from ...
and some other information.
This will help me to isolate the issue more in detail and to fix it. Thanks.
[06Apr2024 13:09:08.085] [Server thread/DEBUG] [Easy NPC/]: Open trading screen for Villager['Desert (Armorer)'/8, l='ServerLevel[world]', x=-69.50, y=94.00, z=-415.50] with [net.minecraft.world.item.trading.MerchantOffer@669367c7] from ServerPlayer['Erik'/508, l='ServerLevel[world]', x=-70.99, y=94.00, z=-416.71]
[06Apr2024 13:09:11.494] [Server thread/DEBUG] [Easy NPC/]: Open trading screen for Villager['Desert (Armorer)'/8, l='ServerLevel[world]', x=-69.50, y=94.00, z=-415.50] with [net.minecraft.world.item.trading.MerchantOffer@669367c7] from ServerPlayer['Erik1'/317, l='ServerLevel[world]', x=-69.57, y=94.00, z=-417.46]
I will also upload video. 10 minutes
video_2024-04-06_13-22-49.mp4
I tried this on standart villager, problem didn't repeat
Thanks a lot for the details. According the log the different users are recognized correct as different users, so I could exclude this as error source.
I will work on a fix for this.
Very strange bug. I Assumed that you didn't change vanilla behavior, but anyway problem is occured. A couple days ago i was on 3.x.x version. Deleted old npc, deleted config and after that installed 4.20.
May be that information will help
Server is Crashing on version 4.3.1 :(
[12:59:13] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
java.lang.AbstractMethodError: Receiver class de.markusbordihn.easynpc.entity.easynpc.npc.Villager does not define or inherit an implementation of the resolved method 'abstract net.minecraft.world.entity.player.Player getTradingPlayer()' of interface de.markusbordihn.easynpc.entity.easynpc.data.TradingData.
at de.markusbordihn.easynpc.entity.easynpc.data.TradingData.isTrading(TradingData.java:256) ~[easy_npc_1.20.1-4.3.1.jar%23204!/:4.3.1] {re:classloading}
at de.markusbordihn.easynpc.entity.easynpc.data.TradingData.openTradingScreen(TradingData.java:398) ~[easy_npc_1.20.1-4.3.1.jar%23204!/:4.3.1] {re:classloading}
at de.markusbordihn.easynpc.entity.EasyNPCBaseEntity.m_6071_(EasyNPCBaseEntity.java:375) ~[easy_npc_1.20.1-4.3.1.jar%23204!/:4.3.1] {re:classloading}
at net.minecraft.world.entity.Mob.m_6096_(Mob.java:1122) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.world.entity.player.Player.m_36157_(Player.java:979) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:computing_frames,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_playerentity_iswearing,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_playerentity_iswearing,re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_playerentity_iswearing}
at net.minecraft.server.network.ServerGamePacketListenerImpl$1.m_143678_(ServerGamePacketListenerImpl.java:1462) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading}
at net.minecraft.server.network.ServerGamePacketListenerImpl$1.m_142299_(ServerGamePacketListenerImpl.java:1474) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading}
at net.minecraft.network.protocol.game.ServerboundInteractPacket$InteractionAction.m_142457_(ServerboundInteractPacket.java:116) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading}
at net.minecraft.network.protocol.game.ServerboundInteractPacket.m_179617_(ServerboundInteractPacket.java:66) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading}
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_6946_(ServerGamePacketListenerImpl.java:1457) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:badpackets.mixins.json:MixinServerGamePacketListenerImpl,pl:mixin:A}
at net.minecraft.network.protocol.game.ServerboundInteractPacket.m_5797_(ServerboundInteractPacket.java:53) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading}
at net.minecraft.network.protocol.game.ServerboundInteractPacket.m_5797_(ServerboundInteractPacket.java:13) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading}
at net.minecraft.network.protocol.PacketUtils.m_263899_(PacketUtils.java:22) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading}
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:classloading}
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:computing_frames,re:mixin,re:classloading}
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:770) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:161) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A}
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:753) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:747) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A}
at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:139) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:733) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:665) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23261!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_minecraftserver,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A}
at java.lang.Thread.run(Thread.java:1583) ~[?:?] {re:mixin}