// Global map to track cooldown start times for each player
export const cooldownStartTimes = new Map();

export function isNotSolid(block) {
  return (
    block.isLiquid ||
    block.isAir ||
    block.permutation.getState("flower_type") !== undefined ||
    block.permutation.getState("tall_grass_type") !== undefined ||
    block.permutation.getState("sea_grass_type") !== undefined ||
    block.permutation.getState("double_plant_type") !== undefined ||
    block.permutation.matches("minecraft:fire") ||
    block.permutation.matches("minecraft:soul_fire") ||
    block.permutation.matches("minecraft:torch") ||
    block.permutation.matches("minecraft:soul_torch") ||
    block.permutation.matches("minecraft:snow_layer") ||
    block.permutation.matches("minecraft:powder_snow") ||
    block.permutation.matches("minecraft:snow") ||
    block.permutation.matches("minecraft:twisting_vines") ||
    block.permutation.matches("minecraft:reeds") ||
    block.permutation.matches("minecraft:deadbush") ||
    block.permutation.matches("minecraft:sweet_berry_bush") ||
    block.permutation.matches("minecraft:bamboo") ||
    block.permutation.matches("minecraft:bamboo_sapling") ||
    block.permutation.matches("minecraft:cocoa") ||
    block.permutation.matches("minecraft:hanging_roots") ||
    block.permutation.matches("minecraft:mangrove_roots") ||
    block.permutation.matches("minecraft:kelp") ||
    block.permutation.matches("minecraft:vine") ||
    block.permutation.matches("minecraft:crimson_fungus") ||
    block.permutation.matches("minecraft:warped_fungus") ||
    block.permutation.matches("minecraft:crimson_roots") ||
    block.permutation.matches("minecraft:warped_roots") ||
    block.permutation.matches("minecraft:red_mushroom") ||
    block.permutation.matches("minecraft:brown_mushroom") ||
    block.permutation.matches("minecraft:glow_lichen") ||
    block.permutation.matches("minecraft:sculk_vein") ||
    block.permutation.matches("minecraft:nether_sprouts") ||
    block.permutation.matches("minecraft:nether_wart") ||
    block.permutation.matches("minecraft:sapling") ||
    block.permutation.matches("minecraft:red_flower") ||
    block.permutation.matches("minecraft:yellow_flower") ||
    block.permutation.matches("minecraft:torchflower") ||
    block.permutation.matches("minecraft:wither_rose") ||
    block.permutation.matches("minecraft:web") ||
    block.permutation.matches("minecraft:frog_spawn")
  );
}

export const unnaturalBlocks = new Set([
  "float_ad:end_carpet_1",
  "float_ad:end_carpet_2",
  "float_ad:end_carpet_2",
  "float_ad:end_carpet_2",
  "float_ad:end_carpet_2",
  "float_ad:end_wall_2",
  "float_ad:end_wall_2",
  "float_ad:end_wall_2",
  "float_ad:end_wall_1",
  "float_ad:end_wall_1",
  "float_ad:end_ceiling",
  "float_ad:end_ceiling",
  "float_ad:lobby_carpet",
  "float_ad:lobby_carpet_mark_1",
  "float_ad:lobby_carpet_mark_2",
  "float_ad:lobby_carpet_mark_3",
  "float_ad:lobby_wall_1_bottom",
  "float_ad:lobby_wall_1",
  "float_ad:lobby_wall_1_socket",
  "float_ad:lobby_wall_1_mark_1",
  "float_ad:lobby_wall_1_mark_2",
  "float_ad:lobby_ceiling_1",
  "float_ad:lobby_ceiling_mark_1",
  "float_ad:lobby_ceiling_mark_2",
  "float_ad:lobby_ceiling_mark_3",
  "float_ad:lobby_ceiling_mark_4",
  "float_ad:lobby_carpet",
  "float_ad:lobby_carpet_mark_1",
  "float_ad:lobby_carpet_mark_2",
  "float_ad:lobby_carpet_mark_3",
  "float_ad:lobby_wall_2_bottom",
  "float_ad:lobby_wall_2",
  "float_ad:lobby_wall_2_socket",
  "float_ad:lobby_wall_2_mark_1",
  "float_ad:lobby_wall_2_mark_2",
  "float_ad:pink_carpet",
  "float_ad:pink_wall_bottom",
  "float_ad:pink_wall_bottom_socket",
  "float_ad:pink_wall",
  "float_ad:pink_wall_socket",
  "float_ad:pink_wall",
  "float_ad:pink_ceiling",
  "float_ad:pink_light",
  "float_ad:pool_tile",
  "float_ad:pool_tile_2",
  "float_ad:pool_tile_3",
  "float_ad:pool_tile_4",
  "float_ad:pool_tile",
  "float_ad:pool_tile_5",
  "float_ad:run_floor",
  "float_ad:run_wall_bottom",
  "float_ad:run_wall",
  "float_ad:run_ceiling",
  "float_ad:school_floor",
  "float_ad:school_wall_bottom",
  "float_ad:school_wall",
]);

