import { world } from '@minecraft/server';
import { jukeboxManager } from '../jukebox/jukeboxManager';
const blockComponents = [
    {
        id: "moremusicdiscs:jukebox",
        data: {
            onPlayerInteract: (data)=>{
                jukeboxManager.interactWithJukebox(data.block, data.player);
            },
            onPlayerDestroy: (data)=>{
                jukeboxManager.breakJukebox(data);
            },
            onPlace: (data)=>{}
        }
    }
];
world.beforeEvents.worldInitialize.subscribe((data)=>{
    for (const comp of blockComponents){
        data.blockTypeRegistry.registerCustomComponent(comp.id, comp.data);
    }
});
