forked from phildier/dat_converter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass.Enchantments.php
45 lines (42 loc) · 978 Bytes
/
class.Enchantments.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
class Enchantments
{
private static $map = array(
"0" => "PROTECTION_ENVIRONMENTAL",
"1" => "PROTECTION_FIRE",
"2" => "PROTECTION_FALL",
"3" => "PROTECTION_EXPLOSIONS",
"4" => "PROTECTION_PROJECTILE",
"5" => "OXYGEN",
"6" => "WATER_WORKER",
"7" => "THORNS",
"8" => "DEPTH_STRIDER",
"9" => "FROST_WALKER",
"16" => "DAMAGE_ALL",
"17" => "DAMAGE_UNDEAD",
"18" => "DAMAGE_ARTHROPODS",
"19" => "KNOCKBACK",
"20" => "FIRE_ASPECT",
"21" => "LOOT_BONUS_MOBS",
"32" => "DIG_SPEED",
"33" => "SILK_TOUCH",
"34" => "DURABILITY",
"35" => "LOOT_BONUS_BLOCKS",
"48" => "ARROW_DAMAGE",
"49" => "ARROW_KNOCKBACK",
"50" => "ARROW_FIRE",
"51" => "ARROW_INFINITE",
"61" => "LUCK",
"62" => "LURE",
"70" => "MENDING",
);
public static function getName($id)
{
return (self::$map[$id]?:null);
}
public static function getID($name)
{
$flip = array_flip(self::$map);
return ($flip[$id]?:null);
}
}