Weather packet getting wrong class mapping
tomcraft opened this issue ยท 7 comments
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.
Probably caused by the 1.16.5 change, where spawn entity weather packet stopped existing.
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.
@tomcraft yes
it seems that this issue is solved, good job and good luck for what's remaining to do :)