export default class TrapdoorComponent {
    onPlayerInteract(e) {
        const isOpened = e.block.permutation.getState('twb_wisu:open_bit');
        e.block.dimension.playSound(isOpened ? 'close.wooden_trapdoor' : 'open.wooden_trapdoor', e.block);
        e.block.setPermutation(e.block.permutation.withState('twb_wisu:open_bit', !isOpened));
    }
}
