ProtocolLib

3M Downloads

Error using getMultiBlockChangeInfoArrays() with MULTI_BLOCK_CHANGE packet

repeater64 opened this issue ยท 2 comments

commented

Follow this template except for feature requests. Use pastebin when providing /protocol dump and any relevant errors.

Make sure you've done the following:

  • [X ] You're using the latest build for your server version
  • [X ] This isn't an issue caused by another plugin
  • [X ] You've checked for duplicate issues
  • [X ] You didn't use /reload

Debug paste link:

Description and relevant errors:

Hi! In my plugin, I'm listening to the packet send event for MULTI_BLOCK_CHANGE and doing "event.getPacket().getMultiBlockChangeInfoArrays().readSafely(0);"

And this is causing an error within protocollib:

com.comphenix.protocol.reflect.FieldAccessException: No field with type net.minecraft.server.v1_16_R3.ChunkCoordIntPair exists in class PacketPlayOutMultiBlockChange.

Full error on pastebin, https://pastebin.com/dTBH9qSs

Thank you!

Edit: Just noticed I was actually on 1.16.4, in case that was the problem I just updated and the issue is still there.

commented

Hey, I'm still getting this issue with the latest release of ProtocolLib on a 1.17.1 server (not using the same plugin as last time I opened the issue, I'm working on something totally new and hit the exact same issue) and really need it fixed. Why did you close this issue last time?

Any help is appreciated.

commented

Note: The first line of the error is now
com.comphenix.protocol.reflect.FieldAccessException: No field with type net.minecraft.world.level.ChunkCoordIntPair exists in class PacketPlayOutMultiBlockChange.

And the full stack trace is:

[11:33:07 ERROR]: [SnapItems] Unhandled exception occured in onPacketSending(PacketEvent) for SnapItems
com.comphenix.protocol.reflect.FieldAccessException: No field with type net.minecraft.world.level.ChunkCoordIntPair exists in class PacketPlayOutMultiBlockChange.
        at com.comphenix.protocol.reflect.StructureModifier.readInternal(StructureModifier.java:218) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:197) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.events.AbstractStructure.getMultiBlockChangeInfoArrays(AbstractStructure.java:484) ~[ProtocolLib.jar:?]
        at com.snapbeasts.customBlocks.NoteBlockChangePacketListener.onPacketSending(NoteBlockChangePacketListener.java:41) ~[SnapItems-1.0.0.jar:?]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:195) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.PacketFilterManager.handlePacket(PacketFilterManager.java:535) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:516) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.ProtocolInjector.packetQueued(ProtocolInjector.java:346) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.ProtocolInjector.onPacketSending(ProtocolInjector.java:308) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.ChannelInjector.processSending(ChannelInjector.java:433) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.ChannelInjector.access$800(ChannelInjector.java:70) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.ChannelInjector$3.handleScheduled(ChannelInjector.java:373) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.ChannelInjector$3.onMessageScheduled(ChannelInjector.java:343) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.ChannelProxy$2.schedulingRunnable(ChannelProxy.java:127) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.EventLoopProxy.execute(EventLoopProxy.java:95) ~[ProtocolLib.jar:?]
        at net.minecraft.network.Connection.writePacket(Connection.java:423) ~[app:?]
        at net.minecraft.network.Connection.send(Connection.java:370) ~[app:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1997) ~[app:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1983) ~[app:?]
        at net.minecraft.server.level.ChunkHolder.broadcast(ChunkHolder.java:537) ~[app:?]
        at net.minecraft.server.level.ChunkHolder.broadcastChanges(ChunkHolder.java:464) ~[app:?]
        at net.minecraft.server.level.ServerChunkCache.tickChunks(ServerChunkCache.java:1035) ~[app:?]
        at net.minecraft.server.level.ServerChunkCache.tick(ServerChunkCache.java:934) ~[app:?]
        at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:731) ~[app:?]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1627) ~[patched_1.17.1.jar:git-Paper-384]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:490) ~[patched_1.17.1.jar:git-Paper-384]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1483) ~[patched_1.17.1.jar:git-Paper-384]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1282) ~[patched_1.17.1.jar:git-Paper-384]        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-384]
        at java.lang.Thread.run(Thread.java:831) ~[?:?]
[11:33:07 ERROR]: Parameters:
  net.minecraft.network.protocol.game.PacketPlayOutMultiBlockChange@50559c02[
    b=SectionPosition{x=2, y=4, z=-5}
    c={1297,1298}
    d={Block{minecraft:dirt},Block{minecraft:note_block}[instrument=harp,note=9,powered=false]}
    e=false
  ]