Skip to content

Commit

Permalink
Fix compatibility with NoShieldDelay
Browse files Browse the repository at this point in the history
Closes #684
  • Loading branch information
FlorianMichael committed Jan 11, 2025
1 parent 9d6fb7b commit 5d7a91b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(LivingEntity.class)
@Mixin(value = LivingEntity.class, priority = 999 /* Workaround for https://github.com/ViaVersion/ViaFabricPlus/issues/684 */)
public abstract class MixinLivingEntity {

@ModifyExpressionValue(method = "tickStatusEffects", at = @At(value = "CONSTANT", args = "intValue=4"))
Expand All @@ -42,7 +42,7 @@ private int changeParticleDensity(int original) {
}
}

@ModifyConstant(method = "getBlockingItem", constant = @Constant(intValue = 5))
@ModifyConstant(method = "getBlockingItem", constant = @Constant(intValue = 5), require = 0 /* Workaround for https://github.com/ViaVersion/ViaFabricPlus/issues/684 */)
private int removeBlockActionUseDelay(int constant) {
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) {
return 0;
Expand Down

0 comments on commit 5d7a91b

Please sign in to comment.