PocketMine-MP 5.16.1 git-585aee9386a787c95e73dd0a05ffca8329606b68
EnchantmentIdMap.php
1<?php
2
3/*
4 *
5 * ____ _ _ __ __ _ __ __ ____
6 * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
7 * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
8 * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
9 * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
10 *
11 * This program is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * @author PocketMine Team
17 * @link http://www.pocketmine.net/
18 *
19 *
20 */
21
22declare(strict_types=1);
23
24namespace pocketmine\data\bedrock;
25
28use pocketmine\utils\SingletonTrait;
29
33final class EnchantmentIdMap{
34 use SingletonTrait;
36 use IntSaveIdMapTrait;
37
38 private function __construct(){
39 $this->register(EnchantmentIds::PROTECTION, VanillaEnchantments::PROTECTION());
40 $this->register(EnchantmentIds::FIRE_PROTECTION, VanillaEnchantments::FIRE_PROTECTION());
41 $this->register(EnchantmentIds::FEATHER_FALLING, VanillaEnchantments::FEATHER_FALLING());
42 $this->register(EnchantmentIds::BLAST_PROTECTION, VanillaEnchantments::BLAST_PROTECTION());
43 $this->register(EnchantmentIds::PROJECTILE_PROTECTION, VanillaEnchantments::PROJECTILE_PROTECTION());
44 $this->register(EnchantmentIds::THORNS, VanillaEnchantments::THORNS());
45 $this->register(EnchantmentIds::RESPIRATION, VanillaEnchantments::RESPIRATION());
46
47 $this->register(EnchantmentIds::SHARPNESS, VanillaEnchantments::SHARPNESS());
48 //TODO: smite, bane of arthropods (these don't make sense now because their applicable mobs don't exist yet)
49
50 $this->register(EnchantmentIds::KNOCKBACK, VanillaEnchantments::KNOCKBACK());
51 $this->register(EnchantmentIds::FIRE_ASPECT, VanillaEnchantments::FIRE_ASPECT());
52
53 $this->register(EnchantmentIds::EFFICIENCY, VanillaEnchantments::EFFICIENCY());
54 $this->register(EnchantmentIds::FORTUNE, VanillaEnchantments::FORTUNE());
55 $this->register(EnchantmentIds::SILK_TOUCH, VanillaEnchantments::SILK_TOUCH());
56 $this->register(EnchantmentIds::UNBREAKING, VanillaEnchantments::UNBREAKING());
57
58 $this->register(EnchantmentIds::POWER, VanillaEnchantments::POWER());
59 $this->register(EnchantmentIds::PUNCH, VanillaEnchantments::PUNCH());
60 $this->register(EnchantmentIds::FLAME, VanillaEnchantments::FLAME());
61 $this->register(EnchantmentIds::INFINITY, VanillaEnchantments::INFINITY());
62
63 $this->register(EnchantmentIds::MENDING, VanillaEnchantments::MENDING());
64
65 $this->register(EnchantmentIds::VANISHING, VanillaEnchantments::VANISHING());
66
67 $this->register(EnchantmentIds::SWIFT_SNEAK, VanillaEnchantments::SWIFT_SNEAK());
68 }
69}