import { world } from "@minecraft/server";

// Когда игрок ставит блок keg
world.afterEvents.playerPlaceBlock.subscribe((event) => {
    const block = event.block;
    
    if (block.typeId === "brewinandchewin:keg" || block.typeId === "brewinandchewin:vertical_keg") {
        // Создаем существо keg
        const entity = event.dimension.spawnEntity("brewinandchewin:keg", block.center());
        entity.nameTag = "§t§e§s§t§f§2§f§2§r";
    }
}); 