import { EquipmentSlot, world } from "@minecraft/server";
export function getHand(player) {
    const equipment = player.getComponent("equippable");
    const selectedItem = equipment.getEquipment(EquipmentSlot.Mainhand);
    if (selectedItem != undefined)
        return selectedItem;
    return undefined;
}
export function getDimension() {
    return world.getDimension("overworld");
}
export function fixName(id) {
    const newId = id.replaceAll("minecraft:", "").replaceAll("_", " ").replaceAll("wildphire:", "");
    return newId.charAt(0).toUpperCase() + newId.slice(1);
}
