Skip to content

Commit

Permalink
Merge branch '1.19.2' into 1.19.3
Browse files Browse the repository at this point in the history
# Conflicts:
#	common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/animation/animator/ModelAnimator.java
  • Loading branch information
Faboslav committed Oct 21, 2023
2 parents 8cc6391 + e3e4ed9 commit 117e277
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import net.minecraft.entity.AnimationState;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import org.joml.Vector3f;

import java.util.Iterator;
Expand All @@ -24,6 +23,8 @@

public final class ModelAnimator
{
private static final Vector3f TEMP = new Vector3f();

public static void updateKeyframeAnimations(
AnimatedEntity animatedEntity,
AnimatedEntityModel animatedEntityModel,
Expand All @@ -40,7 +41,7 @@ public static void updateKeyframeAnimations(

animationState.update(animationProgress, 1.0F);
animationState.run((state) -> {
animateKeyframe(animatedEntityModel, animation, state.getTimeRunning(), 1.0F, new Vec3d());
animateKeyframe(animatedEntityModel, animation, state.getTimeRunning(), 1.0F, TEMP);
});
}

Expand All @@ -52,15 +53,15 @@ public static void updateMovementKeyframeAnimations(
) {
KeyframeAnimation keyframeAnimation = animatedEntity.getMovementAnimation();
Animation animation = keyframeAnimation.getAnimation();
animateKeyframe(animatedEntityModel, animation, runningTime, f, new Vec3d());
animateKeyframe(animatedEntityModel, animation, runningTime, f, TEMP);
}

public static void animateKeyframe(
SinglePartEntityModel<?> model,
Animation animation,
long runningTime,
float scale,
Vec3d vec3f
Vector3f vec3f
) {
float f = getRunningSeconds(animation, runningTime);
Iterator var7 = animation.boneAnimations().entrySet().iterator();
Expand Down

0 comments on commit 117e277

Please sign in to comment.