samolego / HealthCare

Neat serverside mob health tags.
https://modrinth.com/mod/healthcare
MIT License
8 stars 3 forks source link

Players getting disconnected when grouped #6

Closed ojmaster closed 3 years ago

ojmaster commented 3 years ago

So I recently added this mod to my server and its great! But I started to notice my players were crashing whenever grouped together, when there were 3 or more players together they were constantly crashing with this report, The disconnecting stopped after I removed the mod but I'd like to know if there is a fix to this because my server members really prefer this over a different version which only shows the health in the boss bar.

Netty Epoll Server IO #47/ERROR java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]: io.netty.handler.codec.EncoderException: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at net.minecraft.class_2535.method_10761(class_2535.java:201)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:313)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at java.lang.Thread.run(Thread.java:748)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]: Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at java.util.ArrayList.rangeCheck(ArrayList.java:659)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at java.util.ArrayList.get(ArrayList.java:435)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at net.minecraft.class_2945.method_12787(class_2945.java:139)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at net.minecraft.class_2739.method_11052(class_2739.java:37)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at xyz.nucleoid.packettweaker.PacketContext.writeWithContext(PacketContext.java:29)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at net.minecraft.class_2545.redirect$bdj001$writePacket(class_2545.java:533)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at net.minecraft.class_2545.method_10838(class_2545.java:46)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at net.minecraft.class_2545.encode(class_2545.java:15)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
14.06 20:59:05 [Server] Netty Epoll Server IO #47/INFO [STDERR]:     ... 13 more
samolego commented 3 years ago

Thanks for reporting! Does it happen only with more players, or also when there's a bunch of mobs?

ojmaster commented 3 years ago

As far as I could tell it was only with several players but I'm going to try out your new build and hope this issue has been resolved :)

ojmaster commented 3 years ago

Can you make a version of this for 1.16.5 if that is possible :)