Bram1903 / AntiHealthIndicator

Enhance fairness with AntiHealthIndicator! Lightweight, async packet spoofing for gameplay integrity. Easy configurable!
https://discord.deathmotion.com
GNU General Public License v3.0
34 stars 5 forks source link

Warning on player switch server. #11

Closed HydrolienF closed 1 month ago

HydrolienF commented 4 months ago

I'm using AntiHealthIndicator last stable version & master build of packet event on a velicity proxy that player can join from 1.20.4 to 1.21.

I have a warning about antihealthindicator.

[22:17:46 WARN] [com.github.retrooper.packetevents.PacketEventsAPI]: PacketEvents caught an unhandled exception while calling your listener.
java.lang.ArrayIndexOutOfBoundsException: Index 47 out of bounds for length 3
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.readEnum(PacketWrapper.java:1407) ~[?:?]
        at com.github.retrooper.packetevents.protocol.component.builtin.item.ItemAttributeModifiers$Modifier.read(ItemAttributeModifiers.java:187) ~[?:?]
        at com.github.retrooper.packetevents.protocol.component.builtin.item.ItemAttributeModifiers$ModifierEntry.read(ItemAttributeModifiers.java:113) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.readCollection(PacketWrapper.java:1379) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.readList(PacketWrapper.java:1392) ~[?:?]
        at com.github.retrooper.packetevents.protocol.component.builtin.item.ItemAttributeModifiers.read(ItemAttributeModifiers.java:50) ~[?:?]
        at com.github.retrooper.packetevents.protocol.component.ComponentTypes$1.read(ComponentTypes.java:88) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.readItemStackModern(PacketWrapper.java:430) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.readItemStack(PacketWrapper.java:449) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.readEntityMetadata(PacketWrapper.java:909) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityMetadata.read(WrapperPlayServerEntityMetadata.java:52) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.readEvent(PacketWrapper.java:245) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.<init>(PacketWrapper.java:150) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.PacketWrapper.<init>(PacketWrapper.java:140) ~[?:?]
        at com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityMetadata.<init>(WrapperPlayServerEntityMetadata.java:36) ~[?:?]
        at com.deathmotion.antihealthindicator.packetlisteners.spoofers.EntityMetadataListener.onPacketSend(EntityMetadataListener.java:74) ~[?:?]
        at com.github.retrooper.packetevents.event.PacketSendEvent.call(PacketSendEvent.java:51) ~[?:?]
        at com.github.retrooper.packetevents.event.EventManager.callEvent(EventManager.java:52) ~[?:?]
        at io.github.retrooper.packetevents.handlers.PacketEventsEncoder.read(PacketEventsEncoder.java:46) ~[?:?]
        at io.github.retrooper.packetevents.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:70) ~[?:?]
        at io.github.retrooper.packetevents.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:32) ~[?:?]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:893) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:875) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:984) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:868) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:893) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:875) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:984) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:868) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:893) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:875) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:984) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:868) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:1015) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannel.write(AbstractChannel.java:301) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.connection.MinecraftConnection.delayedWrite(MinecraftConnection.java:249) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.connection.backend.BackendPlaySessionHandler.handleUnknown(BackendPlaySessionHandler.java:445) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.connection.MinecraftConnection.channelRead(MinecraftConnection.java:161) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.protocol.netty.AutoReadHolderHandler.channelRead(AutoReadHolderHandler.java:57) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.tryDecode(MinecraftDecoder.java:78) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.channelRead(MinecraftDecoder.java:61) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:509) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity-3.3.0-SNAPSHOT-398.jar:3.3.0-SNAPSHOT (git-350ea7f3-b398)]
        at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
[22:18:02 INFO]: [connected player] Hydrolien has disconnected
[22:18:02 INFO]: [server connection] Hydrolien -> pvp has disconnected
Bram1903 commented 4 months ago

Hey there,

This is not an issue with AntiHealthIndicator, but rather with the packet wrapper from PacketEvents. You mentioned you were on a master PE build, do you mean with the latest release or the latest snapshot, because in order to support 1.21 you need to be running the latest snapshot that you can find here: https://ci.codemc.io/job/retrooper/job/packetevents/

Kind regards, Bram

HydrolienF commented 4 months ago

I have build the lastest version myself to be sur to have last changes.

Bram1903 commented 4 months ago

Hmm, that's interesting. I'll take a look at it!

HydrolienF commented 4 months ago

If it's a packetevents issue I can close this ticket an open a new one on packetevents.

Bram1903 commented 4 months ago

Yeah, that would probably be the best. I'll mention it to the PE maintainers. You can mention my plugin if you want btw. Perhaps that gives them a better impression to what might be going wrong.

Bram1903 commented 4 months ago

Hey @HydrolienF,

Could you give the latest PacketEvents (2.4.0) a try? We still have the entity null issue going on, as mentioned in the release notes, but that requires some major new implementation, which is currently being worked on. Sorry for all these issues these weeks, but this is mostly due to the huge protocol changes happening from 1.20.4 -> 1.20.6 and 1.21. Changes are the entitymetadata listener will also throw an error from time to time, which could occur with villagers and the new wolf sort, but those will be patched very soon as well!

Kind regards, Bram

HydrolienF commented 4 months ago

Hey @Bram1903,

I have tried your last release with PacketEvents last release with 1.21 client and 1.20.6 server (with via version & viabackward to allow 1.20.4 to 1.21 client)

I still have the same warning when a player is teleporting Index 80 out of bounds for length 3 or hiting an other player Index 18 out of bounds for length 10.

Hydrolien

Bram1903 commented 4 months ago

Hey @Bram1903,

I have tried your last release with PacketEvents last release with 1.21 client and 1.20.6 server (with via version & viabackward to allow 1.20.4 to 1.21 client)

I still have the same warning when a player is teleporting Index 80 out of bounds for length 3 or hiting an other player Index 18 out of bounds for length 10.

Hydrolien

Hey man,

Thanks for testing, but I was already a bit afraid of this. Luckily this should all be fixed soon once the Network synced registries PR is finished and gets merged. It's a matter of time at this stage!

Kind regards, Bram

Bram1903 commented 2 months ago

@HydrolienF, running the latest PacketEvents snapshot, does this solve your issue?

Bram1903 commented 1 month ago

I will mark this issue as solved because I think this has been fixed when running PacketEvents-2.5.0-SNAPSHOT

HydrolienF commented 1 month ago

Sorry for not answering before, I don't have an error when switching server anymore. There is still some ArrayIndexOutOfBoundsException with packetevents, but I will ask for help on there Github