diff --git a/pumpkin/src/client/player_packet.rs b/pumpkin/src/client/player_packet.rs index 2328d2943..fff71fb08 100644 --- a/pumpkin/src/client/player_packet.rs +++ b/pumpkin/src/client/player_packet.rs @@ -50,9 +50,7 @@ impl Player { self.awaiting_teleport = None; } else { - self.kick(TextComponent::text( - "Wrong teleport id", - )) + self.kick(TextComponent::text("Wrong teleport id")) } } else { self.kick(TextComponent::text( diff --git a/pumpkin/src/entity/player.rs b/pumpkin/src/entity/player.rs index 221ac0021..64f46e585 100644 --- a/pumpkin/src/entity/player.rs +++ b/pumpkin/src/entity/player.rs @@ -98,7 +98,7 @@ impl Player { pub fn teleport(&mut self, x: f64, y: f64, z: f64, yaw: f32, pitch: f32) { // this is the ultra special magic code used to create the teleport id self.teleport_id_count += 1; - if self.teleport_id_count == i32::max_value() { + if self.teleport_id_count == i32::MAX { self.teleport_id_count = 0; } let entity = &mut self.entity;