Skip to content

Commit

Permalink
Switch to method that works for 1.16.5 too
Browse files Browse the repository at this point in the history
  • Loading branch information
tr7zw committed May 18, 2024
1 parent fb0de4e commit b389d5d
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.client.Minecraft;
import net.minecraft.util.Mth;
import net.minecraft.world.item.Items;
import org.joml.Vector3f;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
Expand Down Expand Up @@ -60,8 +59,10 @@ public void renderPostAnim(LivingEntity livingEntity, float f, float g, PoseStac
} else if (FirstPersonModelCore.instance.getLogicHandler().dynamicHandsEnabled()) {// TODO VANILLA HANDS
// ITEM
float offset = Mth.clamp(-NMSHelper.getXRot(Minecraft.getInstance().player) / 20 + 2, -0.0f, 0.7f);
humanModel.rightArm.offsetRotation(new Vector3f(offset, 0, 0));
humanModel.leftArm.offsetRotation(new Vector3f(offset, 0, 0));
humanModel.rightArm.xRot += offset;
humanModel.leftArm.xRot += offset;
// humanModel.rightArm.offsetRotation(new Vector3f(offset, 0, 0));
// humanModel.leftArm.offsetRotation(new Vector3f(offset, 0, 0));

if (!FirstPersonModelCore.instance.getLogicHandler().lookingDown()) {// TODO DYNAMIC HAND
if (!playerAccess.getInventory().offhand.get(0).isEmpty()
Expand All @@ -87,8 +88,10 @@ public void renderPostAnim(LivingEntity livingEntity, float f, float g, PoseStac
} else if (FirstPersonModelCore.instance.getLogicHandler().dynamicHandsEnabled()) {// TODO VANILLA HANDS
// ITEM
float offset = Mth.clamp(-NMSHelper.getXRot(Minecraft.getInstance().player) / 20 + 2, -0.0f, 0.7f);
playerModel.rightSleeve.offsetRotation(new Vector3f(offset, 0, 0));
playerModel.leftSleeve.offsetRotation(new Vector3f(offset, 0, 0));
playerModel.rightSleeve.xRot += offset;
playerModel.leftSleeve.xRot += offset;
// playerModel.rightSleeve.offsetRotation(new Vector3f(offset, 0, 0));
// playerModel.leftSleeve.offsetRotation(new Vector3f(offset, 0, 0));

if (!FirstPersonModelCore.instance.getLogicHandler().lookingDown()) {// TODO DYNAMIC HAND
if (!playerAccess.getInventory().offhand.get(0).isEmpty()
Expand Down

0 comments on commit b389d5d

Please sign in to comment.