Alerts ChatBot: Support trigger on weather change

This commit is contained in:
BruceChen 2022-10-03 11:39:25 +08:00
parent 1d52d1eadd
commit 81a9955081
8 changed files with 147 additions and 19 deletions

View file

@ -1139,6 +1139,15 @@ namespace MinecraftClient.Protocol.Handlers
handler.GetWorld()[chunkX, chunkZ] = null;
}
break;
case PacketTypesIn.ChangeGameState:
if (protocolVersion >= MC_1_15_2_Version)
{
byte reason = dataTypes.ReadNextByte(packetData);
float state = dataTypes.ReadNextFloat(packetData);
handler.OnGameEvent(reason, state);
}
break;
case PacketTypesIn.PlayerInfo:
if (protocolVersion >= MC_1_8_Version)
{