ProtocolLib

3M Downloads

[1.20.1] Error using Citizens' npcs

GsTio86 opened this issue ยท 0 comments

commented
  • This issue is not solved in a development build

Describe the bug
NPC packet sending exception when using Citizens plug-in on Arclight
It is not visible when created. An error will appear immediately after logging in again and you cannot login.
image

To Reproduce
Steps to reproduce the behavior:

  1. Use Arclight 1.20.1 1.0.1
  2. Install ProtocolLib 5.1.0#668 and Citizens-2.0.32-b3204
  3. Start server and execute /npc create test
  4. At this time you will find that you cannot see the NPC
    Then log in again and this error will appear

Expected behavior
NPCs should display correctly and be able to login normally

Screenshots
https://gyazo.com/f91d44b34b190dd926dc9d272f3e2d0e

Version Info
https://pastebin.com/WKnZAxmY

Additional context
Error messagae

[02:36:40 ERROR]: Error receiving packet 82
java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "p_253940_" is null
        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.m_252763_(ClientboundSetEntityDataPacket.java:21) ~[server-1.20.1-20230612.114412-srg.jar%23197!/:?]
        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.m_5779_(ClientboundSetEntityDataPacket.java:41) ~[server-1.20.1-20230612.114412-srg.jar%23197!/:?]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:45) ~[server-1.20.1-20230612.114412-srg.jar%23197!/:?]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14) ~[server-1.20.1-20230612.114412-srg.jar%23197!/:?]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.82.Final.jar%23115!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.82.Final.jar%23115!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.82.Final.jar%23115!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.82.Final.jar%23115!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227) ~[?:?]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233) ~[?:?]
        at net.minecraft.network.Connection.m_243087_(ConnectionMixin.java:224) ~[server-1.20.1-20230612.114412-srg.jar%23197!/:?]
        at net.minecraft.network.Connection.lambda$sendPacket$8(ConnectionMixin.java:213) ~[server-1.20.1-20230612.114412-srg.jar%23197!/:?]
        at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.82.Final.jar%23116!/:4.1.82.Final]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar%23116!/:4.1.82.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar%23116!/:4.1.82.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[netty-transport-4.1.82.Final.jar%23119!/:4.1.82.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar%23116!/:4.1.82.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar%23116!/:4.1.82.Final]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[02:36:40 INFO]: GT86_OxO lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "p_253940_" is null