import { world, } from "@minecraft/server";
import { namespace } from "../../../config/_config";
// DripstoneBlock class to handle custom behavior for placing and destroying dripstone blocks
export class StairsCollisionBlock {
    constructor() {
        StairsCollisionBlock.initialize();
    }
    // Method to initialize custom components and event handling for dripstone blocks
    static initialize() {
        world.beforeEvents.worldInitialize.subscribe((event) => {
            event.blockComponentRegistry.registerCustomComponent(`${namespace}:stairs_collision`, {
                onStepOn: (event) => this.handleStepOn(event),
                onStepOff: (event) => this.handleStepOff(event),
            });
        });
    }
    static handleStepOn(event) {
        event.block.above()?.setType(`${namespace}:stairs_collision`);
        const location = {
            x: event.entity.location.x,
            y: event.entity.location.y + 0.5,
            z: event.entity.location.z,
        };
    }
    static handleStepOff(event) {
        event.block.above()?.setType(`air`);
    }
}
StairsCollisionBlock.hasJumped = new Map();
