mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Alerts ChatBot: Support trigger on weather change
This commit is contained in:
parent
1d52d1eadd
commit
81a9955081
8 changed files with 147 additions and 19 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -425,5 +425,12 @@ namespace MinecraftClient.Protocol
|
|||
/// <param name="userName">The player's username received from the server</param>
|
||||
/// <param name="playerProperty">Tuple<Name, Value, Signature(empty if there is no signature)></param>
|
||||
public void OnLoginSuccess(Guid uuid, string userName, Tuple<string, string, string>[]? playerProperty);
|
||||
|
||||
/// <summary>
|
||||
/// Used for a wide variety of game events, from weather to bed use to gamemode to demo messages.
|
||||
/// </summary>
|
||||
/// <param name="reason">Event type</param>
|
||||
/// <param name="value">Depends on Reason</param>
|
||||
public void OnGameEvent(byte reason, float value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue