Skip to content

Commit eb360c2

Browse files
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 be8c365 and seems to be still needed after comparing the game diff Co-authored-by: lowercasebtw <[email protected]>
1 parent 2679189 commit eb360c2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinLivingEntity.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,17 @@ private void removeShieldSlotPreference(ItemStack stack, CallbackInfoReturnable<
240240
}
241241
}
242242

243+
@ModifyConstant(method = "getBlockingItem", constant = @Constant(intValue = 5))
244+
private int removeBlockActionUseDelay(int constant) {
245+
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) {
246+
return 0;
247+
} else {
248+
return constant;
249+
}
250+
}
251+
243252
@ModifyConstant(method = "tickMovement", constant = @Constant(doubleValue = 0.003D))
244-
private double modifyVelocityZero(final double constant) {
253+
private double modifyVelocityZero(double constant) {
245254
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) {
246255
return 0.005D;
247256
} else {

0 commit comments

Comments
 (0)