Remove BLOCK action use delay in <= 1.8

Looking at the git history, this piece of code got lost during the v3.0.0 rewrite in be8c3659bc and seems to be still needed after comparing the game diff

Co-authored-by: lowercasebtw <126462578+lowercasebtw@users.noreply.github.com>
This commit is contained in:
FlorianMichael 2024-12-20 04:27:44 +01:00
parent 26791895ad
commit eb360c2a57
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -240,8 +240,17 @@ public abstract class MixinLivingEntity extends Entity {
}
}
@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 {