/* --------------------------------------------------------------- */
/*                         soundmapping.js                         */
/* --------------------------------------------------------------- */
function mapJavaSoundToLCE(soundName) {
  const soundMap = {
    "mob.chicken.say": 0,
    "mob.chicken": 0,
    "entity.chicken.ambient": 0,
    "entity.chicken.step": 0,
    "mob.chicken.hurt": 1,
    "entity.chicken.hurt": 1,
    "mob.chicken.plop": 2,
    "mob.cow.say": 3,
    "mob.cow": 3,
    "mob.cow.hurt": 4,
    "mob.pig.say": 5,
    "mob.pig": 5,
    "mob.pig.death": 6,
    "mob.sheep.say": 7,
    "mob.sheep": 7,
    "mob.sheep.death": 7,
    "mob.wolf.growl": 8,
    "mob.wolf.whine": 9,
    "mob.wolf.panting": 10,
    "mob.wolf.bark": 11,
    "mob.wolf.hurt": 12,
    "mob.wolf.death": 13,
    "mob.wolf.shake": 14,
    "mob.blaze.breathe": 15,
    "mob.blaze.hit": 16,
    "mob.blaze.death": 17,
    "mob.ghast.moan": 18,
    "mob.ghast.scream": 19,
    "mob.ghast.death": 20,
    "mob.ghast.fireball": 21,
    "mob.ghast.charge": 22,
    "mob.endermen.idle": 23,
    "mob.endermen.hit": 24,
    "mob.endermen.death": 25,
    "mob.endermen.portal": 26,
    "mob.zombiepig.zpig": 27,
    "mob.zombiepig.zpighurt": 28,
    "mob.zombiepig.zpigdeath": 29,
    "mob.zombiepig.zpigangry": 30,
    "mob.silverfish.say": 31,
    "mob.silverfish.hit": 32,
    "mob.silverfish.kill": 33,
    "mob.silverfish.step": 34,
    "mob.skeleton.say": 35,
    "mob.skeleton": 35,
    "mob.skeleton.hurt": 36,
    "mob.spider.say": 37,
    "mob.spider.death": 38,
    "mob.slime.small": 39,
    "mob.slime.attack": 40,
    "mob.creeper.say": 41,
    "mob.creeper.death": 42,
    "mob.zombie.say": 43,
    "mob.zombie.hurt": 44,
    "mob.zombie.death": 45,
    "mob.zombie.wood": 46,
    "mob.zombie.woodbreak": 47,
    "mob.zombie.metal": 48,
    "mob.magmacube.big": 49,
    "mob.magmacube.small": 50,
    "mob.cat.purr": 51,
    "mob.cat.purreow": 52,
    "mob.cat.meow": 52,
    "mob.cat.hiss": 53,
    "random.bow": 55,
    "random.bowhit": 56,
    "random.explode": 57,
    "random.fizz": 58,
    "random.pop": 59,
    "entity.item.pickup": 59,
    "item.pickup": 59,
    "random.fuse": 60,
    "random.drink": 61,
    "random.eat": 62,
    "random.burp": 63,
    "random.splash": 64,
    "random.click": 65,
    "dig.glass": 66,
    "random.orb": 67,
    "random.break": 68,
    "random.chestopen": 69,
    "random.chestclosed": 70,
    "random.door_open": 71,
    "random.door_close": 72,
    "ambient.weather.rain": 73,
    "ambient.weather.thunder": 74,
    "ambient.cave.cave": 75,
    "portal.portal": 77,
    "portal.trigger": 78,
    "portal.travel": 79,
    "fire.ignite": 80,
    "fire.fire": 81,
    "damage.hit": 82,
    "game.player.hurt": 83,
    "game.player.hurt.fall.small": 83,
    "game.player.hurt.fall.big": 84,
    "game.hostile.hurt.fall.small": 83,
    "game.hostile.hurt.fall.big": 84,
    "game.neutral.hurt.fall.small": 83,
    "game.neutral.hurt.fall.big": 84,
    "damage.fallsmall": 83,
    "damage.fallbig": 84,
    "note.harp": 85,
    "note.bd": 86,
    "note.snare": 87,
    "note.hat": 88,
    "note.bassattack": 89,
    "note.bass": 89,
    "note.pling": 85,
    "tile.piston.in": 90,
    "tile.piston.out": 91,
    "liquid.water": 92,
    "liquid.lavapop": 93,
    "liquid.lava": 94,
    "step.stone": 95,
    "step.wood": 96,
    "step.gravel": 97,
    "step.grass": 98,
    "step.metal": 99,
    "step.cloth": 100,
    "step.sand": 101,
    "mob.enderdragon.end": 102,
    "mob.enderdragon.growl": 103,
    "mob.enderdragon.hit": 104,
    "mob.enderdragon.wings": 105,
    "mob.irongolem.throw": 106,
    "mob.irongolem.hit": 107,
    "mob.irongolem.death": 108,
    "mob.irongolem.walk": 109,
    "damage.thorns": 109,
    "random.anvil_break": 110,
    "random.anvil_land": 111,
    "random.anvil_use": 112,
    "mob.villager.haggle": 113,
    "mob.villager.idle": 114,
    "mob.villager.hit": 115,
    "mob.villager.death": 116,
    "mob.villager.yes": 117,
    "mob.villager.no": 118,
    "mob.zombie.infect": 120,
    "mob.zombie.unfect": 121,
    "mob.zombie.remedy": 122,
    "step.snow": 123,
    "step.ladder": 124,
    "dig.cloth": 124,
    "dig.grass": 125,
    "dig.gravel": 126,
    "dig.sand": 127,
    "dig.snow": 128,
    "dig.stone": 129,
    "dig.wood": 130,
    "fireworks.launch": 132,
    "fireworks.blast": 133,
    "fireworks.blast_far": 134,
    "fireworks.largeBlast": 135,
    "fireworks.largeBlast_far": 136,
    "fireworks.twinkle": 137,
    "fireworks.twinkle_far": 138,
    "mob.bat.idle": 139,
    "mob.bat.hurt": 140,
    "mob.bat.death": 141,
    "mob.bat.takeoff": 142,
    "mob.wither.spawn": 142,
    "mob.wither.idle": 143,
    "mob.wither.hurt": 144,
    "mob.wither.death": 145,
    "mob.wither.shoot": 146,
    "mob.cow.step": 148,
    "step.cow": 148,
    "mob.chicken.step": 149,
    "step.chicken": 149,
    "mob.pig.step": 150,
    "step.pig": 150,
    "mob.endermen.stare": 151,
    "mob.endermen.scream": 152,
    "mob.sheep.shear": 153,
    "mob.sheep.step": 154,
    "mob.skeleton.death": 155,
    "mob.skeletondeath": 155,
    "mob.skeleton.step": 156,
    "mob.spider.step": 157,
    "mob.wolf.step": 158,
    "mob.zombie.step": 159,
    "liquid.swim": 160,
    "game.player.swim": 159,
    "game.player.swim.splash": 64,
    "game.hostile.swim.splash": 64,
    "game.neutral.swim.splash": 64,
    "game.neutral.swim": 159,
    "game.hostile.swim": 159,
    "mob.horse.land": 161,
    "mob.horse.armor": 162,
    "mob.horse.leather": 163,
    "mob.horse.zombie.death": 164,
    "mob.horse.skeleton.death": 165,
    "mob.horse.donkey.death": 166,
    "mob.horse.death": 167,
    "mob.horse.zombie.hit": 168,
    "mob.horse.skeleton.hit": 169,
    "mob.horse.donkey.hit": 170,
    "mob.horse.hit": 171,
    "mob.horse.zombie.idle": 172,
    "mob.horse.skeleton.idle": 173,
    "mob.horse.donkey.idle": 174,
    "mob.horse.idle": 175,
    "mob.horse.donkey.angry": 176,
    "mob.horse.angry": 177,
    "mob.horse.gallop": 178,
    "mob.horse.breathe": 179,
    "mob.horse.wood": 180,
    "mob.horse.soft": 181,
    "mob.horse.jump": 182,
    "mob.witch.idle": 183,
    "mob.witch.hurt": 184,
    "mob.witch.death": 185,
    "mob.slime.big": 186,
    "mob.slime": 187,
    eat: 187,
    "random.levelup": 188,
    "fire.active": 189,
  };

  const result = soundMap[soundName];
  return result !== undefined ? result : -1;
}

module.exports = { mapJavaSoundToLCE };
/* --------------------------------------------------------------- */
