import { world, BlockTypes } from "@minecraft/server";
world.beforeEvents.playerInteractWithEntity.subscribe((data) => {
    if (data.target.typeId == "better_on_bedrock:pedastal"){
    const allTypes = BlockTypes.getAll();
    const isBlock = allTypes.find((type) => type.id == data.itemStack?.typeId);
    if (isBlock === undefined) return;

    data.cancel = true;}
});