mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-22 16:48:25 +01:00
Add setting to toggle arm rotation lock whilst blocking <= 1.20.2 (#651)
This commit is contained in:
parent
5b677af35d
commit
24f5812b4f
@ -47,7 +47,7 @@ public abstract class MixinBipedEntityModel<T extends BipedEntityRenderState> {
|
||||
|
||||
@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);
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user