From 585b51e91a5335eae37bc5af7c0111bb2092b156 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 20 Sep 2025 20:35:16 -1200 Subject: more accurate mining and impl PartialEq for packets --- azalea-entity/src/mining.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-entity/src/mining.rs') diff --git a/azalea-entity/src/mining.rs b/azalea-entity/src/mining.rs index 8b572935..ea521a9a 100644 --- a/azalea-entity/src/mining.rs +++ b/azalea-entity/src/mining.rs @@ -25,20 +25,20 @@ pub fn get_mine_progress( if destroy_time == -1. { return 0.; } - let divider = if has_correct_tool_for_drops(block, held_item) { + let divisor = if has_correct_tool_for_drops(block, held_item) { 30 } else { 100 }; - (destroy_speed( + let base_destroy_speed = destroy_speed( block.as_registry_block(), held_item, player_inventory, fluid_on_eyes, physics, - ) / destroy_time) - / divider as f32 + ); + (base_destroy_speed / destroy_time) / divisor as f32 } fn has_correct_tool_for_drops(block: &dyn BlockTrait, tool: registry::Item) -> bool { -- cgit v1.2.3