class beforeOnPlayerPlace {
    constructor() {
        this.beforeOnPlayerPlace = this.beforeOnPlayerPlace.bind(this);
    }
    beforeOnPlayerPlace(_componentData) { }
}
export class stoneStatue extends beforeOnPlayerPlace {
    beforeOnPlayerPlace(componentData) {
        componentData.cancel = true;
        const rotation = componentData.player.getRotation();
        const dimension = componentData.dimension;
        const roundedRotationY = Math.round(rotation.y / 90) * 90 || 180;
        const entity = dimension.spawnEntity('endorah_mo:stone_statue', componentData.block.center());
        entity.setRotation({
            x: 0,
            y: roundedRotationY === -180 ? 0 : -roundedRotationY
        });
    }
}
