mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-09-30 04:47:28 +02:00
only send needed packets
This commit is contained in:
parent
f254cbebd2
commit
125c595c38
@ -51,10 +51,12 @@ public class MixinProtocolc0_30toc0_30cpe extends AbstractProtocol<ClientboundPa
|
||||
changeRainState.write(Type.FLOAT, 0F); // unused
|
||||
changeRainState.sendRaw();
|
||||
|
||||
final PacketWrapper changeRainType = PacketWrapper.create(ClientboundPackets1_19_3.GAME_EVENT, wrapper.user());
|
||||
changeRainType.write(Type.BYTE, (byte) 7);
|
||||
changeRainType.write(Type.FLOAT, weatherType == WeatherTypes.RAINING ? 0F : 1F);
|
||||
changeRainType.sendRaw();
|
||||
if (weatherType == WeatherTypes.RAINING || weatherType == WeatherTypes.SNOWING) {
|
||||
final PacketWrapper changeRainType = PacketWrapper.create(ClientboundPackets1_19_3.GAME_EVENT, wrapper.user());
|
||||
changeRainType.write(Type.BYTE, (byte) 7);
|
||||
changeRainType.write(Type.FLOAT, weatherType == WeatherTypes.RAINING ? 0F : 1F);
|
||||
changeRainType.sendRaw();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user