PocketMine-MP 5.28.3 git-a4ac28592c6c5f5876927aa2a140b65dad63d786
Loading...
Searching...
No Matches
PotionTypeIdMap.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
27use pocketmine\utils\SingletonTrait;
28
29final class PotionTypeIdMap{
30 use SingletonTrait;
32 use IntSaveIdMapTrait;
33
34 private function __construct(){
35 foreach(PotionType::cases() as $case){
36 $this->register(match($case){
37 PotionType::WATER => PotionTypeIds::WATER,
38 PotionType::MUNDANE => PotionTypeIds::MUNDANE,
39 PotionType::LONG_MUNDANE => PotionTypeIds::LONG_MUNDANE,
40 PotionType::THICK => PotionTypeIds::THICK,
41 PotionType::AWKWARD => PotionTypeIds::AWKWARD,
42 PotionType::NIGHT_VISION => PotionTypeIds::NIGHT_VISION,
43 PotionType::LONG_NIGHT_VISION => PotionTypeIds::LONG_NIGHT_VISION,
44 PotionType::INVISIBILITY => PotionTypeIds::INVISIBILITY,
45 PotionType::LONG_INVISIBILITY => PotionTypeIds::LONG_INVISIBILITY,
46 PotionType::LEAPING => PotionTypeIds::LEAPING,
47 PotionType::LONG_LEAPING => PotionTypeIds::LONG_LEAPING,
48 PotionType::STRONG_LEAPING => PotionTypeIds::STRONG_LEAPING,
49 PotionType::FIRE_RESISTANCE => PotionTypeIds::FIRE_RESISTANCE,
50 PotionType::LONG_FIRE_RESISTANCE => PotionTypeIds::LONG_FIRE_RESISTANCE,
51 PotionType::SWIFTNESS => PotionTypeIds::SWIFTNESS,
52 PotionType::LONG_SWIFTNESS => PotionTypeIds::LONG_SWIFTNESS,
53 PotionType::STRONG_SWIFTNESS => PotionTypeIds::STRONG_SWIFTNESS,
54 PotionType::SLOWNESS => PotionTypeIds::SLOWNESS,
55 PotionType::LONG_SLOWNESS => PotionTypeIds::LONG_SLOWNESS,
56 PotionType::WATER_BREATHING => PotionTypeIds::WATER_BREATHING,
57 PotionType::LONG_WATER_BREATHING => PotionTypeIds::LONG_WATER_BREATHING,
58 PotionType::HEALING => PotionTypeIds::HEALING,
59 PotionType::STRONG_HEALING => PotionTypeIds::STRONG_HEALING,
60 PotionType::HARMING => PotionTypeIds::HARMING,
61 PotionType::STRONG_HARMING => PotionTypeIds::STRONG_HARMING,
62 PotionType::POISON => PotionTypeIds::POISON,
63 PotionType::LONG_POISON => PotionTypeIds::LONG_POISON,
64 PotionType::STRONG_POISON => PotionTypeIds::STRONG_POISON,
65 PotionType::REGENERATION => PotionTypeIds::REGENERATION,
66 PotionType::LONG_REGENERATION => PotionTypeIds::LONG_REGENERATION,
67 PotionType::STRONG_REGENERATION => PotionTypeIds::STRONG_REGENERATION,
68 PotionType::STRENGTH => PotionTypeIds::STRENGTH,
69 PotionType::LONG_STRENGTH => PotionTypeIds::LONG_STRENGTH,
70 PotionType::STRONG_STRENGTH => PotionTypeIds::STRONG_STRENGTH,
71 PotionType::WEAKNESS => PotionTypeIds::WEAKNESS,
72 PotionType::LONG_WEAKNESS => PotionTypeIds::LONG_WEAKNESS,
73 PotionType::WITHER => PotionTypeIds::WITHER,
74 PotionType::TURTLE_MASTER => PotionTypeIds::TURTLE_MASTER,
75 PotionType::LONG_TURTLE_MASTER => PotionTypeIds::LONG_TURTLE_MASTER,
76 PotionType::STRONG_TURTLE_MASTER => PotionTypeIds::STRONG_TURTLE_MASTER,
77 PotionType::SLOW_FALLING => PotionTypeIds::SLOW_FALLING,
78 PotionType::LONG_SLOW_FALLING => PotionTypeIds::LONG_SLOW_FALLING,
79 PotionType::STRONG_SLOWNESS => PotionTypeIds::STRONG_SLOWNESS,
80 }, $case);
81 }
82 }
83}