Make sure you're doing the following
Describe the question
I want do play the item pickup animation to the player. I have checked the minecraft code (net.minecraft.network.protocol.game.ServerboundPickItemPacket) and there's only one field for the slot where the item will go but on wiki there are 3 fields which makes sense because you would have to specify all these information, right?

API method(s) used
List what API method(s) you're using
Expected behavior
Send the animation with the given item and amount.
Code
final PacketContainer packet = new PacketContainer(PacketType.Play.Client.PICK_ITEM);
packet.getIntegers()
.write(0, itemToPickup.getEntityId())
.write(1, player.getEntityId())
.write(2, amountLeft);
Additional context
com.comphenix.protocol.reflect.FieldAccessException: Field index out of bounds. (Index: 1, Size: 1)
Make sure you're doing the following
/reloadDescribe the question

I want do play the item pickup animation to the player. I have checked the minecraft code (
net.minecraft.network.protocol.game.ServerboundPickItemPacket) and there's only one field for the slot where the item will go but on wiki there are 3 fields which makes sense because you would have to specify all these information, right?API method(s) used
List what API method(s) you're using
Expected behavior
Send the animation with the given item and amount.
Code
Additional context
com.comphenix.protocol.reflect.FieldAccessException: Field index out of bounds. (Index: 1, Size: 1)