retrooper / packetevents

Precision meets performance—a powerful tool for mastering Minecraft packet manipulation with speed and finesse.
GNU General Public License v3.0
541 stars 152 forks source link

PacketEvents 2.0 does not relocate Adventure & leads to errors on outdated Paper. #282

Closed MWHunter closed 2 years ago

MWHunter commented 2 years ago

[11:14:45 WARN]: [com.github.retrooper.packetevents.PacketEventsAPI] PacketEvents caught an unhandled exception while calling your listener. java.lang.NoSuchMethodError: 'net.kyori.adventure.util.Codec net.kyori.adventure.util.Codec.codec(net.kyori.adventure.util.Codec$Decoder, net.kyori.adventure.util.Codec$Encoder)' at net.kyori.adventure.text.serializer.gson.legacyimpl.NBTLegacyHoverEventSerializerImpl.(NBTLegacyHoverEventSerializerImpl.java:43) ~[grim.jar:?] at net.kyori.adventure.text.serializer.gson.legacyimpl.NBTLegacyHoverEventSerializer.get(NBTLegacyHoverEventSerializer.java:43) ~[grim.jar:?] at com.github.retrooper.packetevents.util.AdventureSerializer.getGsonSerializer(AdventureSerializer.java:46) ~[grim.jar:?] at com.github.retrooper.packetevents.util.MappingHelper.getJSONObject(MappingHelper.java:47) ~[grim.jar:?] at com.github.retrooper.packetevents.protocol.world.states.WrappedBlockState.loadModern(WrappedBlockState.java:161) ~[grim.jar:?] at com.github.retrooper.packetevents.protocol.world.states.WrappedBlockState.(WrappedBlockState.java:47) ~[grim.jar:?] at ac.grim.grimac.utils.latency.CompensatedWorld.(CompensatedWorld.java:36) ~[grim.jar:?] at ac.grim.grimac.player.GrimPlayer.(GrimPlayer.java:230) ~[grim.jar:?] at ac.grim.grimac.utils.anticheat.PlayerDataManager.getPlayer(PlayerDataManager.java:36) ~[grim.jar:?] at ac.grim.grimac.events.packets.CheckManagerListener.onPacketSend(CheckManagerListener.java:877) ~[grim.jar:?] at com.github.retrooper.packetevents.event.PacketSendEvent.call(PacketSendEvent.java:47) ~[grim.jar:?] at com.github.retrooper.packetevents.event.EventManager.callEvent(EventManager.java:63) ~[grim.jar:?] at io.github.retrooper.packetevents.injector.latest.handlers.PacketEncoderLatest.read(PacketEncoderLatest.java:54) ~[grim.jar:?] at io.github.retrooper.packetevents.injector.latest.handlers.PacketEncoderLatest.encode(PacketEncoderLatest.java:87) ~[grim.jar:?] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[patched_1.17.1.jar:git-Paper-408] at net.minecraft.network.Connection.doSendPacket(Connection.java:450) ~[app:?] at net.minecraft.network.Connection.lambda$writePacket$8(Connection.java:424) ~[app:?] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[patched_1.17.1.jar:git-Paper-408] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[patched_1.17.1.jar:git-Paper-408] at java.lang.Thread.run(Thread.java:833) ~[?:?]

MWHunter commented 2 years ago

also broken on paper 1.18.1, but works fine on spigot 1.18.1

retrooper commented 2 years ago

Plugins?

retrooper commented 2 years ago

Does 2.0-9e54e4f296-1 fix anything?

MWHunter commented 2 years ago

no

MWHunter commented 2 years ago

You aren't going to fix this by changing how you do stuff. Adventure is shaded into Paper. So unless you are using your own version of adventure and relocating it, then it's going to error when running on anything that isn't latest.

retrooper commented 2 years ago

Okay that adds up.

retrooper commented 2 years ago

I assume this works on the very latest paper build though as they updated adventure API. (Just out of curiosity)

MWHunter commented 2 years ago

Yes

retrooper commented 2 years ago

Yea, I know I'm not very strict with detailed info for errors. But sometimes (which you later did specify) details such as version and whats kind of going on can help. Cause yea I tested it on 1.8 cause i could quickly boot that up. That obviously has no adventure so it worked.