From e3e4ed9b1cae0a73fc5ae51d3c651c3cbc15fc73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Sat, 21 Oct 2023 16:58:54 +0200 Subject: [PATCH] temp vector --- .../render/entity/animation/animator/ModelAnimator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 6bd5c300a..2a4356f55 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 @@ -23,6 +23,8 @@ public final class ModelAnimator { + private static final Vec3f TEMP = new Vec3f(); + public static void updateKeyframeAnimations( AnimatedEntity animatedEntity, AnimatedEntityModel animatedEntityModel, @@ -39,7 +41,7 @@ public static void updateKeyframeAnimations( animationState.update(animationProgress, 1.0F); animationState.run((state) -> { - animateKeyframe(animatedEntityModel, animation, state.getTimeRunning(), 1.0F, new Vec3f()); + animateKeyframe(animatedEntityModel, animation, state.getTimeRunning(), 1.0F, TEMP); }); } @@ -51,7 +53,7 @@ public static void updateMovementKeyframeAnimations( ) { KeyframeAnimation keyframeAnimation = animatedEntity.getMovementAnimation(); Animation animation = keyframeAnimation.getAnimation(); - animateKeyframe(animatedEntityModel, animation, runningTime, f, new Vec3f()); + animateKeyframe(animatedEntityModel, animation, runningTime, f, TEMP); } public static void animateKeyframe(