Skip to content

Commit 75b8de8

Browse files
committed
Fix method name
1 parent d76951e commit 75b8de8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

common/src/main/java/btw/mixces/animatium/mixins/renderer/item/MixinItemInHandLayer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public MixinItemInHandLayer(RenderLayerParent<S, M> context) {
6666

6767
@Inject(method = "renderArmWithItem", at = @At("HEAD"))
6868
private void animatium$setRef(S armedEntityRenderState, ItemStackRenderState itemStackRenderState, HumanoidArm humanoidArm, PoseStack poseStack, MultiBufferSource multiBufferSource, int light, CallbackInfo ci, @Share("stack") LocalRef<ItemStack> stackRef) {
69-
if (AnimatiumCommon.isEnabled() && ItemUtils.shoulditemPositionsInThirdPerson(armedEntityRenderState) && !itemStackRenderState.isEmpty()) {
69+
if (AnimatiumCommon.isEnabled() && ItemUtils.shouldTiltItemPositionsInThirdPerson(armedEntityRenderState) && !itemStackRenderState.isEmpty()) {
7070
Entity entity = EntityUtils.getEntityByState(armedEntityRenderState);
7171
if (entity instanceof LivingEntity livingEntity && armedEntityRenderState instanceof ArmedEntityRenderState) {
7272
stackRef.set(livingEntity.getItemHeldByArm(humanoidArm));
@@ -76,19 +76,19 @@ public MixinItemInHandLayer(RenderLayerParent<S, M> context) {
7676

7777
@ModifyArgs(method = "renderArmWithItem", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;translate(FFF)V"))
7878
private void animatium$oldTransformTranslation(Args args, @Local(argsOnly = true) S entityState, @Share("stack") LocalRef<ItemStack> stackRef) {
79-
if (AnimatiumCommon.isEnabled() && ItemUtils.shoulditemPositionsInThirdPerson(entityState) && !ItemUtils.isItemBlacklisted(stackRef.get())) {
79+
if (AnimatiumCommon.isEnabled() && ItemUtils.shouldTiltItemPositionsInThirdPerson(entityState) && !ItemUtils.isItemBlacklisted(stackRef.get())) {
8080
args.setAll((float) args.get(0) * -1.0F, 0.4375F, (float) args.get(2) / 10 * -1.0F);
8181
}
8282
}
8383

8484
@WrapWithCondition(method = "renderArmWithItem", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;mulPose(Lorg/joml/Quaternionf;)V"))
8585
private boolean animatium$removeTransformMultiply(PoseStack instance, Quaternionf quaternionf, @Local(argsOnly = true) S entityState, @Share("stack") LocalRef<ItemStack> stackRef) {
86-
return !AnimatiumCommon.isEnabled() || !ItemUtils.shoulditemPositionsInThirdPerson(entityState) || ItemUtils.isItemBlacklisted(stackRef.get());
86+
return !AnimatiumCommon.isEnabled() || !ItemUtils.shouldTiltItemPositionsInThirdPerson(entityState) || ItemUtils.isItemBlacklisted(stackRef.get());
8787
}
8888

8989
@Inject(method = "renderArmWithItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/item/ItemStackRenderState;render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;II)V"))
9090
private void animatium$itemPositionsThird(S entityRenderState, ItemStackRenderState itemStackRenderState, HumanoidArm humanoidArm, PoseStack poseStack, MultiBufferSource multiBufferSource, int light, CallbackInfo ci) {
91-
if (AnimatiumCommon.isEnabled() && ItemUtils.shoulditemPositionsInThirdPerson(entityRenderState)) {
91+
if (AnimatiumCommon.isEnabled() && ItemUtils.shouldTiltItemPositionsInThirdPerson(entityRenderState)) {
9292
Entity entity = EntityUtils.getEntityByState(entityRenderState);
9393
if (entity instanceof LivingEntity livingEntity && entityRenderState instanceof ArmedEntityRenderState armedEntityRenderState) {
9494
int direction = PlayerUtils.getArmMultiplier(humanoidArm);

common/src/main/java/btw/mixces/animatium/util/ItemUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public static void applyLegacyFirstpersonTransforms(PoseStack poseStack, int dir
165165
poseStack.mulPose(Axis.YP.rotationDegrees(direction * -45.0F));
166166
}
167167

168-
public static boolean shoulditemPositionsInThirdPerson(EntityRenderState entityState) {
168+
public static boolean shouldTiltItemPositionsInThirdPerson(EntityRenderState entityState) {
169169
if (AnimatiumConfig.instance().itemPositionsInThirdPerson) {
170170
return true;
171171
} else {

0 commit comments

Comments
 (0)