Skip to content

Commit 78caf01

Browse files
committed
it amazes me that i find more things to add LOL
1 parent b950641 commit 78caf01

22 files changed

+232
-50
lines changed

src/main/java/io/github/axolotlclient/oldanimations/OldAnimations.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ public class OldAnimations implements ClientModInitializer {
3030
/*
3131
blocks item positions (rotations) + fix trapdoors and pressure plates and other crap
3232
held pressure plates look a bit different?? idk why THEYRE BIGGER THATS WHY
33-
third person item positions toggle?
3433
old fence fate model
3534
old fast smooth lighting shadows
3635
tops of certain blocks have switch uvs
3736
tripwire texture and model changes
3837
couldrons model and texture
3938
improve fake block mining believability - paneblock and tripwireblock are still not accurate
39+
rod and bow and block positions and swing position.. can be separate options LOL
40+
fix weird fuzzy texture sizes of swords and stuff
4041
*/
4142

4243
public static final String MODID = "axolotlclient-oldanimations";

src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class OldAnimationsConfig {
6565
public final BooleanOption debugTextShadow = new BooleanOption("debugTextShadow", true);
6666
public final BooleanOption thirdPersonSneaking = new BooleanOption("thirdPersonSneaking", false);
6767
public final BooleanOption allowMiningCancel = new BooleanOption("allowMiningCancel", true);
68-
public final BooleanOption damageColor = new BooleanOption("damageColor", true);
68+
public final BooleanOption damageTintColor = new BooleanOption("damageTintColor", true);
6969
public final BooleanOption stickRod = new BooleanOption("stickRod", false);
7070
public final BooleanOption blockingArm = new BooleanOption("blockingArm", true);
7171
public final BooleanOption fastItems = new BooleanOption("fastItems", false);
@@ -108,12 +108,15 @@ public class OldAnimationsConfig {
108108
public final BooleanOption oldDoorTextures = new BooleanOption("oldDoorTextures", false);
109109
public final BooleanOption oldDifficultyButtonLogic = new BooleanOption("oldDifficultyButtonLogic", false);
110110
public final BooleanOption moveSprintKeybind = new BooleanOption("moveSprintKeybind", false);
111-
public final BooleanOption thirdPersonCapePosition = new BooleanOption("thirdPersonCapePosition", false);
112111
public final BooleanOption oldSpongeTexture = new BooleanOption("oldSpongeTexture", false);
113112
public final BooleanOption oldTallGrassTexture = new BooleanOption("oldTallGrassTexture", false);
114113
public final BooleanOption oldFogGrayScale = new BooleanOption("oldFogGrayScale", true);
115114
public final BooleanOption oldDamageTintLighting = new BooleanOption("oldDamageTintLighting", true);
116115
public final BooleanOption refreshResourcesRegardless = new BooleanOption("refreshResourcesRegardless", false);
116+
public final BooleanOption removeHitBoxEyeLines = new BooleanOption("removeHitBoxEyeLines", false);
117+
public final BooleanOption hitboxOffset = new BooleanOption("hitboxOffset", false);
118+
public final BooleanOption disableGlintOnBlocks = new BooleanOption("disableGlintOnBlocks", false);
119+
public final BooleanOption separateDamageTintFromGlint = new BooleanOption("separateDamageTintFromGlint", false);
117120

118121
private final Supplier<Boolean>[] suppliers = new Supplier[] {
119122
enabled::get,
@@ -154,8 +157,7 @@ public void initConfig() {
154157
categorySneaking.add(
155158
smoothSneaking,
156159
slowUpSneak,
157-
thirdPersonSneaking,
158-
thirdPersonCapePosition
160+
thirdPersonSneaking
159161
);
160162
category.add(categoryItems);
161163
categoryItems.add(
@@ -184,9 +186,10 @@ public void initConfig() {
184186
oldSwingVisual,
185187
oldSwingVisualParticles,
186188
secondLayerDamageTint,
187-
damageColor,
189+
damageTintColor,
188190
oldDamageTick,
189-
oldDamageTintLighting
191+
oldDamageTintLighting,
192+
separateDamageTintFromGlint
190193
);
191194
category.add(categoryGUI);
192195
categoryGUI.add(
@@ -224,7 +227,8 @@ public void initConfig() {
224227
oldGlint,
225228
oldGuiGlint,
226229
oldGlintColor,
227-
oldPotionGlint
230+
oldPotionGlint,
231+
disableGlintOnBlocks
228232
);
229233
category.add(categoryMisc);
230234
categoryMisc.add(
@@ -234,7 +238,9 @@ public void initConfig() {
234238
oldPickupArm,
235239
fixCameraPitch,
236240
xpOrbPosition,
237-
oldFogGrayScale
241+
oldFogGrayScale,
242+
removeHitBoxEyeLines,
243+
hitboxOffset
238244
);
239245

240246
/* reload the resources upon toggling certain options */

src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRenderDispatcherMixin.java

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,35 @@
1818

1919
package io.github.axolotlclient.oldanimations.mixin;
2020

21+
import com.llamalad7.mixinextras.expression.Definition;
22+
import com.llamalad7.mixinextras.expression.Expression;
23+
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
24+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
25+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
26+
import com.llamalad7.mixinextras.sugar.Local;
27+
import com.mojang.blaze3d.vertex.Tessellator;
2128
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
29+
import io.github.axolotlclient.oldanimations.ducks.Sneaky;
30+
import io.github.axolotlclient.oldanimations.util.PlayerUtil;
31+
import net.minecraft.client.Minecraft;
2232
import net.minecraft.client.entity.living.player.ClientPlayerEntity;
2333
import net.minecraft.client.options.GameOptions;
2434
import net.minecraft.client.render.TextRenderer;
2535
import net.minecraft.client.render.entity.EntityRenderDispatcher;
2636
import net.minecraft.client.render.entity.PlayerRenderer;
2737
import net.minecraft.entity.Entity;
38+
import net.minecraft.entity.living.LivingEntity;
2839
import net.minecraft.world.World;
2940
import org.objectweb.asm.Opcodes;
3041
import org.spongepowered.asm.mixin.Mixin;
3142
import org.spongepowered.asm.mixin.Shadow;
3243
import org.spongepowered.asm.mixin.injection.At;
3344
import org.spongepowered.asm.mixin.injection.Inject;
45+
import org.spongepowered.asm.mixin.injection.ModifyArgs;
3446
import org.spongepowered.asm.mixin.injection.Slice;
3547
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
3648
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
49+
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
3750

3851
@Mixin(EntityRenderDispatcher.class)
3952
public abstract class EntityRenderDispatcherMixin {
@@ -64,4 +77,37 @@ public abstract class EntityRenderDispatcherMixin {
6477
cir.setReturnValue(defaultPlayerRenderer);
6578
}
6679
}
80+
81+
@Definition(id = "LivingEntity", type = LivingEntity.class)
82+
@Expression("? instanceof LivingEntity")
83+
@ModifyExpressionValue(method = "renderHitbox", at = @At(value = "MIXINEXTRAS:EXPRESSION"))
84+
private boolean axolotlclient$disableEyeBox(boolean original) {
85+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.removeHitBoxEyeLines.get()) {
86+
/* this doesn't exist in 1.7 */
87+
return false;
88+
}
89+
return original;
90+
}
91+
92+
@WrapOperation(method = "renderHitbox", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/Tessellator;end()V"))
93+
private void axolotlclient$cancelDraw(Tessellator instance, Operation<Void> original) {
94+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.removeHitBoxEyeLines.get()) {
95+
/* this is a neat trick to cancel rendering... although maybe i should remove the unused code at that */
96+
instance.getBuilder().end();
97+
} else {
98+
original.call(instance);
99+
}
100+
}
101+
102+
@ModifyArgs(method = "renderHitbox", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/Box;<init>(DDDDDD)V"))
103+
private void axolotlclient$oldHitBoxBehavior(Args args, @Local(argsOnly = true) Entity entity) {
104+
if (OldAnimationsConfig.isEnabled() && PlayerUtil.INSTANCE.isSelf(entity)) {
105+
/* sneaking compatibility! */
106+
double eyeHeightOffset = OldAnimationsConfig.instance.thirdPersonSneaking.get() ? ((Sneaky) Minecraft.getInstance().gameRenderer).axolotlclient$getEyeHeight() - 1.62F : 0.0F;
107+
/* man there were a lot of eyeheight bugs back in the day LOOOL */
108+
double hitBoxOffset = OldAnimationsConfig.instance.hitboxOffset.get() ? 1.62F : 0.0F;
109+
args.set(1, (double) args.get(1) + eyeHeightOffset + hitBoxOffset);
110+
args.set(4, (double) args.get(4) + eyeHeightOffset + hitBoxOffset);
111+
}
112+
}
67113
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/GameRendererMixin.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ public abstract class GameRendererMixin implements Sneaky {
104104
float eyeHeight = entity.getEyeHeight();
105105
lastCameraY = cameraY;
106106
if (OldAnimationsConfig.instance.slowUpSneak.get() && eyeHeight > cameraY) {
107-
cameraY += (eyeHeight - cameraY) * 0.5f;
107+
/* the value is 0.4f in 1.7, however the math that is applied, when rearranged, */
108+
/* will yield 0.6f when adapted to 1.13+ sneaking logic */
109+
/* that being said, 1.13 uses 0.5f which is a tiny bit slower than 1.7! */
110+
/* turns out TheKodeToad was right the whole time... damn */
111+
cameraY += (eyeHeight - cameraY) * 0.6f;
108112
} else {
109113
cameraY = eyeHeight;
110114
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/HeldItemLayerMixin.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,19 @@ public abstract class HeldItemLayerMixin {
5757

5858
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/entity/HumanoidModel;translateRightArm(F)V"))
5959
private void axolotlclient$addSneakTranslation(LivingEntity livingEntity, float f, float g, float h, float i, float j, float k, float l, CallbackInfo ci) {
60-
if (isSneakingFixEnabled() && livingEntity.isSneaking())
60+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fixThirdPersonHeldItemSneakDeSync.get() &&
61+
!OldAnimationsConfig.instance.thirdPersonSneaking.get() && livingEntity.isSneaking())
6162
GlStateManager.translatef(0.0F, 0.2F, 0.0F);
6263
}
6364

6465
@WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/living/LivingEntity;isSneaking()Z"))
6566
private boolean axolotlclient$disableSneakTranslation(LivingEntity instance, Operation<Boolean> original) {
66-
return (!isSneakingFixEnabled()) && original.call(instance);
67+
if (OldAnimationsConfig.isEnabled() &&
68+
(OldAnimationsConfig.instance.fixThirdPersonHeldItemSneakDeSync.get() || OldAnimationsConfig.instance.thirdPersonSneaking.get())) {
69+
/* we need to remove the sneaking offset since we will be using our own */
70+
return false;
71+
}
72+
return original.call(instance);
6773
}
6874

6975
@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;<init>(Lnet/minecraft/item/Item;I)V"), index = 0)
@@ -136,9 +142,4 @@ public abstract class HeldItemLayerMixin {
136142
private static boolean areItemPositionsEnabled() {
137143
return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.itemPositions.get();
138144
}
139-
140-
@Unique
141-
private static boolean isSneakingFixEnabled() {
142-
return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fixThirdPersonHeldItemSneakDeSync.get();
143-
}
144145
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/HumanoidModelMixin.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
package io.github.axolotlclient.oldanimations.mixin;
2020

21+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
22+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
2123
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
2224
import net.minecraft.client.render.model.ModelPart;
2325
import net.minecraft.client.render.model.entity.HumanoidModel;
@@ -32,7 +34,6 @@
3234

3335
@Mixin(HumanoidModel.class)
3436
public abstract class HumanoidModelMixin {
35-
3637
@Shadow
3738
public ModelPart rightArm;
3839

@@ -48,4 +49,13 @@ public abstract class HumanoidModelMixin {
4849
rightArm.rotationY = 0.0f;
4950
}
5051
}
52+
53+
@WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;isSneaking()Z"))
54+
private boolean axolotlclient$disableSneakTranslation(Entity instance, Operation<Boolean> original) {
55+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get()) {
56+
/* we need to remove the sneaking offset since we will be using our own */
57+
return false;
58+
}
59+
return original.call(instance);
60+
}
5161
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemRendererMixin.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ public abstract class ItemRendererMixin {
128128
return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGlintColor.get() ? -10407781 : color;
129129
}
130130

131+
@WrapOperation(method = "renderItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/item/ItemRenderer;renderEnchantmentGlint(Lnet/minecraft/client/resource/model/BakedModel;)V"))
132+
public void axolotlclient$disableBlocksGlint(ItemRenderer instance, BakedModel bakedModel, Operation<Void> original, @Local(argsOnly = true) ItemStack itemStack) {
133+
if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.disableGlintOnBlocks.get() && !isGui3d(itemStack)) {
134+
original.call(instance, bakedModel);
135+
}
136+
}
137+
131138
@Inject(method = "renderEnchantmentGlint", at = @At("HEAD"), cancellable = true)
132139
private void axolotlclient$disableDefaultGlint(CallbackInfo ci) {
133140
if (OldAnimationsConfig.isEnabled()) {
@@ -171,6 +178,9 @@ public abstract class ItemRendererMixin {
171178
private void axolotlclient$renderGuiGlint(ItemStack stack, int x, int y, CallbackInfo ci) {
172179
axolotlclient$isGui = false;
173180
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGuiGlint.get() && stack.hasEnchantmentGlint()) {
181+
if (OldAnimationsConfig.instance.disableGlintOnBlocks.get() && isGui3d(stack)) {
182+
return;
183+
}
174184
GlintHandler.renderEnchantmentGlintPre(textureManager, ENCHANTMENT_GLINT_LOCATION, axolotlclient$glintColor);
175185
prepareGuiItemRender(x, y, false);
176186
GlintHandler.renderEnchantmentGlintPost(textureManager);
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* This program is free software; you can redistribute it and/or
3+
* modify it under the terms of the GNU Lesser General Public
4+
* License as published by the Free Software Foundation; either
5+
* version 3 of the License, or (at your option) any later version.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10+
* Lesser General Public License for more details.
11+
*
12+
* You should have received a copy of the GNU Lesser General Public License
13+
* along with this program; if not, write to the Free Software Foundation,
14+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15+
*
16+
* For more information, see the LICENSE file.
17+
*/
18+
19+
package io.github.axolotlclient.oldanimations.mixin;
20+
21+
import net.minecraft.client.render.entity.LivingEntityRenderer;
22+
import net.minecraft.entity.living.LivingEntity;
23+
import org.spongepowered.asm.mixin.Mixin;
24+
import org.spongepowered.asm.mixin.gen.Invoker;
25+
26+
@Mixin(LivingEntityRenderer.class)
27+
public interface LivingEntityRendererAccessor {
28+
29+
@Invoker
30+
boolean invokeSetupOverlayColor(LivingEntity livingEntity, float f, boolean bl);
31+
32+
@Invoker
33+
void invokeTearDownOverlayColor();
34+
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererMixin.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ protected LivingEntityRendererMixin(EntityRenderDispatcher entityRenderDispatche
6666
@Shadow
6767
protected FloatBuffer tintBuffer;
6868

69-
@Shadow
70-
protected abstract boolean shouldRenderNameTag(T livingEntity);
71-
7269
@Unique
7370
private float axolotlclient$h = 0.0F;
7471

@@ -81,7 +78,7 @@ protected LivingEntityRendererMixin(EntityRenderDispatcher entityRenderDispatche
8178
private void axolotlclient$cancelDamageBrightness(LivingEntityRenderer<?> instance, LivingEntity livingEntity, float f, float g, float h, float i, float j, float k, Operation<Void> original) {
8279
original.call(instance, livingEntity, f, g, h, i, j, k);
8380

84-
if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.damageColor.get()) {
81+
if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.damageTintColor.get()) {
8582
return;
8683
}
8784

@@ -94,7 +91,7 @@ protected LivingEntityRendererMixin(EntityRenderDispatcher entityRenderDispatche
9491
@WrapOperation(method = "render(Lnet/minecraft/entity/living/LivingEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;setupOverlayColor(Lnet/minecraft/entity/living/LivingEntity;F)Z"))
9592
private boolean axolotlclient$cancelDamageBrightness(LivingEntityRenderer<?> instance, LivingEntity livingEntity, float f, Operation<Boolean> original) {
9693
/* cancel model damage tint */
97-
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.damageColor.get()) {
94+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.damageTintColor.get()) {
9895
return false;
9996
}
10097
return original.call(instance, livingEntity, f);
@@ -103,7 +100,7 @@ protected LivingEntityRendererMixin(EntityRenderDispatcher entityRenderDispatche
103100
@WrapOperation(method = "renderLayers", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;setupOverlayColor(Lnet/minecraft/entity/living/LivingEntity;FZ)Z"))
104101
private boolean axolotlclient$cancelDamageBrightness2(LivingEntityRenderer<?> instance, LivingEntity livingEntity, float f, boolean bl, Operation<Boolean> original) {
105102
/* cancel layer damage tint */
106-
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.damageColor.get()) {
103+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.damageTintColor.get()) {
107104
return false;
108105
}
109106
return original.call(instance, livingEntity, f, bl);
@@ -113,11 +110,6 @@ protected LivingEntityRendererMixin(EntityRenderDispatcher entityRenderDispatche
113110
private void axolotlclient$addSneakingTranslation(LivingEntity livingEntity, double d, double e, double f, float g, float h, CallbackInfo ci) {
114111
/* in order to match 1.7, we need to elevate the player model while sneaking */
115112
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get() && PlayerUtil.INSTANCE.isSelf(livingEntity)) {
116-
if (livingEntity.isSneaking()) {
117-
/* we need to remove the already existing sneaking offset */
118-
/* which is present in BiPedModel#render, PlayerEntityModel#render, and related classes */
119-
GlStateManager.translatef(0.0F, -0.2F, 0.0F);
120-
}
121113
float eyeHeightOffset = 1.62F - ((Sneaky) Minecraft.getInstance().gameRenderer).axolotlclient$getEyeHeight();
122114
/* the elevation will be the difference between the player's sneaking eyeheight and their actual eyeheight (1.62 meters) */
123115
/* the player model should now move 1:1 with the crosshair */

src/main/java/io/github/axolotlclient/oldanimations/mixin/PlayerModelMixin.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
package io.github.axolotlclient.oldanimations.mixin;
2020

2121
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
22+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
23+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
2224
import com.llamalad7.mixinextras.sugar.Share;
2325
import com.llamalad7.mixinextras.sugar.ref.LocalFloatRef;
2426
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
@@ -38,18 +40,28 @@ public class PlayerModelMixin extends HumanoidModel {
3840
@Shadow
3941
private ModelPart cape;
4042

43+
@WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;isSneaking()Z"))
44+
private boolean axolotlclient$disableSneakTranslation(Entity instance, Operation<Boolean> original) {
45+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get()) {
46+
/* we need to remove the sneaking offset since we will be using our own */
47+
return false;
48+
}
49+
return original.call(instance);
50+
}
51+
4152
@Inject(method = "setAngles", at = @At("HEAD"))
4253
private void axolotlclient$copyCapePivot(float handSwing, float handSwingAmount, float age, float yaw, float pitch, float scale, Entity entity, CallbackInfo ci, @Share("pivotY") LocalFloatRef pivotY) {
43-
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonCapePosition.get()) {
54+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get()) {
4455
/* capturing the initial value of the cape's pivot */
4556
pivotY.set(cape.pivotY);
4657
}
4758
}
4859

4960
@Inject(method = "setAngles", at = @At("TAIL"))
5061
private void axolotlclient$disableSneakCapeTranslations(float handSwing, float handSwingAmount, float age, float yaw, float pitch, float scale, Entity entity, CallbackInfo ci, @Share("pivotY") LocalFloatRef pivotY) {
51-
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonCapePosition.get()) {
62+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get()) {
5263
/* in order to completely cancel out the cape pivot changes in 1.8, we're gonna re-assign it! */
64+
/* this pivot might not actually do anything impactful... not sure why */
5365
cape.pivotY = pivotY.get();
5466
}
5567
}

0 commit comments

Comments
 (0)