Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to toggle arm rotation lock whilst blocking <=1.20.2 #651

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public void onValueChanged() {
// 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));

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/viafabricplus/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down