export const naturalBlocks = new Set([
  "minecraft:cobblestone",
  "minecraft:stone",
  "minecraft:deepslate",
  "minecraft:granite", // Granite
  "minecraft:polished_granite", // Polished Granite
  "minecraft:diorite", // Diorite
  "minecraft:polished_diorite", // Polished Diorite
  "minecraft:andesite", // Andesite
  "minecraft:polished_andesite", // Polished Andesite
  "minecraft:dirt",
  "minecraft:grass",
  "minecraft:sand",
  "minecraft:gravel",
  "minecraft:oak_log", // Oak Log
  "minecraft:spruce_log", // Spruce Log
  "minecraft:birch_log", // Birch Log
  "minecraft:jungle_log", // Jungle Log
  "minecraft:acacia_log", // Acacia Log
  "minecraft:dark_oak_log", // Dark Oak Log
  "minecraft:oak_leaves", // Oak Leaves
  "minecraft:spruce_leaves", // Spruce Leaves
  "minecraft:birch_leaves", // Birch Leaves
  "minecraft:jungle_leaves", // Jungle Leaves
  "minecraft:acacia_leaves", // Acacia Leaves
  "minecraft:dark_oak_leaves", // Dark Oak Leaves
  "minecraft:planks", // Oak Planks
  "minecraft:spruce_planks", // Spruce Planks
  "minecraft:birch_planks", // Birch Planks
  "minecraft:jungle_planks", // Jungle Planks
  "minecraft:acacia_planks", // Acacia Planks
  "minecraft:dark_oak_planks", // Dark Oak Planks
  "minecraft:stonebrick", // Stone Bricks
  "minecraft:nether_brick", // Nether Bricks
  "minecraft:purpur_block", // Purpur Block
  "minecraft:quartz_block", // Quartz Block
  "minecraft:prismarine", // Prismarine
  "minecraft:sponge", // Sponge
  "minecraft:packed_ice", // Packed Ice
  "minecraft:snow", // Snow Block
  "minecraft:clay", // Clay
  "minecraft:glowstone", // Glowstone
  "minecraft:mycelium", // Mycelium
  "minecraft:sea_lantern", // Sea Lantern
  "minecraft:bone_block", // Bone Block
  "minecraft:clay", // Terracotta
  "minecraft:hardened_clay", // Terracotta
  "minecraft:orange_terracotta", // Orange Terracotta
  "minecraft:magenta_terracotta", // Magenta Terracotta
  "minecraft:light_blue_terracotta", // Light Blue Terracotta
  "minecraft:yellow_terracotta", // Yellow Terracotta
  "minecraft:lime_terracotta", // Lime Terracotta
  "minecraft:pink_terracotta", // Pink Terracotta
  "minecraft:gray_terracotta", // Gray Terracotta
  "minecraft:light_gray_terracotta", // Light Gray Terracotta
  "minecraft:cyan_terracotta", // Cyan Terracotta
  "minecraft:purple_terracotta", // Purple Terracotta
  "minecraft:blue_terracotta", // Blue Terracotta
  "minecraft:brown_terracotta", // Brown Terracotta
  "minecraft:green_terracotta", // Green Terracotta
  "minecraft:red_terracotta", // Red Terracotta
  "minecraft:black_terracotta", // Black Terracotta
  "minecraft:quartz_ore", // Quartz Ore
  "minecraft:smooth_stone", // Smooth Stone
  "minecraft:quartz_bricks", // Quartz Bricks
  "minecraft:brick_block", // Bricks
  "minecraft:end_stone", // End Stone
  "minecraft:end_bricks", // End Bricks
  "minecraft:coal_ore",
  "minecraft:iron_ore",
  "minecraft:gold_ore",
  "minecraft:redstone_ore",
  "minecraft:lapis_ore",
  "minecraft:diamond_ore",
  "minecraft:emerald_ore",
  "minecraft:copper_ore",
]);
