ProtocolLib

3M Downloads

1.17 USE_ENTITY entity use action IndexOutOfBoundsException

LoneDev6 opened this issue ยท 1 comments

commented

Describe the bug
Seems USE_ENTITY packet is changed.
This server is running CraftBukkit version 3143-Spigot-66f9d3c-f66c437 (MC: 1.17) (Implementing API version 1.17-R0.1-SNAPSHOT)
ProtocolLib version 4.7.0-SNAPSHOT-b509

Code at line 69

packet.getEntityUseActions().getValues().get(0)

Log:

[12:43:47] [Netty Server IO #1/ERROR]: [ItemsAdder] Unhandled exception occured in onPacketReceiving(PacketEvent) for ItemsAdder
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
        at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
        at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
        at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
        at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
        at dev.lone.itemsadder.Core.ItemsDynamicity.Behaviours.BukkitEventsHandlers.PlaceableEntityEventsHandler$1.onPacketReceiving(PlaceableEntityEventsHandler.java:69) ~[ItemsAdder.jar:?]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokeReceivingListener(SortedPacketListenerList.java:114) [ProtocolLib.jar:4.7.0-SNAPSHOT-b509]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketRecieving(SortedPacketListenerList.java:67) [ProtocolLib.jar:4.7.0-SNAPSHOT-b509]
        at com.comphenix.protocol.injector.PacketFilterManager.handlePacket(PacketFilterManager.java:537) [ProtocolLib.jar:4.7.0-SNAPSHOT-b509]
        at com.comphenix.protocol.injector.PacketFilterManager.invokePacketRecieving(PacketFilterManager.java:509) [ProtocolLib.jar:4.7.0-SNAPSHOT-b509]
        at com.comphenix.protocol.injector.netty.ProtocolInjector.packetReceived(ProtocolInjector.java:360) [ProtocolLib.jar:4.7.0-SNAPSHOT-b509]
        at com.comphenix.protocol.injector.netty.ProtocolInjector.onPacketReceiving(ProtocolInjector.java:325) [ProtocolLib.jar:4.7.0-SNAPSHOT-b509]
        at com.comphenix.protocol.injector.netty.ChannelInjector.decode(ChannelInjector.java:593) [ProtocolLib.jar:4.7.0-SNAPSHOT-b509]
        at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at com.comphenix.protocol.injector.netty.ChannelInjector$2.channelRead(ChannelInjector.java:289) [ProtocolLib.jar:4.7.0-SNAPSHOT-b509]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:547) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:501) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [spigot.jar:3143-Spigot-66f9d3c-f66c437]
        at java.lang.Thread.run(Thread.java:831) [?:?]
[12:43:47] [Netty Server IO #1/ERROR]: Parameters:
  net.minecraft.network.protocol.game.PacketPlayInUseEntity@47fbd730[
    a=838
    b=net.minecraft.network.protocol.game.PacketPlayInUseEntity$1@301955ba
    c=false
  ]

>
commented

Still packet.getEntityUseActions().getValues().get(0) not working