[Bug] Encountered an unexpected Exception with getTradingPlayer() and open trading screen.
remanam opened this issue ยท 11 comments
Was able to reproduce the issue on another PC with the latest forge version.
Working on a fix for this.
Hm.
Yes I use standart forge server 1.20.1, forge 47.2.20
I reproduced crush 5 times.
May be I need to delete config after upgrading from 4.3.0 to 4.3.1 ?
Should not be the issue with the config and is more related to the Java version or the server itself.
The server claims that getTradingPlayer
does not exists:
[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}
However, it clearly exists in the code:
I will add some additional Java specific hints which will hopefully fix this.
Very funny. Yeah I see it exists. If there is a fix it will be awesome and I'm going to try find problem
Did you get you jar file from here ?
https://www.curseforge.com/minecraft/mc-mods/easy-npc/files/5244194
Also my java on server is 21 (don't know exact version), and
on PC
java version "21.0.1" 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)
Faced a similar problem. If I trade with one merchant, the server crashes. He sells all kinds of weapons. Other trades just stopped opening. Appeared with the new version of the mod.
Should be fixed with 4.3.3.
See: https://modrinth.com/mod/easy-npc/version/6goQd23E
Let me know if you still running into any issues with trading.
Thanks.
Also my java on server is 21 (don't know exact version), and ...
1.20.1 normally runs on Java 17, this explain why I'm not getting the same error here.
Java 21 is more restricted, so specific parts needs to be coded differently.
But good to know that this will cause such weird issues and crashes. ;)
1.21 is the first version which is officially using Java 21, see:
https://www.minecraft.net/en-us/article/minecraft-snapshot-24w14a