package net.minestom.server.network.packet.server.multiversion.v1_17.impl;

import net.minestom.server.network.packet.server.ServerPacket;
import net.minestom.server.network.packet.server.multiversion.VersionedPacket;
import net.minestom.server.network.packet.server.multiversion.v1_17.V1_17ServerPacketIdentifier;
import net.minestom.server.network.packet.server.play.EntityAnimationPacket;
import net.minestom.server.utils.binary.BinaryWriter;

public class V1_17EntityAnimationPacket implements VersionedPacket {

    @Override
    public void writePacket(BinaryWriter writer, ServerPacket packet) {
        EntityAnimationPacket packet_ = (EntityAnimationPacket) packet;
        writer.writeVarInt(packet_.entityId);
        writer.writeByte((byte) packet_.animation.ordinal());
    }

    @Override
    public int getId() {
        return V1_17ServerPacketIdentifier.ENTITY_ANIMATION;
    }

}