import { EasingType } from "@minecraft/server";
export default class Camera {
    constructor(entity) {
        this.entity_id = "";
        this.player = null;
        this.name = "camera";
        this.entity = entity;
        this.entity_id = entity.id;
    }
    setPlayer(player) {
        this.player = player;
    }
    removePlayer() {
        this.player = null;
    }
    tick() {
        if (this.entity && this.entity.isValid()) {
            if (this.player) {
                const cameraLocation = {
                    x: this.entity.location.x,
                    y: this.entity.location.y + 2.5,
                    z: this.entity.location.z
                };
                this.player.camera.setCamera("minecraft:free", { location: cameraLocation, rotation: this.entity.getRotation(), easeOptions: { easeTime: 1, easeType: EasingType.Linear } });
            }
        }
    }
}

//# sourceMappingURL=../../../../_SBUNK_BPDebug/fs_sbunk/entity/Camera.js.map
