import { Player } from "@minecraft/server";
import { shrinkIfInSurvival, transmuteBlock } from "../util/miscUtils";
export const BuntingPlaceComponent = {
    onUseOn(event) {
        const block = event.block;
        if (block.typeId == "razz_sup:rope" /* SuppBlocks.Rope */) {
            block.setPermutation(transmuteBlock(block.permutation, event.itemStack.typeId));
            const ent = event.source;
            if (ent instanceof Player) {
                shrinkIfInSurvival(ent, event.itemStack);
            }
        }
    }
};
