Skip to content

Commit

Permalink
fix the speed calculation of all mining hats #62
Browse files Browse the repository at this point in the history
  • Loading branch information
cech12 committed Jul 8, 2024
1 parent d5e7126 commit 3817951
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.20.6-5.2.0.1] - 2024-07-08
### Fixed
- speed calculation for straw hat/chopping hat/mining helmet was wrong (all loaders) (thanks to Imperial-Warlord for the report) #62

## [1.20.6-5.2.0.0] - 2024-05-28
### Changed
- updated to Minecraft 1.20.6 (Fabric 0.99.0+1.20.6, Neoforge 20.6.83-beta, Forge 50.0.31)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected double getEnchantmentDoubleValue(final ItemStack stack) {
@Override
public float onBreakSpeedEvent(Player player, BlockState blockState, float actualSpeed, ItemStack headSlotItemStack) {
if (this.isToolEffective(player.getMainHandItem(), blockState)) {
return (1.0F + (float) this.getEnchantmentDoubleValue(headSlotItemStack) * actualSpeed);
return (1.0F + (float) this.getEnchantmentDoubleValue(headSlotItemStack)) * actualSpeed;
}
return actualSpeed;
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Project
group=de.cech12.usefulhats
mod_version=5.2.0.0
mod_version=5.2.0.1
mod_id=usefulhats
mod_name=Useful Hats
mod_author=Cech12
Expand Down

0 comments on commit 3817951

Please sign in to comment.