import { world, system } from "@minecraft/server";
import { fo } from './utilities/fo_constants.js';


export function initPlayerShadowSteps() { 
    
    const
        delayedStepsChance = 1 / 105, 
        delayedStepsChance2 = 1 / 18, 

        FOREBODINGCHECK1 = fo.scoreChapter3,
        FOREBODINGCHECK5 = fo.scoreChapter5,
        FOREBODINGCHECK7 = fo.scoreChapter7s,

        FOOTSTEP_RECORD_INTERVAL = 8, 
        FOOTSTEP_PLAYBACK_DELAY = 160, 
        FOOTSTEP_PLAYBACK_INTERVAL = 8, 
        MIN_DISTANCE_FROM_PLAYER = 6, 
        FOOTSTEPS_TO_RECORD = 16, 

        interval = 340, 

        overworld = fo.overworld,

        
        playerFootsteps = new Map();

    const blockSoundTypes = [
        { block: "minecraft:acacia_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:acacia_leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:acacia_log", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:acacia_planks", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:acacia_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:acacia_stairs", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:amethyst_block", soundDefinition: "step.amethyst_block", volume: 1, pitch: 1 },
        { block: "minecraft:andesite", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:andesite_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:andesite_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:andesite_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:azalea_leaves", soundDefinition: "step.azalea_leaves", volume: 0.3, pitch: 1 },
        { block: "minecraft:azalea_leaves_flowered", soundDefinition: "step.azalea_leaves", volume: 0.3, pitch: 1 },
        { block: "minecraft:bamboo", soundDefinition: "block.bamboo.step", volume: 0.3, pitch: 1 },
        { block: "minecraft:bamboo_block", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:bamboo_double_slab", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:bamboo_mosaic", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:bamboo_mosaic_double_slab", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:bamboo_mosaic_slab", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:bamboo_mosaic_stairs", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:bamboo_planks", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:bamboo_slab", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:bamboo_stairs", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:basalt", soundDefinition: "step.basalt", volume: 0.19, pitch: 1 },
        { block: "minecraft:big_dripleaf", soundDefinition: "step.big_dripleaf", volume: 0.17, pitch: 1 },
        { block: "minecraft:birch_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:birch_leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:birch_log", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:birch_planks", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:birch_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:birch_stairs", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:black_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:black_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:black_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:black_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:black_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:black_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:blackstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blackstone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blackstone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blackstone_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blue_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:blue_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blue_ice", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blue_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blue_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blue_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:blue_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:bone_block", soundDefinition: "step.bone_block", volume: 0.22, pitch: 1 },
        { block: "minecraft:brain_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brick_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brick_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brick_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brick_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brown_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:brown_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brown_mushroom_block", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:brown_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brown_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brown_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:brown_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:bubble_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:calcite", soundDefinition: "step.calcite", volume: 1, pitch: 1 },
        { block: "minecraft:carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:cherry_double_slab", soundDefinition: "step.cherry_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:cherry_leaves", soundDefinition: "step.cherry_leaves", volume: 0.2, pitch: 1 },
        { block: "minecraft:cherry_log", soundDefinition: "step.cherry_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:cherry_planks", soundDefinition: "step.cherry_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:cherry_slab", soundDefinition: "step.cherry_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:cherry_stairs", soundDefinition: "step.cherry_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:chiseled_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_deepslate", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_nether_bricks", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:chiseled_polished_blackstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_quartz_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_red_sandstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_resin_bricks", soundDefinition: "block.resin.step", volume: 0.15, pitch: 1 },
        { block: "minecraft:chiseled_sandstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_stone_bricks", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_tuff", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_tuff_bricks", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:clay", soundDefinition: "step.gravel", volume: 0.3, pitch: 1 },
        { block: "minecraft:coal_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:coal_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:coarse_dirt", soundDefinition: "step.gravel", volume: 0.3, pitch: 1 },
        { block: "minecraft:cobbled_deepslate", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:cobbled_deepslate_double_slab", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:cobbled_deepslate_slab", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:cobbled_deepslate_stairs", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:cobblestone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cobblestone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cobblestone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:copper_block", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:copper_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:crimson_double_slab", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:crimson_planks", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:crimson_slab", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:crimson_stairs", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:crimson_stem", soundDefinition: "step.stem", volume: 0.14, pitch: 1 },
        { block: "minecraft:crying_obsidian", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_copper_stairs", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_red_sandstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_red_sandstone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_red_sandstone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_sandstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_sandstone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cut_sandstone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cyan_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:cyan_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cyan_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cyan_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cyan_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:cyan_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_oak_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_oak_leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_oak_log", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_oak_planks", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_oak_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_oak_stairs", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_prismarine", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_prismarine_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_prismarine_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dark_prismarine_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dead_brain_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dead_bubble_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dead_fire_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dead_horn_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dead_tube_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_brick_double_slab", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_brick_slab", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_brick_stairs", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_bricks", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_coal_ore", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_copper_ore", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_diamond_ore", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_emerald_ore", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_gold_ore", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_iron_ore", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_lapis_ore", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_redstone_ore", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_tile_double_slab", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_tile_slab", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_tile_stairs", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:deepslate_tiles", soundDefinition: "step.deepslate_bricks", volume: 0.3, pitch: 1 },
        { block: "minecraft:diamond_block", soundDefinition: "fo_step.stone", volume: 0.35, pitch: 1 },
        { block: "minecraft:diamond_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:diorite", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:diorite_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:diorite_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:diorite_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dirt", soundDefinition: "step.gravel", volume: 0.3, pitch: 1 },
        { block: "minecraft:dirt_with_roots", soundDefinition: "step.gravel", volume: 0.3, pitch: 1 },
        { block: "minecraft:double_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:double_stone_block_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:double_stone_block_slab2", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:double_stone_block_slab3", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:double_stone_block_slab4", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:dried_kelp_block", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:dripstone_block", soundDefinition: "step.dripstone_block", volume: 0.17, pitch: 1 },
        { block: "minecraft:emerald_block", soundDefinition: "fo_step.stone", volume: 0.35, pitch: 1 },
        { block: "minecraft:emerald_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:end_brick_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:end_bricks", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:end_stone_brick_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:end_stone_brick_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:exposed_chiseled_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:exposed_cut_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:exposed_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:exposed_cut_copper_stairs", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:exposed_double_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:farmland", soundDefinition: "step.gravel", volume: 0.3, pitch: 1 },
        { block: "minecraft:fire_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:frosted_ice", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:glowstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:gold_block", soundDefinition: "fo_step.stone", volume: 0.35, pitch: 1 },
        { block: "minecraft:gold_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:granite", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:granite_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:granite_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:granite_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:grass_block", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:grass_path", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:gravel", soundDefinition: "step.gravel", volume: 0.3, pitch: 1 },
        { block: "minecraft:gray_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:gray_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:gray_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:gray_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:gray_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:gray_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:green_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:green_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:green_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:green_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:green_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:green_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_black_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_black_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_blue_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_blue_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_brown_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_brown_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_cyan_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_cyan_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_gray_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_gray_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_green_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_green_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_light_blue_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_light_blue_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_light_gray_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_light_gray_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_lime_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_lime_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_magenta_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_magenta_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_orange_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_orange_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_pink_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_pink_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_purple_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_purple_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_red_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_red_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_white_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_white_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_yellow_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hard_yellow_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hardened_clay", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:hay_block", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:honey_block", soundDefinition: "step.honey_block", volume: 0.15, pitch: 1 },
        { block: "minecraft:honeycomb_block", soundDefinition: "step.coral", volume: 0.15, pitch: 1 },
        { block: "minecraft:horn_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:ice", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:iron_block", soundDefinition: "step.iron", volume: 0.2, pitch: 1 },
        { block: "minecraft:iron_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:jungle_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:jungle_leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:jungle_log", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:jungle_planks", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:jungle_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:jungle_stairs", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:lapis_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:lapis_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:leaf_litter", soundDefinition: "block.leaf_litter.step", volume: 0.3, pitch: 1 },
        { block: "minecraft:leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:leaves2", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_blue_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_blue_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_blue_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_blue_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_blue_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_blue_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_gray_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_gray_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_gray_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_gray_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:light_gray_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:lime_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:lime_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:lime_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:lime_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:lime_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:lime_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:lit_deepslate_redstone_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:lit_redstone_lamp", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:lit_redstone_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:magenta_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:magenta_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:magenta_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:magenta_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:magenta_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:magenta_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:magma", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mangrove_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:mangrove_leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:mangrove_log", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:mangrove_planks", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:mangrove_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:mangrove_stairs", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:melon_block", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:moss_block", soundDefinition: "step.moss", volume: 1, pitch: 1 },
        { block: "minecraft:moss_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:mossy_cobblestone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mossy_cobblestone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mossy_cobblestone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mossy_cobblestone_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mossy_stone_brick_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mossy_stone_brick_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mossy_stone_brick_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mossy_stone_bricks", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:mud_brick_double_slab", soundDefinition: "block.mud_bricks.step", volume: 0.05, pitch: 1 },
        { block: "minecraft:mud_brick_slab", soundDefinition: "block.mud_bricks.step", volume: 0.05, pitch: 1 },
        { block: "minecraft:mud_brick_stairs", soundDefinition: "block.mud_bricks.step", volume: 0.05, pitch: 1 },
        { block: "minecraft:mud_bricks", soundDefinition: "block.mud_bricks.step", volume: 0.05, pitch: 1 },
        { block: "minecraft:mushroom_stem", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:mycelium", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:nether_brick_double_slab", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:nether_brick_slab", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:nether_brick_stairs", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:nether_bricks", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:nether_gold_ore", soundDefinition: "step.nether_gold_ore", volume: 0.18, pitch: 1 },
        { block: "minecraft:nether_wart_block", soundDefinition: "step.nether_wart", volume: 0.17, pitch: 1 },
        { block: "minecraft:netherite_block", soundDefinition: "step.netherite", volume: 0.21, pitch: 1 },
        { block: "minecraft:normal_stone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:normal_stone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:normal_stone_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:noteblock", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:oak_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:oak_leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:oak_log", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:oak_planks", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:oak_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:oak_stairs", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:obsidian", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:orange_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:orange_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:orange_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:orange_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:orange_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:orange_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:oxidized_chiseled_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:oxidized_cut_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:oxidized_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:oxidized_cut_copper_stairs", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:oxidized_double_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:packed_ice", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:pale_moss_block", soundDefinition: "step.moss", volume: 1, pitch: 1 },
        { block: "minecraft:pale_moss_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:pale_oak_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:pale_oak_leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:pale_oak_log", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:pale_oak_planks", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:pale_oak_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:pale_oak_stairs", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:petrified_oak_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:petrified_oak_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:pink_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:pink_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:pink_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:pink_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:pink_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:pink_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:podzol", soundDefinition: "step.gravel", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_andesite", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_andesite_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_andesite_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_andesite_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_basalt", soundDefinition: "step.basalt", volume: 0.19, pitch: 1 },
        { block: "minecraft:polished_blackstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_blackstone_brick_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_blackstone_brick_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_blackstone_brick_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_blackstone_bricks", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_blackstone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_blackstone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_blackstone_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_deepslate", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_deepslate_double_slab", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_deepslate_slab", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_deepslate_stairs", soundDefinition: "step.deepslate", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_diorite", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_diorite_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_diorite_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_diorite_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_granite", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_granite_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_granite_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_granite_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_tuff", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_tuff_double_slab", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_tuff_slab", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:polished_tuff_stairs", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:prismarine", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:prismarine_brick_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:prismarine_brick_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:prismarine_bricks", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:prismarine_bricks_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:prismarine_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:prismarine_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:prismarine_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purple_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:purple_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purple_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purple_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purple_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purple_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:purpur_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purpur_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purpur_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purpur_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:quartz", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:quartz_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:quartz_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:quartz_ore", soundDefinition: "step.nether_gold_ore", volume: 0.18, pitch: 1 },
        { block: "minecraft:quartz_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:quartz_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:raw_copper_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:raw_gold_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:raw_iron_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_mushroom_block", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_nether_brick", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:red_nether_brick_double_slab", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:red_nether_brick_slab", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:red_nether_brick_stairs", soundDefinition: "step.nether_brick", volume: 0.16, pitch: 1 },
        { block: "minecraft:red_sand", soundDefinition: "step.sand", volume: 0.15, pitch: 1 },
        { block: "minecraft:red_sandstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_sandstone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_sandstone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_sandstone_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:red_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:redstone_block", soundDefinition: "fo_step.stone", volume: 0.35, pitch: 1 },
        { block: "minecraft:redstone_lamp", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:redstone_ore", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:resin_block", soundDefinition: "block.resin.step", volume: 0.15, pitch: 1 },
        { block: "minecraft:resin_brick_double_slab", soundDefinition: "block.resin_brick.step", volume: 0.15, pitch: 1 },
        { block: "minecraft:resin_brick_slab", soundDefinition: "block.resin_brick.step", volume: 0.15, pitch: 1 },
        { block: "minecraft:resin_brick_stairs", soundDefinition: "block.resin_brick.step", volume: 0.15, pitch: 1 },
        { block: "minecraft:resin_bricks", soundDefinition: "block.resin_brick.step", volume: 0.15, pitch: 1 },
        { block: "minecraft:sand", soundDefinition: "step.sand", volume: 0.15, pitch: 1 },
        { block: "minecraft:sandstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:sandstone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:sandstone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:sandstone_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:sculk", soundDefinition: "step.sculk", volume: 0.17, pitch: 1 },
        { block: "minecraft:sculk_catalyst", soundDefinition: "step.sculk_catalyst", volume: 0.17, pitch: 1 },
        { block: "minecraft:sculk_sensor", soundDefinition: "step.sculk_sensor", volume: 0.17, pitch: 1 },
        { block: "minecraft:sculk_vein", soundDefinition: "step.sculk_vein", volume: 0.17, pitch: 1 },
        { block: "minecraft:silver_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:small_dripleaf_block", soundDefinition: "step.big_dripleaf", volume: 0.17, pitch: 1 },
        { block: "minecraft:smooth_basalt", soundDefinition: "step.basalt", volume: 0.19, pitch: 1 },
        { block: "minecraft:smooth_quartz", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_quartz_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_quartz_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_quartz_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_red_sandstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_red_sandstone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_red_sandstone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_red_sandstone_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_sandstone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_sandstone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_sandstone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_sandstone_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_stone_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:smooth_stone_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:soul_sand", soundDefinition: "step.soul_sand", volume: 0.15, pitch: 1 },
        { block: "minecraft:spruce_double_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:spruce_leaves", soundDefinition: "step.grass", volume: 0.3, pitch: 1 },
        { block: "minecraft:spruce_log", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:spruce_planks", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:spruce_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:spruce_stairs", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stained_hardened_clay", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone_block_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone_block_slab2", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone_block_slab3", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone_block_slab4", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone_brick_double_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone_brick_slab", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone_brick_stairs", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stone_bricks", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:stripped_bamboo_block", soundDefinition: "step.bamboo_wood", volume: 0.2, pitch: 1 },
        { block: "minecraft:suspicious_gravel", soundDefinition: "step.gravel", volume: 0.3, pitch: 1 },
        { block: "minecraft:suspicious_sand", soundDefinition: "step.sand", volume: 0.15, pitch: 1 },
        { block: "minecraft:tinted_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:tube_coral_block", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:tuff", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:tuff_brick_double_slab", soundDefinition: "step.tuff_bricks", volume: 1, pitch: 1 },
        { block: "minecraft:tuff_brick_slab", soundDefinition: "step.tuff_bricks", volume: 1, pitch: 1 },
        { block: "minecraft:tuff_brick_stairs", soundDefinition: "step.tuff_bricks", volume: 1, pitch: 1 },
        { block: "minecraft:tuff_bricks", soundDefinition: "step.tuff_bricks", volume: 1, pitch: 1 },
        { block: "minecraft:tuff_double_slab", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:tuff_slab", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:tuff_stairs", soundDefinition: "step.tuff", volume: 0.3, pitch: 1 },
        { block: "minecraft:warped_double_slab", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:warped_planks", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:warped_slab", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:warped_stairs", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:warped_stem", soundDefinition: "step.stem", volume: 0.14, pitch: 1 },
        { block: "minecraft:warped_wart_block", soundDefinition: "step.nether_wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_chiseled_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_cut_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_cut_copper_stairs", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_double_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_exposed_chiseled_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_exposed_cut_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_exposed_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_exposed_cut_copper_stairs", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_exposed_double_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_oxidized_chiseled_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_oxidized_cut_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_oxidized_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_oxidized_cut_copper_stairs", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_oxidized_double_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_weathered_chiseled_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_weathered_cut_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_weathered_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_weathered_cut_copper_stairs", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_weathered_double_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:weathered_chiseled_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:weathered_cut_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:weathered_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:weathered_cut_copper_stairs", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:weathered_double_cut_copper_slab", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:white_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:white_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:white_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:white_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:white_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:white_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:wooden_slab", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:yellow_carpet", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:yellow_glazed_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:yellow_stained_glass", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:yellow_stained_glass_pane", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:yellow_terracotta", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:yellow_wool", soundDefinition: "step.cloth", volume: 0.3, pitch: 1 },
        { block: "minecraft:netherrack", soundDefinition: "step.netherrack", volume: 0.13, pitch: 1 },
        { block: "minecraft:crimson_nylium", soundDefinition: "step.nylium", volume: 0.15, pitch: 1 },
        { block: "minecraft:warped_nylium", soundDefinition: "step.nylium", volume: 0.15, pitch: 1 },
        { block: "minecraft:bookshelf", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:chiseled_bookshelf", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:crafter", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:crafting_table", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:packed_mud", soundDefinition: "block.packed_mud.step", volume: 0.05, pitch: 1 },
        { block: "minecraft:furnace", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:lit_furnace", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:quartz_pillar", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:quartz_bricks", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:purpur_pillar", soundDefinition: "fo_step.stone", volume: 0.3, pitch: 1 },
        { block: "minecraft:pumpkin", soundDefinition: "step.wood", volume: 0.3, pitch: 1 },
        { block: "minecraft:activator_rail", soundDefinition: "fo_step.stone", volume: 0.35, pitch: 1 },
        { block: "minecraft:detector_rail", soundDefinition: "fo_step.stone", volume: 0.35, pitch: 1 },
        { block: "minecraft:golden_rail", soundDefinition: "fo_step.stone", volume: 0.35, pitch: 1 },
        { block: "minecraft:rail", soundDefinition: "fo_step.stone", volume: 0.35, pitch: 1 },
        { block: "minecraft:scaffolding", soundDefinition: "block.scaffolding.step", volume: 0.3, pitch: 1 },
        { block: "minecraft:sponge", soundDefinition: "step.sponge", volume: 0.3, pitch: 1 },
        { block: "minecraft:wet_sponge", soundDefinition: "step.wet_sponge", volume: 0.2, pitch: 1 },
        { block: "minecraft:exposed_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:oxidized_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_exposed_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_oxidized_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:waxed_weathered_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:weathered_copper", soundDefinition: "step.copper", volume: 0.3, pitch: 1 },
        { block: "minecraft:shroomlight", soundDefinition: "step.shroomlight", volume: 0.17, pitch: 1 },
        { block: "minecraft:water", soundDefinition: "random.swim", volume: 1, pitch: 0.7 }

    ];

    
    function getBlockSoundInfo(blockId) {
        return blockSoundTypes.find(sound => sound.block === blockId) ||
            null;
    };

    
    function distanceBetween(loc1, loc2) {
        const dx = loc1.x - loc2.x;
        const dy = loc1.y - loc2.y;
        const dz = loc1.z - loc2.z;
        return Math.sqrt(dx * dx + dy * dy + dz * dz);
    };

    
    function isBehindPlayer(player, location) {
        const playerLoc = player.location;
        const playerView = player.getViewDirection();

        
        const toLocation = {
            x: location.x - playerLoc.x,
            y: location.y - playerLoc.y,
            z: location.z - playerLoc.z
        };

        
        const length = Math.sqrt(toLocation.x * toLocation.x + toLocation.y * toLocation.y + toLocation.z * toLocation.z);
        if (length === 0) return false;

        const normalized = {
            x: toLocation.x / length,
            y: toLocation.y / length,
            z: toLocation.z / length
        };

        
        const dot = playerView.x * normalized.x + playerView.y * normalized.y + playerView.z * normalized.z;

        
        return dot < 0;
    }

    
    function getPositionAround(center, radius) {
        const angle = Math.random() * Math.PI * 2;
        const distance = radius;
        return {
            x: center.x + Math.cos(angle) * distance,
            y: center.y,
            z: center.z + Math.sin(angle) * distance,
        };
    }

    
    
    function countPlayerGroups(players) {

        if (players.length === 0) return 0;

        const
            groups = [],
            processed = new Set();

        for (const player of players) {
            if (processed.has(player.id)) continue;

            
            const currentGroup = [player];
            processed.add(player.id);

            
            let checkIndex = 0;
            while (checkIndex < currentGroup.length) {
                const checkPlayer = currentGroup[checkIndex];

                for (const otherPlayer of players) {
                    if (!processed.has(otherPlayer.id)) {
                        const distance = Math.sqrt(
                            Math.pow(checkPlayer.location.x - otherPlayer.location.x, 2) +
                            Math.pow(checkPlayer.location.z - otherPlayer.location.z, 2)
                        );

                        if (distance <= 100) {
                            currentGroup.push(otherPlayer);
                            processed.add(otherPlayer.id);
                        }
                    }
                }
                checkIndex++;
            }

            groups.push(currentGroup);
        }

        return groups.length;

    }

    
    function startRecordingFootsteps(player) {
        if (playerFootsteps.has(player.id)) {
            
            return;
        }

        const footsteps = [];
        const dimensionId = world.getDimension(player.dimension.id);
        let recordingInterval = null;
        let playbackTimeout = null;

        
        recordingInterval = system.runInterval(() => {
            const block = dimensionId.getBlock({ x: player.location.x, y: player.location.y - 1, z: player.location.z });
            if (block) {
                footsteps.push({
                    blockId: block.typeId,
                    location: block.location,
                    timestamp: Date.now()
                });

                
                if (footsteps.length > FOOTSTEPS_TO_RECORD) {
                    footsteps.shift();
                }
            }
        }, FOOTSTEP_RECORD_INTERVAL);

        
        playbackTimeout = system.runTimeout(() => {
            
            system.clearRun(recordingInterval);

            if (footsteps.length === 0) {
                playerFootsteps.delete(player.id);
                return;
            }

            
            let stepIndex = 0;

            
            const playbackInterval = system.runInterval(() => {
                if (stepIndex >= footsteps.length) {
                    system.clearRun(playbackInterval);
                    playerFootsteps.delete(player.id);
                    return;
                }

                const step = footsteps[stepIndex];
                const distance = distanceBetween(player.location, step.location);

                
                if (distance >= MIN_DISTANCE_FROM_PLAYER &&
                    isBehindPlayer(player, step.location)) {

                    const soundInfo = getBlockSoundInfo(step.blockId);

                    if (soundInfo !== null) {
                        player.playSound(soundInfo.soundDefinition, {
                            volume: 2, 
                            pitch: soundInfo.pitch,
                            location: step.location
                        });
                    }
                }

                stepIndex++;
            }, FOOTSTEP_PLAYBACK_INTERVAL);

        }, FOOTSTEP_PLAYBACK_DELAY);

        playerFootsteps.set(player.id, {
            recordingInterval,
            playbackTimeout
        });
    }

    
    function playRandomBlockSound(player, radius, volume) {
        if (player.location.y < 40) return; 

        
        const randomPos = getPositionAround(player.location, radius);

        const dimensionId = world.getDimension(player.dimension.id);


        
        const topBlock = dimensionId.getTopmostBlock(randomPos, 260);
        if (!topBlock) return;

        
        const playersNearby = dimensionId.getPlayers({ location: topBlock.location, maxDistance: 10 })
        if (playersNearby.length > 0) return;

        
        const soundInfo = getBlockSoundInfo(topBlock.typeId);
        if (!soundInfo) return;

        
        dimensionId.playSound(soundInfo.soundDefinition, topBlock.location, {
            volume: volume, 
            pitch: soundInfo.pitch
        });
    }

    
    system.runInterval(() => {
        const forebodingScore = fo.forebodingScore;

        
        if (forebodingScore >= FOREBODINGCHECK1 && Math.random() <= (delayedStepsChance * fo.netProbabilityModifier)) {

            const players = world.getAllPlayers();
            if (players.length === 0) return;

            const player = players[Math.floor(Math.random() * players.length)]; 

            
            const velocity = player.getVelocity();
            const isMoving = Math.abs(velocity.x) > 0.1 || Math.abs(velocity.z) > 0.1;

            if (isMoving && !playerFootsteps.has(player.id) && !player.isInWater) {

                
                startRecordingFootsteps(player);

            } else if (!isMoving && playerFootsteps.has(player.id)) {
                
                const data = playerFootsteps.get(player.id);
                system.clearRun(data.recordingInterval);
                system.clearRun(data.playbackTimeout);
                playerFootsteps.delete(player.id);
            }

        }

        
        if (forebodingScore >= FOREBODINGCHECK5 && Math.random() <= (delayedStepsChance * (fo.netProbabilityModifier + 1))) {
            const players = overworld.getPlayers();
            if (players.length === 0) return;

            
            const eligiblePlayers = players.filter(p => p.location.y >= 40);
            if (eligiblePlayers.length === 0) return;

            const playerMultiplayer = countPlayerGroups(players);
            const totalSteps = Math.floor(interval / FOOTSTEP_PLAYBACK_INTERVAL) * playerMultiplayer;
            const volume = 3; 

            let stepDelay = 0;

            
            for (let i = 0; i < totalSteps; i++) {
                stepDelay = stepDelay + FOOTSTEP_PLAYBACK_INTERVAL + Math.floor(Math.random() * 2); 

                system.runTimeout(() => {
                    const player = eligiblePlayers[Math.floor(Math.random() * eligiblePlayers.length)]; 

                    if (player.isValid && player.location.y >= 40) {
                        const radius = 20 + Math.floor(Math.random() * 15);
                        playRandomBlockSound(player, radius, volume);
                        
                    }


                }, stepDelay / playerMultiplayer);
            }

        }

        
        if (forebodingScore <= FOREBODINGCHECK7 && Math.random() <= (delayedStepsChance2 * fo.netProbabilityModifier)) {
            const players = overworld.getPlayers();
            if (players.length === 0) return;

            
            const eligiblePlayers = players.filter(p => p.location.y >= 40);
            if (eligiblePlayers.length === 0) return;

            const playerMultiplayer = countPlayerGroups(players);
            const totalSteps = Math.floor(interval / FOOTSTEP_PLAYBACK_INTERVAL) * playerMultiplayer;
            const volume = 2; 

            let stepDelay = 0;

            
            for (let i = 0; i < totalSteps; i++) {
                stepDelay = stepDelay + FOOTSTEP_PLAYBACK_INTERVAL + Math.floor(Math.random() * 2); 

                system.runTimeout(() => {
                    const player = eligiblePlayers[Math.floor(Math.random() * eligiblePlayers.length)]; 

                    if (player.isValid && player.location.y >= 40) {
                        const radius = 15 + Math.floor(Math.random() * 15);
                        playRandomBlockSound(player, radius, volume);
                        
                    }

                }, stepDelay / playerMultiplayer);
            }

        }


    }, interval); 

}