diff --git a/src/main/java/mc/duzo/timeless/Timeless.java b/src/main/java/mc/duzo/timeless/Timeless.java index aad5f45..e30864c 100644 --- a/src/main/java/mc/duzo/timeless/Timeless.java +++ b/src/main/java/mc/duzo/timeless/Timeless.java @@ -6,6 +6,7 @@ import mc.duzo.timeless.network.Network; import mc.duzo.timeless.registry.Register; +import mc.duzo.timeless.util.ServerLifecycleHooks; public class Timeless implements ModInitializer { public static final String MOD_ID = "timeless"; @@ -13,6 +14,7 @@ public class Timeless implements ModInitializer { @Override public void onInitialize() { + ServerLifecycleHooks.init(); Register.init(); Network.init(); } diff --git a/src/main/java/mc/duzo/timeless/client/TimelessClient.java b/src/main/java/mc/duzo/timeless/client/TimelessClient.java index 0c33f8b..332ffb2 100644 --- a/src/main/java/mc/duzo/timeless/client/TimelessClient.java +++ b/src/main/java/mc/duzo/timeless/client/TimelessClient.java @@ -3,13 +3,14 @@ import net.fabricmc.api.ClientModInitializer; import mc.duzo.timeless.client.keybind.TimelessKeybinds; +import mc.duzo.timeless.client.network.ClientNetwork; import mc.duzo.timeless.suit.client.ClientSuitRegistry; public class TimelessClient implements ClientModInitializer { @Override public void onInitializeClient() { + ClientNetwork.init(); ClientSuitRegistry.init(); - TimelessKeybinds.init(); } } diff --git a/src/main/java/mc/duzo/timeless/client/network/ClientNetwork.java b/src/main/java/mc/duzo/timeless/client/network/ClientNetwork.java new file mode 100644 index 0000000..7273087 --- /dev/null +++ b/src/main/java/mc/duzo/timeless/client/network/ClientNetwork.java @@ -0,0 +1,15 @@ +package mc.duzo.timeless.client.network; + +import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; + +import mc.duzo.timeless.network.s2c.MarkFiveAnimationS2CPacket; + +public class ClientNetwork { + static { + ClientPlayNetworking.registerGlobalReceiver(MarkFiveAnimationS2CPacket.TYPE, MarkFiveAnimationS2CPacket::handle); + } + + public static void init() { + + } +} diff --git a/src/main/java/mc/duzo/timeless/network/Network.java b/src/main/java/mc/duzo/timeless/network/Network.java index ab40dce..5554263 100644 --- a/src/main/java/mc/duzo/timeless/network/Network.java +++ b/src/main/java/mc/duzo/timeless/network/Network.java @@ -1,7 +1,19 @@ package mc.duzo.timeless.network; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import net.fabricmc.fabric.api.networking.v1.FabricPacket; +import net.fabricmc.fabric.api.networking.v1.PlayerLookup; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.nbt.NbtElement; +import net.minecraft.nbt.NbtOps; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.Identifier; + +import mc.duzo.timeless.Timeless; import mc.duzo.timeless.network.c2s.UsePowerC2SPacket; public class Network { @@ -12,4 +24,32 @@ public class Network { public static void init() { } + + + // codec networking is Theo's from Adventures in Time + public static void send(ServerPlayerEntity player, PacketByteBuf buf, Identifier id, Codec codec, T t) { + DataResult result = codec.encodeStart(NbtOps.INSTANCE, t); + NbtElement nbt = result.resultOrPartial(Timeless.LOGGER::error).orElseThrow(); + + buf.writeNbt((NbtCompound) nbt); + send(player, id, buf); + } + + public static void send(ServerPlayerEntity player, Identifier id, PacketByteBuf buf) { + if (player == null) + return; + + ServerPlayNetworking.send(player, id, buf); + } + + public static T receive(Codec codec, PacketByteBuf buf) { + return codec.decode(NbtOps.INSTANCE, buf.readNbt()) + .resultOrPartial(Timeless.LOGGER::error) + .orElseThrow().getFirst(); + } + + public static void toTracking(FabricPacket packet, ServerPlayerEntity target) { + ServerPlayNetworking.send(target, packet); + PlayerLookup.tracking(target).forEach(p -> ServerPlayNetworking.send(p, packet)); + } } diff --git a/src/main/java/mc/duzo/timeless/network/s2c/MarkFiveAnimationS2CPacket.java b/src/main/java/mc/duzo/timeless/network/s2c/MarkFiveAnimationS2CPacket.java new file mode 100644 index 0000000..5cbafa9 --- /dev/null +++ b/src/main/java/mc/duzo/timeless/network/s2c/MarkFiveAnimationS2CPacket.java @@ -0,0 +1,47 @@ +package mc.duzo.timeless.network.s2c; + +import java.util.UUID; + +import net.fabricmc.fabric.api.networking.v1.FabricPacket; +import net.fabricmc.fabric.api.networking.v1.PacketSender; +import net.fabricmc.fabric.api.networking.v1.PacketType; + +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.util.Identifier; + +import mc.duzo.timeless.Timeless; +import mc.duzo.timeless.client.animation.player.PlayerAnimationTracker; +import mc.duzo.timeless.client.animation.player.TimelessPlayerAnimations; +import mc.duzo.timeless.client.animation.player.holder.PlayerAnimationHolder; +import mc.duzo.timeless.suit.client.animation.IronManAnimations; +import mc.duzo.timeless.suit.client.animation.SuitAnimationHolder; +import mc.duzo.timeless.suit.client.animation.SuitAnimationTracker; + +public record MarkFiveAnimationS2CPacket(UUID player, boolean isPuttingOn) implements FabricPacket { + public static final PacketType TYPE = PacketType.create(new Identifier(Timeless.MOD_ID, "mark_five_animation"), MarkFiveAnimationS2CPacket::new); + + public MarkFiveAnimationS2CPacket(PacketByteBuf buf) { + this(buf.readUuid(), buf.readBoolean()); + } + @Override + public void write(PacketByteBuf buf) { + buf.writeUuid(player); + buf.writeBoolean(isPuttingOn); + } + + @Override + public PacketType getType() { + return TYPE; + } + + public void handle(ClientPlayerEntity client, PacketSender sender) { + SuitAnimationHolder suit = (isPuttingOn) ? new SuitAnimationHolder(IronManAnimations.MK5_CASE_OPEN, true, false) : new SuitAnimationHolder(IronManAnimations.MK5_CASE_CLOSE, true, false); + SuitAnimationTracker.addAnimation(player, suit); + + if (!isPuttingOn) return; // todo - close anim for player + + PlayerAnimationHolder anim = new PlayerAnimationHolder(TimelessPlayerAnimations.MK5_CASE_OPEN); + PlayerAnimationTracker.addAnimation(player, anim); + } +} diff --git a/src/main/java/mc/duzo/timeless/suit/client/animation/IronManAnimations.java b/src/main/java/mc/duzo/timeless/suit/client/animation/IronManAnimations.java index ce2e548..bce7616 100644 --- a/src/main/java/mc/duzo/timeless/suit/client/animation/IronManAnimations.java +++ b/src/main/java/mc/duzo/timeless/suit/client/animation/IronManAnimations.java @@ -1157,4 +1157,1156 @@ public class IronManAnimations { Transformation.Interpolations.LINEAR), new Keyframe(0.3199999999999994f, AnimationHelper.createScalingVector(1f, 1f, 1f), Transformation.Interpolations.LINEAR))).build(); + + public static final Animation MK5_CASE_CLOSE = Animation.Builder.create(8.04f) + .addBoneAnimation("suit", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.24f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.44f, AnimationHelper.createTranslationalVector(0f, -9.38f, -10.61f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.6f, AnimationHelper.createTranslationalVector(0f, -14.39f, -14.11f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.72f, AnimationHelper.createTranslationalVector(0f, -19f, -13f), + Transformation.Interpolations.CUBIC), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, -19f, -13f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("suit", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(6.24f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.44f, AnimationHelper.createRotationalVector(63.18f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.72f, AnimationHelper.createRotationalVector(90f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(7.16f, AnimationHelper.createRotationalVector(90f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("LeftLeg", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 16f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, 11f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("LeftLeg", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.16f, AnimationHelper.createScalingVector(0.9f, 0.6f, 0.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(0.9f, 0.6f, 0.9f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("s1_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(2.4000000000000004f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.24f, AnimationHelper.createTranslationalVector(0f, -8f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("s1_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(2.76f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.8f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5999999999999996f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.6400000000000006f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.52f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("s2_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.04f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.44f, AnimationHelper.createTranslationalVector(0f, -4f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createTranslationalVector(3f, -4f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(3f, -4f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("s2_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3.92f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.04f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.32f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.28f, AnimationHelper.createScalingVector(0.6f, 0.6f, 0.6f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createScalingVector(0.6f, 0.6f, 0.6f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createScalingVector(1.2f, 1.2f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(1.2f, 1.2f, 1.2f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("l1_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(2.2f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.5600000000000005f, AnimationHelper.createTranslationalVector(0f, 4f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createTranslationalVector(0f, 4f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("l1_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(2.5600000000000005f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.6400000000000006f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("l2_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(1.5600000000000005f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.96f, AnimationHelper.createTranslationalVector(0f, 5f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.4800000000000004f, AnimationHelper.createTranslationalVector(0f, 5f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createTranslationalVector(0f, 5f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("l2_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(1.5600000000000005f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.5999999999999996f, AnimationHelper.createScalingVector(0.9f, 0.9f, 0.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.3200000000000003f, AnimationHelper.createScalingVector(0.9f, 0.9f, 0.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.4000000000000004f, AnimationHelper.createScalingVector(0.5f, 0.5f, 0.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createScalingVector(0.5f, 0.5f, 0.5f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("f_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5.88f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, -16f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.16f, AnimationHelper.createTranslationalVector(0f, -34.16f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.2f, AnimationHelper.createTranslationalVector(0f, -34.33f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.24f, AnimationHelper.createTranslationalVector(0f, -33f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("f_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(6.24f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.28f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone7", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.12f, AnimationHelper.createTranslationalVector(0f, 0f, -0.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.6f, AnimationHelper.createTranslationalVector(0f, 0f, -0.5f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone7", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.2f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.6f, AnimationHelper.createScalingVector(1f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone6", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.2f, AnimationHelper.createTranslationalVector(0f, 0f, 0.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.6f, AnimationHelper.createTranslationalVector(0f, 2f, 0.5f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone6", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(4.84f, AnimationHelper.createRotationalVector(-30f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5f, AnimationHelper.createRotationalVector(-30f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.6f, AnimationHelper.createRotationalVector(-30f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("core", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(3.16f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.24f, AnimationHelper.createTranslationalVector(0f, 0f, -1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.96f, AnimationHelper.createTranslationalVector(0f, 0f, -0.5f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("core", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(4.56f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.96f, AnimationHelper.createRotationalVector(0f, 0f, 180f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone8", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.48f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.8f, AnimationHelper.createTranslationalVector(0f, 1.75f, -0.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.6f, AnimationHelper.createTranslationalVector(0f, 1.75f, -0.5f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone8", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(4.32f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.48f, AnimationHelper.createRotationalVector(25f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.8f, AnimationHelper.createRotationalVector(25f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.6f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("main_torso", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(6.16f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.2f, AnimationHelper.createScalingVector(1f, 0.6f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(1f, 0.6f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone11", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone11", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.96f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5f, AnimationHelper.createScalingVector(1f, 1f, 1.05f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.44f, AnimationHelper.createScalingVector(1f, 1f, 1.05f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.72f, AnimationHelper.createScalingVector(1f, 0.7f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.8f, AnimationHelper.createScalingVector(1f, 0.7f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("left_torso", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5.04f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createTranslationalVector(2f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(2f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("left_torso", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.04f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createScalingVector(0.9f, 1f, 0.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(0.9f, 1f, 0.9f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("right_torso", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5.04f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createTranslationalVector(-2f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(-2f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("right_torso", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.04f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createScalingVector(0.9f, 1f, 0.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(0.9f, 1f, 0.9f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone4", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.96f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.6f, AnimationHelper.createScalingVector(1f, 0.2f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.64f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone12", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3.5199999999999996f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.04f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.92f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone10", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(2.88f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.3200000000000003f, AnimationHelper.createTranslationalVector(0f, 0f, 0.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.4399999999999995f, AnimationHelper.createTranslationalVector(-1.1f, 0f, 0.1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone9", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(2.88f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.3200000000000003f, AnimationHelper.createTranslationalVector(0f, 0f, 0.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.4399999999999995f, AnimationHelper.createTranslationalVector(1.1f, 0f, 0.1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("abs3", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5.04f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createTranslationalVector(0f, 5.75f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.96f, AnimationHelper.createTranslationalVector(0f, 5.75f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, 5.75f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("abs3", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(4.6f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.84f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.96f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("abs2", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5.32f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.64f, AnimationHelper.createTranslationalVector(0f, 3f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.24f, AnimationHelper.createTranslationalVector(0f, 3f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, 3f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("abs2", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(4.88f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.08f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.24f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("abs1", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5.6f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.88f, AnimationHelper.createTranslationalVector(0f, 1f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.52f, AnimationHelper.createTranslationalVector(0f, 1f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, 1f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("abs1", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(5.12f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.52f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createRotationalVector(-20f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone14", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(5.24f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createRotationalVector(25f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createRotationalVector(25f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.44f, AnimationHelper.createRotationalVector(45f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.64f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone15", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5.52f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.8f, AnimationHelper.createTranslationalVector(0f, 3f, -0.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 3f, -0.1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone15", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(5.36f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.52f, AnimationHelper.createRotationalVector(10f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createRotationalVector(10f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("JAW", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(3f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.2f, AnimationHelper.createTranslationalVector(0f, 0f, 2f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("JAW", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(1.5600000000000005f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.5999999999999996f, AnimationHelper.createRotationalVector(-10.59f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.96f, AnimationHelper.createRotationalVector(-10.59f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.8f, AnimationHelper.createRotationalVector(-180f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.08f, AnimationHelper.createRotationalVector(-180f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("JAW", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3.2f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.24f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.52f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("one4", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(0.16000000000000014f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.3200000000000003f, AnimationHelper.createTranslationalVector(0f, 1.5f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.88f, AnimationHelper.createTranslationalVector(0f, 1.5f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.04f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.84f, AnimationHelper.createTranslationalVector(0f, 0f, 2f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.92f, AnimationHelper.createTranslationalVector(0f, 0f, 2f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("one4", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.04f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.52f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("one3", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3.24f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.3200000000000003f, AnimationHelper.createScalingVector(1.2f, 1f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.84f, AnimationHelper.createScalingVector(1.2f, 1f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.88f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.52f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("one2", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3.7200000000000006f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.8f, AnimationHelper.createScalingVector(1.2f, 1f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.36f, AnimationHelper.createScalingVector(1.2f, 1f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.4f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.52f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("one", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.08f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.12f, AnimationHelper.createScalingVector(1.2f, 1f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.64f, AnimationHelper.createScalingVector(1.2f, 1f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.72f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.52f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone19", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(2.4800000000000004f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.5199999999999996f, AnimationHelper.createTranslationalVector(0f, -8f, 3f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, -8f, 3f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone19", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(2.4800000000000004f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.5199999999999996f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone22", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(0.16000000000000014f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.4800000000000004f, AnimationHelper.createTranslationalVector(0f, 2f, 0.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.5199999999999996f, AnimationHelper.createTranslationalVector(0f, 2f, 1.1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("RightArm", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.24f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.4f, AnimationHelper.createTranslationalVector(0f, 0.25f, 8.88f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.48f, AnimationHelper.createTranslationalVector(-0.1f, -3.5f, 11.25f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.6f, AnimationHelper.createTranslationalVector(0.39f, -1.25f, 10.7f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.64f, AnimationHelper.createTranslationalVector(1.07f, 1.3f, 9.67f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.68f, AnimationHelper.createTranslationalVector(1.75f, 3.75f, 3.75f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.76f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC))) + .addBoneAnimation("RightArm", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(4.8f, AnimationHelper.createRotationalVector(0f, 20f, 27.5f), + Transformation.Interpolations.CUBIC), + new Keyframe(5.32f, AnimationHelper.createRotationalVector(0f, 52.5f, 70f), + Transformation.Interpolations.CUBIC), + new Keyframe(5.68f, AnimationHelper.createRotationalVector(0f, 52.5f, 70f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.12f, AnimationHelper.createRotationalVector(-75f, 0f, 27.5f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.24f, AnimationHelper.createRotationalVector(-81.16f, -3.14f, 21.4f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.4f, AnimationHelper.createRotationalVector(-113.68f, 3.24f, 12.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.48f, AnimationHelper.createRotationalVector(-126.32f, 4.16f, 11.31f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.6f, AnimationHelper.createRotationalVector(-97.29f, 3.41f, 10.7f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.64f, AnimationHelper.createRotationalVector(-69.61f, 0.4f, 13.68f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.68f, AnimationHelper.createRotationalVector(-46.76f, -4.65f, 19.55f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone23", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.56f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.72f, AnimationHelper.createTranslationalVector(0f, 5f, 5f), + Transformation.Interpolations.CUBIC), + new Keyframe(7.28f, AnimationHelper.createTranslationalVector(0f, 5f, 5f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.4f, AnimationHelper.createTranslationalVector(4f, 5f, 5f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.52f, AnimationHelper.createTranslationalVector(4f, 5f, 5f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.64f, AnimationHelper.createTranslationalVector(4f, 5f, 2f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone23", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(6.56f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.72f, AnimationHelper.createRotationalVector(-90f, 20f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(7.28f, AnimationHelper.createRotationalVector(-90f, 20f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.4f, AnimationHelper.createRotationalVector(-90f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.52f, AnimationHelper.createRotationalVector(-90f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone23", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(7.52f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb5_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.6f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.4f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb2_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.12f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.12f, AnimationHelper.createTranslationalVector(0f, -4.5f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createTranslationalVector(0f, -4.5f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb2_right", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(3.92f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4f, AnimationHelper.createRotationalVector(0f, 0f, 17.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createRotationalVector(0f, 0f, 17.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.44f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb2_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3.4800000000000004f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createScalingVector(1.2f, 1.2f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b1_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b1_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.6f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.8f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.84f, AnimationHelper.createScalingVector(0f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(0f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b2_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.12f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.8f, AnimationHelper.createTranslationalVector(0f, 3f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 3f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b2_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.24f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.8f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.84f, AnimationHelper.createScalingVector(0f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(0f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b3_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.44f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.76f, AnimationHelper.createTranslationalVector(0f, -6f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createTranslationalVector(0f, -6f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b3_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.72f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.16f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb3_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(3.5199999999999996f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.16f, AnimationHelper.createTranslationalVector(0f, 3f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 3f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb3_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.52f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.56f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb4_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.72f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.28f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.52f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("right_Shoulder", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.96f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.16f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.6f, AnimationHelper.createTranslationalVector(3f, 0f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.76f, AnimationHelper.createTranslationalVector(3f, 0f, 1.95f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.52f, AnimationHelper.createTranslationalVector(5f, -2f, 1.95f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createTranslationalVector(5f, -2f, -0.45f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(5f, -2f, -0.45f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("right_Shoulder", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(4.6f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.96f, AnimationHelper.createRotationalVector(0f, 0f, 30f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("right_Shoulder", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.6f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.76f, AnimationHelper.createScalingVector(1f, 1f, 0.6f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 1f, 0.6f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createScalingVector(1f, 1f, 0.89f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(1f, 1f, 0.89f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("f_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(5.88f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, -16f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.16f, AnimationHelper.createTranslationalVector(0f, -34.16f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.2f, AnimationHelper.createTranslationalVector(0f, -34.33f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.24f, AnimationHelper.createTranslationalVector(0f, -33f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("f_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(6.24f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.28f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("RightLeg", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 16f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(0f, 11f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("RightLeg", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.16f, AnimationHelper.createScalingVector(0.9f, 0.6f, 0.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(0.9f, 0.6f, 0.9f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("s1_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(2.4000000000000004f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.24f, AnimationHelper.createTranslationalVector(0f, -8f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("s1_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(2.76f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.8f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5999999999999996f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.6400000000000006f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.52f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("s2_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.04f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.44f, AnimationHelper.createTranslationalVector(0f, -4f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createTranslationalVector(-3f, -4f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(-3f, -4f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("s2_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3.92f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.04f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.32f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.28f, AnimationHelper.createScalingVector(0.6f, 0.6f, 0.6f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createScalingVector(0.6f, 0.6f, 0.6f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createScalingVector(1.2f, 1.2f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(1.2f, 1.2f, 1.2f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("l1_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(2.2f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.5600000000000005f, AnimationHelper.createTranslationalVector(0f, 4f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createTranslationalVector(0f, 4f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("l1_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(2.5600000000000005f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.6400000000000006f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("l2_right", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(1.5600000000000005f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.96f, AnimationHelper.createTranslationalVector(0f, 5f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.4800000000000004f, AnimationHelper.createTranslationalVector(0f, 5f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createTranslationalVector(0f, 5f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("l2_right", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(1.5600000000000005f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.5999999999999996f, AnimationHelper.createScalingVector(0.9f, 0.9f, 0.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.3200000000000003f, AnimationHelper.createScalingVector(0.9f, 0.9f, 0.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(2.4000000000000004f, AnimationHelper.createScalingVector(0.5f, 0.5f, 0.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createScalingVector(0.5f, 0.5f, 0.5f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone25", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(0.2400000000000002f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.3600000000000003f, AnimationHelper.createTranslationalVector(0f, 0f, -0.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.2800000000000002f, AnimationHelper.createTranslationalVector(0f, 0f, -0.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.5199999999999996f, AnimationHelper.createTranslationalVector(0f, 0f, 2.5f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone26", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(0.28000000000000025f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.40000000000000036f, AnimationHelper.createTranslationalVector(0f, 0f, -0.25f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.6399999999999997f, AnimationHelper.createTranslationalVector(0f, 0f, -0.25f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.7599999999999998f, AnimationHelper.createTranslationalVector(0f, 0.75f, -0.25f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.1600000000000001f, AnimationHelper.createTranslationalVector(0f, 0.75f, -0.25f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.4000000000000004f, AnimationHelper.createTranslationalVector(0f, 0.75f, 2.5f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone27", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(0.2400000000000002f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.6799999999999997f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone28", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(0.20000000000000018f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.28000000000000025f, AnimationHelper.createTranslationalVector(0f, 0f, -0.22f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.9199999999999999f, AnimationHelper.createTranslationalVector(0f, 0f, -0.22f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.1600000000000001f, AnimationHelper.createTranslationalVector(0f, 4f, -0.22f), + Transformation.Interpolations.LINEAR), + new Keyframe(1.4000000000000004f, AnimationHelper.createTranslationalVector(0f, 1f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone29", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(0.3200000000000003f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.5600000000000005f, AnimationHelper.createTranslationalVector(0f, 1f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.7199999999999998f, AnimationHelper.createTranslationalVector(0f, 1f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone30", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(0f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.1200000000000001f, AnimationHelper.createTranslationalVector(0f, 0f, -0.75f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.5600000000000005f, AnimationHelper.createTranslationalVector(0f, 0f, -0.75f), + Transformation.Interpolations.LINEAR), + new Keyframe(0.7599999999999998f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("case", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.28f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("case", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(6.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.24f, AnimationHelper.createScalingVector(0.5f, 1f, 0.5f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.48f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.CUBIC))) + .addBoneAnimation("Head", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.96f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(1.8399999999999999f, AnimationHelper.createRotationalVector(-27.5f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(4.36f, AnimationHelper.createRotationalVector(-27.5f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(4.88f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC))) + .addBoneAnimation("LeftArm", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.24f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.4f, AnimationHelper.createTranslationalVector(0f, 0.25f, 8.88f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.48f, AnimationHelper.createTranslationalVector(0.1f, -3.5f, 11.25f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.6f, AnimationHelper.createTranslationalVector(-0.39f, -1.25f, 10.7f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.64f, AnimationHelper.createTranslationalVector(-1.07f, 1.3f, 9.67f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.68f, AnimationHelper.createTranslationalVector(-1.75f, 3.75f, 3.75f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.76f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC))) + .addBoneAnimation("LeftArm", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(4.8f, AnimationHelper.createRotationalVector(0f, -20f, -27.5f), + Transformation.Interpolations.CUBIC), + new Keyframe(5.32f, AnimationHelper.createRotationalVector(0f, -52.5f, -70f), + Transformation.Interpolations.CUBIC), + new Keyframe(5.68f, AnimationHelper.createRotationalVector(0f, -52.5f, -70f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.12f, AnimationHelper.createRotationalVector(-75f, 0f, -27.5f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.24f, AnimationHelper.createRotationalVector(-81.16f, 3.14f, -21.4f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.4f, AnimationHelper.createRotationalVector(-113.68f, -3.24f, -12.9f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.48f, AnimationHelper.createRotationalVector(-126.32f, -4.16f, -11.31f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.6f, AnimationHelper.createRotationalVector(-97.29f, -3.41f, -10.7f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.64f, AnimationHelper.createRotationalVector(-69.61f, -0.4f, -13.68f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.68f, AnimationHelper.createRotationalVector(-46.76f, 4.65f, -19.55f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone17", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.56f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.72f, AnimationHelper.createTranslationalVector(0f, 5f, 5f), + Transformation.Interpolations.CUBIC), + new Keyframe(7.28f, AnimationHelper.createTranslationalVector(0f, 5f, 5f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.4f, AnimationHelper.createTranslationalVector(-4f, 5f, 5f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.52f, AnimationHelper.createTranslationalVector(-4f, 5f, 5f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.64f, AnimationHelper.createTranslationalVector(-4f, 5f, 2f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone17", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(6.56f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(6.72f, AnimationHelper.createRotationalVector(-90f, -20f, 0f), + Transformation.Interpolations.CUBIC), + new Keyframe(7.28f, AnimationHelper.createRotationalVector(-90f, -20f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.4f, AnimationHelper.createRotationalVector(-90f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.52f, AnimationHelper.createRotationalVector(-90f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("bone17", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(7.52f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb5_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.6f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.4f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb2_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.12f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.12f, AnimationHelper.createTranslationalVector(0f, -4.5f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createTranslationalVector(0f, -4.5f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb2_left", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(3.92f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4f, AnimationHelper.createRotationalVector(0f, 0f, -17.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createRotationalVector(0f, 0f, -17.5f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.44f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb2_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(3.4800000000000004f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(3.5199999999999996f, AnimationHelper.createScalingVector(1.2f, 1.2f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.36f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b1_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b1_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.6f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.8f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.84f, AnimationHelper.createScalingVector(0f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(0f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b2_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.12f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.8f, AnimationHelper.createTranslationalVector(0f, 3f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 3f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b2_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.24f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.8f, AnimationHelper.createScalingVector(1.1f, 1.1f, 1.1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.84f, AnimationHelper.createScalingVector(0f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(0f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b3_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.44f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.76f, AnimationHelper.createTranslationalVector(0f, -6f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createTranslationalVector(0f, -6f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("b3_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.72f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.16f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb3_left", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(3.5199999999999996f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.16f, AnimationHelper.createTranslationalVector(0f, 3f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createTranslationalVector(0f, 3f, 0f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb3_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(4.52f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.56f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("lb4_left", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.72f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.28f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.52f, AnimationHelper.createScalingVector(1f, 0f, 1f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("left_Shoulder", + new Transformation(Transformation.Targets.TRANSLATE, + new Keyframe(4.96f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.16f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.6f, AnimationHelper.createTranslationalVector(-3f, 0f, 1.2f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.76f, AnimationHelper.createTranslationalVector(-3f, 0f, 1.95f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.52f, AnimationHelper.createTranslationalVector(-5f, -2f, 1.95f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createTranslationalVector(-5f, -2f, -0.45f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createTranslationalVector(-5f, -2f, -0.45f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("left_Shoulder", + new Transformation(Transformation.Targets.ROTATE, + new Keyframe(4.6f, AnimationHelper.createRotationalVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(4.96f, AnimationHelper.createRotationalVector(0f, 0f, -30f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("left_Shoulder", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(5.6f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(5.76f, AnimationHelper.createScalingVector(1f, 1f, 0.6f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.12f, AnimationHelper.createScalingVector(1f, 1f, 0.6f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.16f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.72f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR), + new Keyframe(6.76f, AnimationHelper.createScalingVector(1f, 1f, 0.89f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.16f, AnimationHelper.createScalingVector(1f, 1f, 0.89f), + Transformation.Interpolations.LINEAR))) + .addBoneAnimation("parentofsuit", + new Transformation(Transformation.Targets.SCALE, + new Keyframe(7.72f, AnimationHelper.createScalingVector(1f, 1f, 1f), + Transformation.Interpolations.LINEAR), + new Keyframe(7.88f, AnimationHelper.createScalingVector(1.25f, 1.25f, 1.25f), + Transformation.Interpolations.LINEAR), + new Keyframe(8.04f, AnimationHelper.createScalingVector(0f, 0f, 0f), + Transformation.Interpolations.LINEAR))).build(); } diff --git a/src/main/java/mc/duzo/timeless/suit/ironman/mk5/MarkFiveCase.java b/src/main/java/mc/duzo/timeless/suit/ironman/mk5/MarkFiveCase.java index e8d57ff..2e428fe 100644 --- a/src/main/java/mc/duzo/timeless/suit/ironman/mk5/MarkFiveCase.java +++ b/src/main/java/mc/duzo/timeless/suit/ironman/mk5/MarkFiveCase.java @@ -10,16 +10,14 @@ import net.minecraft.util.TypedActionResult; import net.minecraft.world.World; -import mc.duzo.timeless.client.animation.player.PlayerAnimationTracker; -import mc.duzo.timeless.client.animation.player.TimelessPlayerAnimations; -import mc.duzo.timeless.client.animation.player.holder.PlayerAnimationHolder; import mc.duzo.timeless.datagen.provider.lang.AutomaticEnglish; +import mc.duzo.timeless.network.Network; +import mc.duzo.timeless.network.s2c.MarkFiveAnimationS2CPacket; import mc.duzo.timeless.registry.Register; import mc.duzo.timeless.suit.client.animation.IronManAnimations; -import mc.duzo.timeless.suit.client.animation.SuitAnimationHolder; -import mc.duzo.timeless.suit.client.animation.SuitAnimationTracker; import mc.duzo.timeless.suit.set.SetRegistry; import mc.duzo.timeless.suit.set.SuitSet; +import mc.duzo.timeless.util.DeltaTimeManager; public class MarkFiveCase extends Item implements AutomaticEnglish { public MarkFiveCase() { @@ -30,13 +28,6 @@ public MarkFiveCase() { public TypedActionResult use(World world, PlayerEntity user, Hand hand) { if (world.isClient()) { boolean wearing = getSet().isWearing(user); - - if (!wearing) { - // todo - send off a packet instead - SuitAnimationTracker.addAnimation(user.getUuid(), new SuitAnimationHolder(IronManAnimations.MK5_CASE_OPEN, true, false)); - PlayerAnimationTracker.addAnimation(user.getUuid(), new PlayerAnimationHolder(TimelessPlayerAnimations.MK5_CASE_OPEN)); - } - return (!wearing) ? TypedActionResult.consume(user.getStackInHand(hand)) : TypedActionResult.fail(user.getStackInHand(hand)); } @@ -48,17 +39,26 @@ public static boolean toCase(ServerPlayerEntity player, boolean force) { if (!force) { if (!(getSet().isWearing(player))) return false; - player.getArmorItems().forEach(stack -> stack.setCount(0)); + Network.toTracking(new MarkFiveAnimationS2CPacket(player.getUuid(), false), player); } - player.getInventory().offerOrDrop(new ItemStack(Register.Items.MARK_FIVE_CASE)); + DeltaTimeManager.enqueueTask((long) (IronManAnimations.MK5_CASE_CLOSE.lengthInSeconds() * 1000L), () -> toCasePost(player, force)); return true; } + private static void toCasePost(ServerPlayerEntity player, boolean force) { + if (!force) { + player.getArmorItems().forEach(stack -> stack.setCount(0)); + } + player.getInventory().offerOrDrop(new ItemStack(Register.Items.MARK_FIVE_CASE)); + } + public static boolean fromCase(ServerPlayerEntity player, boolean force) { if (!force) { if (!player.getMainHandStack().isOf(Register.Items.MARK_FIVE_CASE)) return false; // not holding if (getSet().isWearing(player)) return false; // already wearing + Network.toTracking(new MarkFiveAnimationS2CPacket(player.getUuid(), true), player); + player.getMainHandStack().setCount(0); } diff --git a/src/main/java/mc/duzo/timeless/util/DeltaTimeManager.java b/src/main/java/mc/duzo/timeless/util/DeltaTimeManager.java new file mode 100644 index 0000000..71b7833 --- /dev/null +++ b/src/main/java/mc/duzo/timeless/util/DeltaTimeManager.java @@ -0,0 +1,66 @@ +package mc.duzo.timeless.util; + +import java.util.HashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +/** + * Used for creating delays + * Not my code + * ... + * + * @author Neptune Development Group + */ +public class DeltaTimeManager { + private static final HashMap nextUpdateTimeMap = new HashMap<>(); + + + /** + * Creates a delay for the given string with the specified time delay. + * + * @param string the string for which the delay is created + * @param timeDelay the time delay in milliseconds + */ + public static void createDelay(String string, Long timeDelay) { + long nextUpdateTime = System.currentTimeMillis() + timeDelay; + if (!nextUpdateTimeMap.containsKey(string)) { + nextUpdateTimeMap.put(string, nextUpdateTime); + } else { + nextUpdateTimeMap.replace(string, nextUpdateTime); + } + } + + /** + * Checks if the given string is still waiting on delay. + * + * @param string the string to check + * @return true if the string is still waiting on delay, false otherwise + */ + public static boolean isOnDelay(String string) { + if (!nextUpdateTimeMap.containsKey(string)) return false; + return nextUpdateTimeMap.get(string) > System.currentTimeMillis(); + } + + /** + * Calculates the time left based on the provided string. + * + * @param string the string for which the time left is calculated + * @return the time left in milliseconds + */ + public static int timeLeft(String string) { + if (!nextUpdateTimeMap.containsKey(string)) return 0; + return Math.round(nextUpdateTimeMap.get(string) - System.currentTimeMillis()); + } + + /** + * Enqueues a task to be run after the specified number of milliseconds. + * @param runnable what to run + * @param millis how long to wait in milliseconds + */ + public static void enqueueTask(long millis, Runnable runnable) { + ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(); + + executorService.schedule(runnable, millis, TimeUnit.MILLISECONDS); + } +} \ No newline at end of file diff --git a/src/main/java/mc/duzo/timeless/util/ServerLifecycleHooks.java b/src/main/java/mc/duzo/timeless/util/ServerLifecycleHooks.java new file mode 100644 index 0000000..dc64342 --- /dev/null +++ b/src/main/java/mc/duzo/timeless/util/ServerLifecycleHooks.java @@ -0,0 +1,23 @@ +package mc.duzo.timeless.util; + +import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; + +import net.minecraft.server.MinecraftServer; + +public class ServerLifecycleHooks { + + private static MinecraftServer server; + + public static void init() { + ServerLifecycleEvents.SERVER_STARTED.register(server -> ServerLifecycleHooks.server = server); + ServerLifecycleEvents.SERVER_STOPPING.register(server -> ServerLifecycleHooks.server = null); + } + + public static MinecraftServer get() { + return server; + } + + public static boolean isServer() { + return server != null; // since it will only be initialised on server (ish) + } +} \ No newline at end of file