const END_PORTAL_CLEANUP_RADIUS = 8

BlockEvents.rightClicked(event => {
    const { block, item, level, player } = event

    if (level.isClientSide()) return
    if (block.id !== 'minecraft:end_portal_frame') return
    if (!item || item.id !== 'minecraft:ender_eye') return

    event.cancel()

    if (player) {
        player.tell(Text.of('The End portal cannot be activated.').red())
    }
})
