Send correct level type in JoinGame packet
When on a superflat world, the level type field would previously just be "default",
which caused the client to render the sky black.
@@ -120,6 +120,8 @@ impl<'a> System<'a> for JoinHandlerSystem {
Stage::Initial => {
let playercomp = playercomps.get(player).unwrap();
+ let level_type = &level.generator_name;
+
// Send Join Game, then queue chunks for loading + sending.
let join_game = JoinGame::new(
player.id() as i32,
@@ -127,7 +129,7 @@ impl<'a> System<'a> for JoinHandlerSystem {
Dimension::Overwold.get_id(),
Difficulty::Medium.get_id(),
0, // Max players - not used
- "default".to_string(), // Level type
+ level_type.to_string(),
false, // Reduced debug info
);
crate::network::send_packet_to_player(net, join_game);
