brunyman/MPDB

Need Fix

Opened this issue · 2 comments

[22:27:40] [Server thread/WARN]: java.lang.IllegalArgumentException: Unable to read from java.io.DataInputStream@77b0ed8c
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:115)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.fromBase64(Version_1_20_R2.java:86)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setInventory(InventoryDataHandler.java:320)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setPlayerData(InventoryDataHandler.java:95)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler$2.run(InventoryDataHandler.java:240)
[22:27:40] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[22:27:40] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1495)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:482)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1404)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1175)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318)
[22:27:40] [Server thread/WARN]: at java.base/java.lang.Thread.run(Thread.java:1589)
[22:27:40] [Server thread/WARN]: Caused by: java.lang.reflect.InvocationTargetException
[22:27:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
[22:27:40] [Server thread/WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:113)
[22:27:40] [Server thread/WARN]: ... 12 more
[22:27:40] [Server thread/WARN]: Caused by: java.lang.RuntimeException: Missing type on ListTag
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.d(NBTTagList.java:34)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.a(NBTTagList.java:26)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.c(NBTTagList.java:17)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:310)
[22:27:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[22:27:40] [Server thread/WARN]: ... 14 more
[22:27:40] [Server thread/WARN]: java.lang.IllegalArgumentException: Unable to read from java.io.DataInputStream@12980ade
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:115)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.fromBase64(Version_1_20_R2.java:86)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setArmor(InventoryDataHandler.java:399)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setPlayerData(InventoryDataHandler.java:96)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler$2.run(InventoryDataHandler.java:240)
[22:27:40] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[22:27:40] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1495)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:482)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1404)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1175)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318)
[22:27:40] [Server thread/WARN]: at java.base/java.lang.Thread.run(Thread.java:1589)
[22:27:40] [Server thread/WARN]: Caused by: java.lang.reflect.InvocationTargetException
[22:27:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
[22:27:40] [Server thread/WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:113)
[22:27:40] [Server thread/WARN]: ... 12 more
[22:27:40] [Server thread/WARN]: Caused by: java.lang.RuntimeException: Missing type on ListTag
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.d(NBTTagList.java:34)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.a(NBTTagList.java:26)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.c(NBTTagList.java:17)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:310)
[22:27:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[22:27:40] [Server thread/WARN]: ... 14 more
[22:27:40] [Server thread/WARN]: java.lang.IllegalArgumentException: Unable to read from java.io.DataInputStream@41cc9b04
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:115)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.fromBase64(Version_1_20_R2.java:86)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.events.handlers.EnderchestDataHandler.setPlayerData(EnderchestDataHandler.java:66)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.events.handlers.EnderchestDataHandler$2.run(EnderchestDataHandler.java:142)
[22:27:40] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[22:27:40] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1495)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:482)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1404)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1175)
[22:27:40] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318)
[22:27:40] [Server thread/WARN]: at java.base/java.lang.Thread.run(Thread.java:1589)
[22:27:40] [Server thread/WARN]: Caused by: java.lang.reflect.InvocationTargetException
[22:27:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
[22:27:40] [Server thread/WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[22:27:40] [Server thread/WARN]: at MysqlPlayerDataBridge_4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:113)
[22:27:40] [Server thread/WARN]: ... 11 more
[22:27:40] [Server thread/WARN]: Caused by: java.lang.RuntimeException: Missing type on ListTag
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.d(NBTTagList.java:34)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.a(NBTTagList.java:26)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTTagList$1.c(NBTTagList.java:17)
[22:27:40] [Server thread/WARN]: at net.minecraft.nbt.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:310)
[22:27:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[22:27:40] [Server thread/WARN]: ... 13 more

I found a solution @brunyman
The method uses to make the read is not good, I change to c in the READ_NBT variable and I could access to my inventory from 1.20.1

You need also to change the method uses to make the write, I changed a to b in the WRITE_NBT variable.
If you check with the mapping translation, you just keep the "unamed" nbt instead of the "any" nbt.

Can you try to test and change it on your side ? @brunyman
Have a nice day 💯