diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinBipedEntityModel.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinBipedEntityModel.java index 53f8e7c5..27543f66 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinBipedEntityModel.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinBipedEntityModel.java @@ -47,7 +47,7 @@ public abstract class MixinBipedEntityModel { @Redirect(method = "positionBlockingArm", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;clamp(FFF)F")) private float preventArmFollowingThirdPersonRotation(float value, float min, float max) { - if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_20_2)) { + if (VisualSettings.global().lockBlockingArmRotation.isEnabled()) { return 0.0F; } else { return MathHelper.clamp(value, min, max); diff --git a/src/main/java/de/florianmichael/viafabricplus/settings/impl/VisualSettings.java b/src/main/java/de/florianmichael/viafabricplus/settings/impl/VisualSettings.java index 6dcf9f18..ae6c64d0 100644 --- a/src/main/java/de/florianmichael/viafabricplus/settings/impl/VisualSettings.java +++ b/src/main/java/de/florianmichael/viafabricplus/settings/impl/VisualSettings.java @@ -59,6 +59,9 @@ public class VisualSettings extends SettingGroup { // 1.21 -> 1.20.5 public final VersionedBooleanSetting hideDownloadTerrainScreenTransitionEffects = new VersionedBooleanSetting(this, Text.translatable("visual_settings.viafabricplus.hide_download_terrain_screen_transition_effects"), VersionRange.andOlder(ProtocolVersion.v1_20_5)); + // 1.20.3 -> 1.20.2 + public final VersionedBooleanSetting lockBlockingArmRotation = new VersionedBooleanSetting(this, Text.translatable("visual_settings.viafabricplus.lock_blocking_arm_rotation"), VersionRange.andOlder(ProtocolVersion.v1_20_2)); + // 1.19.4 -> 1.19.3 public final VersionedBooleanSetting changeBodyRotationInterpolation = new VersionedBooleanSetting(this, Text.translatable("visual_settings.viafabricplus.change_body_rotation_interpolation"), VersionRange.andOlder(ProtocolVersion.v1_19_3)); diff --git a/src/main/resources/assets/viafabricplus/lang/en_us.json b/src/main/resources/assets/viafabricplus/lang/en_us.json index 110f862d..e18d26c2 100644 --- a/src/main/resources/assets/viafabricplus/lang/en_us.json +++ b/src/main/resources/assets/viafabricplus/lang/en_us.json @@ -110,6 +110,7 @@ "visual_settings.viafabricplus.force_unicode_font_for_non_ascii_languages": "Force Unicode font for non-ASCII languages", "visual_settings.viafabricplus.filter_non_existing_glyphs": "Filter non existing glyphs", "visual_settings.viafabricplus.sneak_instantly": "Sneak instantly", + "visual_settings.viafabricplus.lock_blocking_arm_rotation": "Lock third-person arm rotation whilst blocking", "visual_settings.viafabricplus.change_body_rotation_interpolation": "Change body rotation interpolation", "force_version.viafabricplus.title": "Please select the version with which the server should be pinged/connected",