Skip to content

Commit

Permalink
Made shieldBlockCounter injection optional
Browse files Browse the repository at this point in the history
Fixed #306
  • Loading branch information
FlorianMichael committed Dec 6, 2023
1 parent 2e42a45 commit a102483
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import java.util.Optional;

@SuppressWarnings("ConstantValue")
@Mixin(LivingEntity.class)
@Mixin(value = LivingEntity.class, priority = 999 /* Workaround for https://github.com/ViaVersion/ViaFabricPlus/issues/306 */)
public abstract class MixinLivingEntity extends Entity {

@Shadow
Expand Down Expand Up @@ -177,7 +177,7 @@ public double fixLavaMovement(LivingEntity instance, TagKey<Fluid> tagKey) {
return height;
}

@ModifyConstant(method = "isBlocking", constant = @Constant(intValue = 5))
@ModifyConstant(method = "isBlocking", constant = @Constant(intValue = 5), require = 0 /* Workaround for https://github.com/ViaVersion/ViaFabricPlus/issues/306 */)
public int shieldBlockCounter(int constant) {
if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_8)) {
return 0;
Expand Down

0 comments on commit a102483

Please sign in to comment.