Unable to intercept a read client packet
zaralX opened this issue ยท 2 comments
[ProtocolLib] INTERNAL ERROR: Unable to intercept a read client packet.
If this problem hasn't already been reported, please open a ticket
at https://github.com/dmulloy2/ProtocolLib/issues with the following data:
Stack Trace:
java.lang.IllegalArgumentException: Unable to find a field null with the type com.mojang.authlib.GameProfile in net.minecraft.network.protocol.login.PacketLoginInStart
at ProtocolLib.jar//com.comphenix.protocol.reflect.FuzzyReflection.getFieldByType(FuzzyReflection.java:397)
at ProtocolLib.jar//com.comphenix.protocol.reflect.accessors.Accessors.getFieldAccessor(Accessors.java:57)
at ProtocolLib.jar//com.comphenix.protocol.injector.netty.ChannelInjector.handleLogin(ChannelInjector.java:658)
at ProtocolLib.jar//com.comphenix.protocol.injector.netty.ChannelInjector.decode(ChannelInjector.java:591)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at ProtocolLib.jar//com.comphenix.protocol.injector.netty.ChannelInjector$2.channelRead(ChannelInjector.java:292)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Unknown Source)
Dump:
Parameters:
io.netty.buffer.PooledUnsafeDirectByteBuf@37c86557[
memoryAddress=1924833081328
recyclerHandle=io.netty.util.Recycler$DefaultHandle@7d6ae942
chunk=Chunk(13bb728f: 32%, 1302528/4194304)
handle=15199713166884905
memory=java.nio.DirectByteBuffer[pos=0 lim=4194304 cap=4194304]
offset=223152
length=34
maxLength=48
cache=io.netty.buffer.PoolThreadCache@51b0e9fd
tmpNioBuf=java.nio.DirectByteBuffer[pos=223200 lim=223200 cap=4194304]
allocator=PooledByteBufAllocator(directByDefault: true)
refCnt=2
readerIndex=34
writerIndex=34
markedReaderIndex=0
markedWriterIndex=0
maxCapacity=2147483647
]
manager:
com.comphenix.protocol.injector.PacketFilterManager@4aa830b[
unhookTask=com.comphenix.protocol.injector.DelayedSingleTask@1f0061c0
packetListeners=[PacketAdapter[plugin=CookieClicker, sending=ListeningWhitelist[priority=NORMAL, packets=[ENTITY_HEAD_ROTATION[class=PacketPlayOutEntityHeadRotation, id=62], SPAWN_ENTITY[class=PacketPlayOutSpawnEntity, id=0], COLLECT[class=PacketPlayOutCollect, id=97], SPAWN_ENTITY_EXPERIENCE_ORB[class=PacketPlayOutSpawnEntityExperienceOrb, id=1], SPAWN_ENTITY_LIVING[PLAY, SERVER, 2, classNames: [net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityLiving, net.minecraft.network.protocol.game.ClientboundSpawnEntityLivingPacket, net.minecraft.network.play.server.SPacketSpawnMob] (unregistered)], ENTITY_TELEPORT[class=PacketPlayOutEntityTeleport, id=98], SPAWN_ENTITY_PAINTING[PLAY, SERVER, 3, classNames: [net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityPainting, net.minecraft.network.protocol.game.ClientboundSpawnEntityPaintingPacket, net.minecraft.network.play.server.SPacketSpawnPainting] (unregistered)], NAMED_ENTITY_SPAWN[class=PacketPlayOutNamedEntitySpawn, id=4], ENTITY_EFFECT[class=PacketPlayOutEntityEffect, id=101], ANIMATION[class=ClientboundBlockChangedAckPacket, id=6], REL_ENTITY_MOVE[class=PacketPlayOutRelEntityMove, id=41], BLOCK_BREAK_ANIMATION[class=PacketPlayOutBlockBreakAnimation, id=9], ENTITY_MOVE_LOOK[class=PacketPlayOutRelEntityMoveLook, id=42], ENTITY_LOOK[class=PacketPlayOutEntityLook, id=43], ENTITY_METADATA[class=PacketPlayOutEntityMetadata, id=77], ATTACH_ENTITY[class=PacketPlayOutAttachEntity, id=78], ENTITY_VELOCITY[class=PacketPlayOutEntityVelocity, id=79], ENTITY_EQUIPMENT[class=PacketPlayOutEntityEquipment, id=80], BED[PLAY, SERVER, 251, classNames: [net.minecraft.network.protocol.game.PacketPlayOutBed, net.minecraft.network.protocol.game.ClientboundBedPacket, net.minecraft.network.play.server.SPacketUseBed] (unregistered)], ENTITY_STATUS[class=PacketPlayOutEntityStatus, id=27], REMOVE_ENTITY_EFFECT[class=PacketPlayOutRemoveEntityEffect, id=59]], gamephase=PLAYING, options=[]], receiving=EMPTY_WHITELIST]]
packetInjector=com.comphenix.protocol.injector.netty.ProtocolInjector$5@75c6f2c9
playerInjection=com.comphenix.protocol.injector.netty.ProtocolInjector$4@6d9b9a0
inputBufferedPackets=[]
recievedListeners=com.comphenix.protocol.injector.SortedPacketListenerList@83b56eb
sendingListeners=com.comphenix.protocol.injector.SortedPacketListenerList@4364eaf5
hasClosed=false
classLoader=PluginClassLoader{plugin=ProtocolLib v4.8.0, pluginEnabled=true, url=plugins\ProtocolLib.jar}
reporter=com.comphenix.protocol.ProtocolLib$1@1e0c0c2f
server=CraftServer{serverName=Paper,serverVersion=git-Paper-550,minecraftVersion=1.19.4}
library=ProtocolLib v4.8.0
asyncFilterManager=com.comphenix.protocol.async.AsyncFilterManager@27f1122c
knowsServerPackets=true
knowsClientPackets=true
phaseLoginCount=0
phasePlayingCount=1
packetCreation=false
nettyInjector=com.comphenix.protocol.injector.netty.ProtocolInjector@f1576b6
pluginVerifier=com.comphenix.protocol.injector.PluginVerifier@7becbb10
hasRecycleDistance=true
minecraftVersion=(MC: 1.19.4)
debug=false
]
Sender:
com.comphenix.protocol.injector.netty.ChannelInjector@69d5d094[
decodeBuffer=protected void net.minecraft.network.PacketDecoder.decode(io.netty.channel.ChannelHandlerContext,io.netty.buffer.ByteBuf,java.util.List) throws java.lang.Exception
encodeBuffer=protected void net.minecraft.network.PacketEncoder.encode(io.netty.channel.ChannelHandlerContext,java.lang.Object,io.netty.buffer.ByteBuf) throws java.lang.Exception
factory=com.comphenix.protocol.injector.netty.InjectionFactory@20d515ee
player=CraftPlayer{name=zaralX}
updated=
playerName=zaralX
playerConnection=net.minecraft.server.network.PlayerConnection@6ccaa5a6
networkManager=net.minecraft.network.NetworkManager@2638d69d
originalChannel=[id: 0x72843f07, L:/127.0.0.1:25565 - R:/127.0.0.1:65533]
channelField=VolatileField [accessor=DefaultFieldAccessor [field=public io.netty.channel.Channel net.minecraft.network.NetworkManager.m], container=net.minecraft.network.NetworkManager@2638d69d, previous=[id: 0x72843f07, L:/127.0.0.1:25565 - R:/127.0.0.1:65533], current=com.comphenix.protocol.injector.netty.ChannelInjector$3@5a4b86eb, previousLoaded=true, currentSet=true, forceAccess=true]
packetMarker={}
currentEvent=
finalEvent=
unfilteredProcessedPackets=com.comphenix.protocol.injector.netty.PacketFilterQueue@6bd6ee20
vanillaDecoder=net.minecraft.network.PacketDecoder@6d2c516f
vanillaEncoder=net.minecraft.network.PacketEncoder@67f1d6ed
finishQueue=[]
channelListener=com.comphenix.protocol.injector.netty.ProtocolInjector@f1576b6
processor=com.comphenix.protocol.injector.NetworkProcessor@4597ddee
injected=true
closed=false
cumulation=PooledUnsafeDirectByteBuf(ridx: 34, widx: 34, cap: 34)
cumulator=io.netty.handler.codec.ByteToMessageDecoder$1@4a3f5b1a
singleDecode=false
first=true
firedChannelRead=false
selfFiredChannelRead=true
decodeState=1
discardAfterReads=16
numReads=0
added=true
]
Version:
ProtocolLib v4.8.0
Java Version:
18.0.1.1
Server:
git-Paper-550 (MC: 1.19.4)
im using this:
public final boolean hideEntity(Player observer, Entity entity) {
validate(observer, entity);
boolean visibleBefore = setVisibility(observer, entity.getEntityId(), false);
if (visibleBefore) {
PacketContainer destroyEntity = new PacketContainer(ENTITY_DESTROY);
destroyEntity.getIntegerArrays().write(0, new int[] { entity.getEntityId() });
// Make the entity disappear
try {
manager.sendServerPacket(observer, destroyEntity);
} catch (InvocationTargetException e) {
throw new RuntimeException("Cannot send server packet.", e);
}
}
return visibleBefore;
}