Skip to content

Commit

Permalink
Remove BLOCK action use delay in <= 1.8
Browse files Browse the repository at this point in the history
Looking at the git history, this piece of code got lost during the v3.0.0 rewrite in be8c365 and seems to be still needed after comparing the game diff

Co-authored-by: lowercasebtw <[email protected]>
  • Loading branch information
FlorianMichael and lowercasebtw committed Dec 20, 2024
1 parent 2679189 commit eb360c2
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,17 @@ private void removeShieldSlotPreference(ItemStack stack, CallbackInfoReturnable<
}
}

@ModifyConstant(method = "getBlockingItem", constant = @Constant(intValue = 5))
private int removeBlockActionUseDelay(int constant) {
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) {
return 0;
} else {
return constant;
}
}

@ModifyConstant(method = "tickMovement", constant = @Constant(doubleValue = 0.003D))
private double modifyVelocityZero(final double constant) {
private double modifyVelocityZero(double constant) {
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) {
return 0.005D;
} else {
Expand Down

0 comments on commit eb360c2

Please sign in to comment.