Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- 0 protection
- 1 fire_protection
- 2 feather_falling
- 3 blast_protection
- 4 projectile_protection
- 5 respiration
- 6 aqua_affinity
- 7 thorns
- 8 depth_strider
- 9 frost_walker
- 16 sharpness
- 17 smite
- 18 bane_of_arthropods
- 19 knockback
- 20 fire_aspect
- 21 looting
- 32 efficiency
- 33 silk_touch
- 34 unbreaking
- 35 fortune
- 48 power
- 49 punch
- 50 flame
- 51 infinity
- 61 luck_of_the_sea
- 62 lure
- 70 mending
- --]]
- local _enchantment = {
- {id="protection", num= 0},
- {id="fire_protection", num= 1},
- {id="feather_falling", num= 2},
- {id="blast_protection", num= 3},
- {id="projectile_protection", num= 4},
- {id="respiration", num= 5},
- {id="aqua_affinity", num= 6},
- {id="thorns", num= 7},
- {id="depth_strider", num= 8},
- {id="frost_walker", num= 9},
- {id="sharpness", num=16},
- {id="smite", num=17},
- {id="bane_of_arthropods", num=18},
- {id="knockback", num=19},
- {id="fire_aspect", num=20},
- {id="looting", num=21},
- {id="efficiency", num=32},
- {id="silk_touch", num=33},
- {id="unbreaking", num=34},
- {id="fortune", num=35},
- {id="power", num=48},
- {id="punch", num=49},
- {id="flame", num=50},
- {id="infinity", num=51},
- {id="luck_of_the_sea", num=61},
- {id="lure", num=62},
- {id="mending", num=70},
- }
- local _enchantmentByID = {
- ["protection"]= 0,
- ["fire_protection"]= 1,
- ["feather_falling"]= 2,
- ["blast_protection"]= 3,
- ["projectile_protection"]= 4,
- ["respiration"]= 5,
- ["aqua_affinity"]= 6,
- ["thorns"]= 7,
- ["depth_strider"]= 8,
- ["frost_walker"]= 9,
- ["sharpness"]= 16,
- ["smite"]= 17,
- ["bane_of_arthropods"]= 18,
- ["knockback"]= 19,
- ["fire_aspect"]= 20,
- ["looting"]= 21,
- ["efficiency"]= 32,
- ["silk_touch"]= 33,
- ["unbreaking"]= 34,
- ["fortune"]= 35,
- ["power"]= 48,
- ["punch"]= 49,
- ["flame"]= 50,
- ["infinity"]= 51,
- ["luck_of_the_sea"]= 61,
- ["lure"]= 62,
- ["mending"]= 70,
- }
- local _enchantmentByNum = {
- [0] ="protection",
- [1] ="fire_protection",
- [2] ="feather_falling",
- [3] ="blast_protection",
- [4] ="projectile_protection",
- [5] ="respiration",
- [6] ="aqua_affinity",
- [7] ="thorns",
- [8] ="depth_strider",
- [9] ="frost_walker",
- [16]="sharpness",
- [17]="smite",
- [18]="bane_of_arthropods",
- [19]="knockback",
- [20]="fire_aspect",
- [21]="looting",
- [32]="efficiency",
- [33]="silk_touch",
- [34]="unbreaking",
- [35]="fortune",
- [48]="power",
- [49]="punch",
- [50]="flame",
- [51]="infinity",
- [61]="luck_of_the_sea",
- [62]="lure",
- [70]="mending",
- }
- function getEnchantementList()
- return _enchantment
- end
- function getEnchantementNum(id)
- if type(_enchantmentByID[id])=="nil" then
- error(string.format([[Enchantment ID "%s" does not exists]],tostring(id)),2)
- return false
- end
- return _enchantmentByID[id]
- end
- function getEnchantementID(num)
- if type(_enchantmentByNum[num])=="nil" then
- error(string.format([[Enchantment number "%s" does not exists]],tostring(num)),2)
- return false
- end
- return _enchantmentByNum[num]
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement