ProtocolLib

3M Downloads

Weather packet getting wrong class mapping

tomcraft opened this issue ยท 7 comments

commented

Describe the bug
Using latest ProtocolLib the Packet type PacketType.Play.Server.SPAWN_ENTITY_WEATHER gets mapped to PacketPlayOutSpawnEntityLiving.
So, if I listen to this packet, i receive the PacketPlayOutSpawnEntityLiving ones, and if I try to send one, it sends a PacketPlayOutSpawnEntityLiving.

To Reproduce
I used this to print some debug:

System.out.println(PacketType.Play.Server.SPAWN_ENTITY_WEATHER);
System.out.println("classNames = " + Arrays.toString(PacketType.Play.Server.SPAWN_ENTITY_WEATHER.getClassNames()));
System.out.println("packetClass = " + PacketType.Play.Server.SPAWN_ENTITY_WEATHER.getPacketClass());

the output is:

SPAWN_ENTITY_WEATHER[class=PacketPlayOutSpawnEntityLiving, id=2]
classNames = [net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityWeather, net.minecraft.network.play.server.SPacketSpawnGlobalEntity]
packetClass = class net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving

Expected behavior
The packet class should be the right one, as specified in classNames.
I looked at the source code to PR it myself, but couldn't figure out why is this happening.

Thank you for your work, have a nice day.

commented

Probably caused by the 1.16.5 change, where spawn entity weather packet stopped existing.

commented

I know about that, but i don't run 1.16.

commented

Is this closed because a fix has been applied or because of innactivity ? I'll test the exact same code with latest ProtocolLib snapshot and let you know.

commented

i require Java 16 to build master branch, is it intended ?
image

commented
commented

it seems that this issue is solved, good job and good luck for what's remaining to do :)

commented

Confirm this on 1.12.2