ProtocolLib icon indicating copy to clipboard operation
ProtocolLib copied to clipboard

Unable to read MobEffects with Build #599

Open ventolotl opened this issue 1 year ago • 2 comments

  • [x] This issue is not solved in a development build

Describe the bug

When you listen to the RemoveEntityEffect packet and try to read it by packet.getEffectTypes().read(0), ProtocolLib fails and produces an error. I tested it on a 1.16.5 server.

This issue first appeared in Build #599 (https://ci.dmulloy2.net/job/ProtocolLib/599/) and did thus not appear in Build #598. Therefore, the error is somewhere in commit #1869.

To Reproduce Steps to reproduce the behavior:

  1. Listen to RemoveEntityEffect
  2. Write packet.getEffectTypes().read(0)

Expected behavior You will get the error:

FieldAccessException: Field index 0 is out of bounds for length 0
    at com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49)
    at com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:218)
    ...

ventolotl avatar Sep 13 '22 15:09 ventolotl

What server software are you using?

dmulloy2 avatar Oct 16 '22 18:10 dmulloy2

What server software are you using?

I would expect this to happen on Paper and Spigot, see my comment on the linked PR

jpenilla avatar Nov 25 '22 20:11 jpenilla