From d4fb8be96347ef7d7766b37b33892dabe876f775 Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Sat, 4 Feb 2023 18:32:15 +0800 Subject: [PATCH] Add decimal points --- src/bot.rs | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bot.rs b/src/bot.rs index 7283cab..74fe146 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -196,7 +196,7 @@ pub async fn process_command( let bot_status = state.bot_status.lock().unwrap().to_owned(); let metadata = client.metadata(); return format!( - "Health: {:.1}/20, Food: {}/20, Saturation: {:.1}/20, Score: {}, Air Supply: {}", + "Health: {:.1}/20.0, Food: {}/20, Saturation: {:.1}/20.0, Score: {}, Air Supply: {}", bot_status.health, bot_status.food, bot_status.saturation, diff --git a/src/main.rs b/src/main.rs index a73cfe4..cb5c438 100644 --- a/src/main.rs +++ b/src/main.rs @@ -569,7 +569,7 @@ async fn handle(mut client: Client, event: Event, state: Arc) -> anyhow:: "msg {} {}", player, format!( - "Health: {:.1}/20, Food: {}/20, Saturation: {:.1}/20", + "Health: {:.1}/20.0, Food: {}/20, Saturation: {:.1}/20.0", packet.health, packet.food, packet.saturation ), ))