diff options
| author | mat <git@matdoes.dev> | 2025-09-20 20:35:16 -1200 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-09-20 20:35:16 -1200 |
| commit | 585b51e91a5335eae37bc5af7c0111bb2092b156 (patch) | |
| tree | c1559014df9db20dd625d9fe972d4e9f88317008 /azalea-entity/src/mining.rs | |
| parent | db793448ff8e656ad80859835edc3b89cb547dd2 (diff) | |
| download | azalea-drasl-585b51e91a5335eae37bc5af7c0111bb2092b156.tar.xz | |
more accurate mining and impl PartialEq for packets
Diffstat (limited to 'azalea-entity/src/mining.rs')
| -rw-r--r-- | azalea-entity/src/mining.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 { |
