1 /* 2 * Copyright (c) 2018-2020 sel-project 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a copy 5 * of this software and associated documentation files (the "Software"), to deal 6 * in the Software without restriction, including without limitation the rights 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 * copies of the Software, and to permit persons to whom the Software is 9 * furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in all 12 * copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 * SOFTWARE. 21 * 22 */ 23 /** 24 * Copyright: Copyright (c) 2018-2020 sel-project 25 * License: MIT 26 * Authors: Kripth 27 * Source: $(HTTP github.com/sel-project/sel-data/sel/data/enchantment.d, sel/data/enchantment.d) 28 */ 29 module sel.data.enchantment; 30 31 private struct Data { 32 33 bool exists; 34 ubyte id; 35 36 alias exists this; 37 38 } 39 40 struct Enchantment { 41 42 string name; 43 Data bedrock, java; 44 ubyte max; 45 ubyte weight; 46 47 } 48 49 enum Enchantments : Enchantment { 50 51 aquaAffinity = Enchantment("aqua_affinity", Data(true, 8), Data(true, 6), 1, 2), 52 baneOfArthropods = Enchantment("bane_of_arthropods", Data(true, 11), Data(true, 18), 5, 5), 53 blastProtection = Enchantment("blast_protection", Data(true, 3), Data(true, 3), 4, 2), 54 channeling = Enchantment("channeling", Data(true, 32), Data(true, 68), 1, 1), 55 curseOfBinding = Enchantment("curse_of_binding", Data(true, 27), Data(true, 10), 1, 1), 56 curseOfVanishing = Enchantment("curse_of_vanishing", Data(true, 28), Data(true, 71), 1, 1), 57 depthStrider = Enchantment("depth_strider", Data(true, 7), Data(true, 8), 3, 2), 58 efficiency = Enchantment("efficiency", Data(true, 15), Data(true, 32), 5, 10), 59 featherFalling = Enchantment("feather_falling", Data(true, 2), Data(true, 2), 4, 5), 60 fireAspect = Enchantment("fire_aspect", Data(true, 13), Data(true, 20), 2, 2), 61 fireProtection = Enchantment("fire_protection", Data(true, 1), Data(true, 1), 4, 5), 62 flame = Enchantment("flame", Data(true, 21), Data(true, 50), 1, 2), 63 fortune = Enchantment("fortune", Data(true, 18), Data(true, 35), 3, 2), 64 frostWalker = Enchantment("frost_walker", Data(true, 25), Data(true, 9), 2, 2), 65 impaling = Enchantment("impaling", Data(true, 29), Data(true, 66), 5, 2), 66 infinity = Enchantment("infinity", Data(true, 22), Data(true, 51), 1, 1), 67 knockback = Enchantment("knockback", Data(true, 12), Data(true, 19), 2, 5), 68 looting = Enchantment("looting", Data(true, 14), Data(true, 21), 3, 2), 69 loyalty = Enchantment("loyalty", Data(true, 31), Data(true, 65), 3, 5), 70 luckOfTheSea = Enchantment("luck_of_the_sea", Data(true, 23), Data(true, 61), 3, 2), 71 lure = Enchantment("lure", Data(true, 24), Data(true, 62), 3, 2), 72 mending = Enchantment("mending", Data(true, 26), Data(true, 70), 1, 2), 73 multishot = Enchantment("multishot", Data(false), Data(false), 1,  ?), 74 piercing = Enchantment("piercing", Data(false), Data(false), 4,  ?), 75 power = Enchantment("power", Data(true, 19), Data(true, 48), 5, 10), 76 projectileProtection = Enchantment("projectile_protection", Data(true, 4), Data(true, 4), 4, 5), 77 protection = Enchantment("protection", Data(true, 0), Data(true, 0), 4, 10), 78 punch = Enchantment("punch", Data(true, 20), Data(true, 49), 2, 2), 79 quickCharge = Enchantment("quick_charge", Data(false), Data(false), 3,  ?), 80 respiration = Enchantment("respiration", Data(true, 6), Data(true, 5), 3, 2), 81 riptide = Enchantment("riptide", Data(true, 30), Data(true, 67), 3, 2), 82 sharpness = Enchantment("sharpness", Data(true, 9), Data(true, 16), 5, 10), 83 silkTouch = Enchantment("silk_touch", Data(true, 16), Data(true, 33), 1, 1), 84 smite = Enchantment("smite", Data(true, 10), Data(true, 17), 5, 5), 85 sweepingEdge = Enchantment("sweeping_edge", Data(false), Data(true, 22), 3, 2), 86 thorns = Enchantment("thorns", Data(true, 5), Data(true, 7), 3, 1), 87 unbreaking = Enchantment("unbreaking", Data(true, 17), Data(true, 34), 3, 5), 88 89 }