|
6 | 6 | import net.fabricmc.loader.api.FabricLoader; |
7 | 7 | import net.minecraft.core.data.DataLoader; |
8 | 8 | import net.minecraft.core.util.helper.MathHelper; |
9 | | -import org.jetbrains.annotations.NotNull; |
10 | 9 | import org.lwjgl.util.vector.Vector3f; |
11 | 10 | import org.useless.DragonFly; |
12 | 11 | import org.useless.dragonfly.animation.Animation; |
13 | 12 | import org.useless.dragonfly.animation.AnimationData; |
14 | 13 | import org.useless.dragonfly.animation.KeyFrameData; |
15 | | -import org.useless.dragonfly.data.entity.mojang.Bone; |
16 | 14 | import org.useless.dragonfly.data.entity.mojang.MojangAnimationDeserializer; |
17 | 15 | import org.useless.dragonfly.models.entity.BoneTransform; |
18 | 16 | import org.useless.dragonfly.models.entity.mojang.StaticEntityModelMojang; |
@@ -87,8 +85,7 @@ public static void animate(StaticEntityModelMojang entityModel, Animation animat |
87 | 85 | float seconds = getElapsedSeconds(animationData, time); |
88 | 86 |
|
89 | 87 | for (AnimationData animationData1 : animationData.getAnimations()) { |
90 | | - for (@NotNull Bone bone : entityModel.bones) { |
91 | | - if (animationData1.getBone().equals(bone.name) && animationData1.getKeyFrames() != null) { |
| 88 | + if (animationData1.getKeyFrames() != null) { |
92 | 89 | List<KeyFrameData> positionFrame = animationData1.getKeyFrames().stream().sorted(Comparator.comparing(KeyFrameData::getTimestamp)).collect(Collectors.toList()); |
93 | 90 |
|
94 | 91 | int i = Math.max(0, binarySearch(0, positionFrame.size(), p_232315_ -> seconds <= positionFrame.get(p_232315_).getTimestamp()) - 1); |
@@ -195,7 +192,6 @@ public static void animate(StaticEntityModelMojang entityModel, Animation animat |
195 | 192 | } |
196 | 193 | break; |
197 | 194 | } |
198 | | - } |
199 | 195 | } |
200 | 196 | } |
201 | 197 | } |
|
0 commit comments