diff --git a/common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/animation/animator/ModelAnimator.java b/common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/animation/animator/ModelAnimator.java index ec1916c24..bcb064e9e 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/animation/animator/ModelAnimator.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/animation/animator/ModelAnimator.java @@ -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; @@ -24,6 +23,8 @@ public final class ModelAnimator { + private static final Vector3f TEMP = new Vector3f(); + public static void updateKeyframeAnimations( AnimatedEntity animatedEntity, AnimatedEntityModel animatedEntityModel, @@ -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); }); } @@ -52,7 +53,7 @@ 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( @@ -60,7 +61,7 @@ public static void animateKeyframe( Animation animation, long runningTime, float scale, - Vec3d vec3f + Vector3f vec3f ) { float f = getRunningSeconds(animation, runningTime); Iterator var7 = animation.boneAnimations().entrySet().iterator();