Skip to content

Commit

Permalink
Rename config setting oldSwordBlockArm to legacySwordBlockingPosition…
Browse files Browse the repository at this point in the history
… and move it to Other category
  • Loading branch information
lowercasebtw committed Dec 20, 2024
1 parent 68879b6 commit 0e20d70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/main/java/me/mixces/animatium/config/AnimatiumConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class AnimatiumConfig {
// Movement
@SerialEntry public boolean rotateBackwardsWalking = true;
@SerialEntry public boolean uncapBlockingHeadRotation = true;
@SerialEntry public boolean oldSwordBlockArm = true;
@SerialEntry public boolean removeHeadRotationInterpolation = true;
@SerialEntry public boolean fixVerticalBobbingTilt = true;
@SerialEntry public boolean oldDeathLimbs = true;
Expand All @@ -63,6 +62,7 @@ public class AnimatiumConfig {
// Other
@SerialEntry public boolean tiltItemPositions = true;
@SerialEntry public boolean tiltItemPositionsInThirdperson = true;
@SerialEntry public boolean legacySwordBlockingPosition = true;
@SerialEntry public boolean lockBlockingArmRotation = true;
@SerialEntry public boolean applyItemSwingUsage = true;
@SerialEntry public boolean removeEquipAnimationOnItemUse = true;
Expand Down Expand Up @@ -219,12 +219,6 @@ public static Screen getConfigScreen(@Nullable Screen parent) {
.binding(defaults.uncapBlockingHeadRotation, () -> config.uncapBlockingHeadRotation, newVal -> config.uncapBlockingHeadRotation = newVal)
.controller(TickBoxControllerBuilder::create)
.build());
category.option(Option.<Boolean>createBuilder()
.name(Text.translatable("animatium.oldSwordBlockArm"))
.description(OptionDescription.of(Text.translatable("animatium.oldSwordBlockArm.description")))
.binding(defaults.oldSwordBlockArm, () -> config.oldSwordBlockArm, newVal -> config.oldSwordBlockArm = newVal)
.controller(TickBoxControllerBuilder::create)
.build());
category.option(Option.<Boolean>createBuilder()
.name(Text.translatable("animatium.removeHeadRotationInterpolation"))
.description(OptionDescription.of(Text.translatable("animatium.removeHeadRotationInterpolation.description")))
Expand Down Expand Up @@ -317,6 +311,12 @@ public static Screen getConfigScreen(@Nullable Screen parent) {
.binding(defaults.tiltItemPositionsInThirdperson, () -> config.tiltItemPositionsInThirdperson, newVal -> config.tiltItemPositionsInThirdperson = newVal)
.controller(TickBoxControllerBuilder::create)
.build());
category.option(Option.<Boolean>createBuilder()
.name(Text.translatable("animatium.legacySwordBlockingPosition"))
.description(OptionDescription.of(Text.translatable("animatium.legacySwordBlockingPosition.description")))
.binding(defaults.legacySwordBlockingPosition, () -> config.legacySwordBlockingPosition, newVal -> config.legacySwordBlockingPosition = newVal)
.controller(TickBoxControllerBuilder::create)
.build());
category.option(Option.<Boolean>createBuilder()
.name(Text.translatable("animatium.lockBlockingArmRotation"))
.description(OptionDescription.of(Text.translatable("animatium.lockBlockingArmRotation.description")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected MixinBipedEntityModel(ModelPart modelPart, Function<Identifier, Render

@Inject(method = "positionBlockingArm", at = @At("RETURN"))
private void animatium$oldSwordBlockArm(ModelPart arm, boolean rightArm, CallbackInfo ci) {
if (AnimatiumConfig.getInstance().oldSwordBlockArm) {
if (AnimatiumConfig.getInstance().legacySwordBlockingPosition) {
arm.yaw = 0;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/animatium/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"animatium.rotateBackwardsWalking": "Rotate body whilst walking backwards",
"animatium.rotateBackwardsWalking.description": "Rotates the entity body sideways when walking backwards like it was in <=1.11.2.",
"animatium.uncapBlockingHeadRotation": "Reverts head rotation whilst blocking",
"animatium.oldSwordBlockArm": "Modifies the arm's yaw to be 0 like in <=1.7",
"animatium.uncapBlockingHeadRotation.description": " Reverts the change in 1.20.2, making head rotation when blocking as it used to be.",
"animatium.removeHeadRotationInterpolation": "Remove the head rotation interpolation",
"animatium.removeHeadRotationInterpolation.description": "Removes the head rotation interpolation like in <=1.7.",
Expand Down Expand Up @@ -73,6 +72,8 @@
"animatium.tiltItemPositions.description": "Tilts the first-person held item position to make held items look like they did in <=1.7.x.",
"animatium.tiltItemPositionsInThirdperson": "Modify/tilt the third-person held item's position",
"animatium.tiltItemPositionsInThirdperson.description": "Tilts the third-person held item position to make held items look like they did in <=1.7.x.",
"animatium.legacySwordBlockingPosition": "Modifies the arm's yaw to be 0 like in <=1.7",
"animatium.legacySwordBlockingPosition.description": "Brings back the old third-person sword blocking look from <=1.7",
"animatium.lockBlockingArmRotation": "Lock third-person arm rotation whilst blocking",
"animatium.lockBlockingArmRotation.description": "Locks the third-person blocking arm rotation.",
"animatium.applyItemSwingUsage": "Apply the swing offset during item use",
Expand Down

0 comments on commit 0e20d70

Please sign in to comment.