server: handle JoinGame_WorldNames_IsHard_SimDist packet variant

This commit is contained in:
ice_iix 2021-12-26 16:52:59 -08:00
parent 4cd8e627d9
commit 8f597b9e45
2 changed files with 8 additions and 1 deletions

View File

@ -1145,7 +1145,6 @@ state_packets!(
field block_entities: LenPrefixed<VarInt, packet::BlockEntityAtPackedLocation> =,
field trust_edges: bool =,
// TODO: BitSets instead of long arrays
field sky_light_mask: LenPrefixed<VarInt, i64> =,
field block_light_mask: LenPrefixed<VarInt, i64> =,
field empty_sky_light_mask: LenPrefixed<VarInt, i64> =,

View File

@ -581,6 +581,7 @@ impl Server {
self pck {
PluginMessageClientbound_i16 => on_plugin_message_clientbound_i16,
PluginMessageClientbound => on_plugin_message_clientbound_1,
JoinGame_WorldNames_IsHard_SimDist => on_game_join_worldnames_ishard_simdist,
JoinGame_WorldNames_IsHard => on_game_join_worldnames_ishard,
JoinGame_WorldNames => on_game_join_worldnames,
JoinGame_HashedSeed_Respawn => on_game_join_hashedseed_respawn,
@ -1056,6 +1057,13 @@ impl Server {
.write_plugin_message(channel, data); // TODO handle errors
}
fn on_game_join_worldnames_ishard_simdist(
&mut self,
join: packet::play::clientbound::JoinGame_WorldNames_IsHard_SimDist,
) {
self.on_game_join(join.gamemode, join.entity_id)
}
fn on_game_join_worldnames_ishard(
&mut self,
join: packet::play::clientbound::JoinGame_WorldNames_IsHard,