Skip to content

Commit

Permalink
Moved reach fix injection point
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Dec 13, 2023
1 parent 2ae5122 commit fec87d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,11 @@ public float getBlockBreakingSpeed(BlockState block) {
return f;
}

@Inject(method = "getReachDistance", at = @At("RETURN"), cancellable = true)
private static void modifyReachDistance(boolean creative, CallbackInfoReturnable<Float> cir) {
if (ProtocolHack.getTargetVersion().isOlderThan(VersionEnum.r1_0_0tor1_0_1) && !creative) {
cir.setReturnValue(4F);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,6 @@ private void removeExperienceBar(CallbackInfoReturnable<Boolean> cir) {
}
}

@Inject(method = "getReachDistance", at = @At("RETURN"), cancellable = true)
private void modifyReachDistance(CallbackInfoReturnable<Float> cir) {
if (ProtocolHack.getTargetVersion().isOlderThan(VersionEnum.r1_0_0tor1_0_1) && !this.gameMode.isCreative()) {
cir.setReturnValue(4F);
}
}

@Unique
private boolean extinguishFire(BlockPos blockPos, final Direction direction) {
blockPos = blockPos.offset(direction);
Expand Down

0 comments on commit fec87d0

Please sign in to comment.