Skip to content

Commit

Permalink
Add check to old block mining progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixces committed Dec 14, 2024
1 parent 26314db commit b95535c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public abstract class MixinClientPlayerInteractionManager {

@Inject(method = "getBlockBreakingProgress", at = @At(value = "RETURN"), cancellable = true)
private void animatium$oldBlockMiningProgress(CallbackInfoReturnable<Integer> cir) {
if (AnimatiumConfig.oldBlockMiningProgress) {
cir.setReturnValue((int) (this.currentBreakingProgress * 10.0f) - 1);
if (AnimatiumConfig.oldBlockMiningProgress && currentBreakingProgress > 0.0F) {
cir.setReturnValue((int) (this.currentBreakingProgress * 10.0f));
}
}
}

0 comments on commit b95535c

Please sign in to comment.