mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-08 19:38:57 +01:00
Change backwards walking animation in <= 1.12
This commit is contained in:
parent
5c9b292d36
commit
77c3a004b4
@ -187,6 +187,15 @@ public abstract class MixinLivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;abs(F)F"))
|
||||
private float alwaysRotateWhenWalkingBackwards(float value) {
|
||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_12)) {
|
||||
return 0F;
|
||||
} else {
|
||||
return MathHelper.abs(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "getPreferredEquipmentSlot", at = @At("HEAD"), cancellable = true)
|
||||
private static void removeShieldSlotPreference(ItemStack stack, CallbackInfoReturnable<EquipmentSlot> cir) {
|
||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_9_3) && stack.isOf(Items.SHIELD)) {
|
||||
|
Loading…
Reference in New Issue
Block a user