mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-08 19:38:57 +01:00
Add setting for body rotation interpolation fix
Some mods changing the player rotation will break with this fix since they hook into the getYaw() call of the original function which we don't account for.
This commit is contained in:
parent
bf7bc8f0ca
commit
2cb50a1719
@ -116,7 +116,7 @@ public abstract class MixinLivingEntity extends Entity {
|
||||
|
||||
@Redirect(method = "turnHead", at = @At(value = "INVOKE", target = "Ljava/lang/Math;abs(F)F"))
|
||||
private float changeBodyRotationInterpolation(float g) {
|
||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_19_3)) {
|
||||
if (VisualSettings.global().changeBodyRotationInterpolation.isEnabled()) {
|
||||
g = MathHelper.clamp(g, -75.0F, 75.0F);
|
||||
this.bodyYaw = this.getYaw() - g;
|
||||
if (Math.abs(g) > 50.0F) {
|
||||
|
@ -57,6 +57,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.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));
|
||||
|
||||
// 1.19.2 -> 1.19
|
||||
public final VersionedBooleanSetting disableSecureChatWarning = new VersionedBooleanSetting(this, Text.translatable("visual_settings.viafabricplus.disable_secure_chat_warning"), VersionRange.andOlder(ProtocolVersion.v1_19));
|
||||
|
||||
|
@ -107,6 +107,7 @@
|
||||
"visual_settings.viafabricplus.force_unicode_font_for_non_ascii_languages": "Unicode-Schriftart für Nicht-ASCII-Sprachen erzwingen",
|
||||
"visual_settings.viafabricplus.filter_non_existing_glyphs": "Nicht vorhandene Glyphen filtern",
|
||||
"visual_settings.viafabricplus.sneak_instantly": "Sofort schleichen",
|
||||
"visual_settings.viafabricplus.change_body_rotation_interpolation": "Interpolation der Körperdrehung ändern",
|
||||
|
||||
"force_version.viafabricplus.title": "Bitte wähle die Version, mit der der Server gepingt/verbunden werden soll",
|
||||
|
||||
|
@ -107,6 +107,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.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