diff --git a/src/data/bedrock/PotionTypeIdMap.php b/src/data/bedrock/PotionTypeIdMap.php index 2e6fef3cc..8194f24a2 100644 --- a/src/data/bedrock/PotionTypeIdMap.php +++ b/src/data/bedrock/PotionTypeIdMap.php @@ -84,6 +84,7 @@ final class PotionTypeIdMap{ $this->register(PotionTypeIds::STRONG_TURTLE_MASTER, PotionType::STRONG_TURTLE_MASTER()); $this->register(PotionTypeIds::SLOW_FALLING, PotionType::SLOW_FALLING()); $this->register(PotionTypeIds::LONG_SLOW_FALLING, PotionType::LONG_SLOW_FALLING()); + $this->register(PotionTypeIds::STRONG_SLOWNESS, PotionType::STRONG_SLOWNESS()); } private function register(int $id, PotionType $type) : void{ diff --git a/src/data/bedrock/PotionTypeIds.php b/src/data/bedrock/PotionTypeIds.php index aa69461ce..f2d82f39f 100644 --- a/src/data/bedrock/PotionTypeIds.php +++ b/src/data/bedrock/PotionTypeIds.php @@ -66,4 +66,5 @@ final class PotionTypeIds{ public const STRONG_TURTLE_MASTER = 39; public const SLOW_FALLING = 40; public const LONG_SLOW_FALLING = 41; + public const STRONG_SLOWNESS = 42; } diff --git a/src/data/runtime/RuntimeEnumDeserializerTrait.php b/src/data/runtime/RuntimeEnumDeserializerTrait.php index c4864a7e7..4774304a9 100644 --- a/src/data/runtime/RuntimeEnumDeserializerTrait.php +++ b/src/data/runtime/RuntimeEnumDeserializerTrait.php @@ -190,16 +190,17 @@ trait RuntimeEnumDeserializerTrait{ 29 => \pocketmine\item\PotionType::STRONG_LEAPING(), 30 => \pocketmine\item\PotionType::STRONG_POISON(), 31 => \pocketmine\item\PotionType::STRONG_REGENERATION(), - 32 => \pocketmine\item\PotionType::STRONG_STRENGTH(), - 33 => \pocketmine\item\PotionType::STRONG_SWIFTNESS(), - 34 => \pocketmine\item\PotionType::STRONG_TURTLE_MASTER(), - 35 => \pocketmine\item\PotionType::SWIFTNESS(), - 36 => \pocketmine\item\PotionType::THICK(), - 37 => \pocketmine\item\PotionType::TURTLE_MASTER(), - 38 => \pocketmine\item\PotionType::WATER(), - 39 => \pocketmine\item\PotionType::WATER_BREATHING(), - 40 => \pocketmine\item\PotionType::WEAKNESS(), - 41 => \pocketmine\item\PotionType::WITHER(), + 32 => \pocketmine\item\PotionType::STRONG_SLOWNESS(), + 33 => \pocketmine\item\PotionType::STRONG_STRENGTH(), + 34 => \pocketmine\item\PotionType::STRONG_SWIFTNESS(), + 35 => \pocketmine\item\PotionType::STRONG_TURTLE_MASTER(), + 36 => \pocketmine\item\PotionType::SWIFTNESS(), + 37 => \pocketmine\item\PotionType::THICK(), + 38 => \pocketmine\item\PotionType::TURTLE_MASTER(), + 39 => \pocketmine\item\PotionType::WATER(), + 40 => \pocketmine\item\PotionType::WATER_BREATHING(), + 41 => \pocketmine\item\PotionType::WEAKNESS(), + 42 => \pocketmine\item\PotionType::WITHER(), default => throw new InvalidSerializedRuntimeDataException("Invalid serialized value for PotionType") }; } diff --git a/src/data/runtime/RuntimeEnumSerializerTrait.php b/src/data/runtime/RuntimeEnumSerializerTrait.php index fd65ffb42..c570046c6 100644 --- a/src/data/runtime/RuntimeEnumSerializerTrait.php +++ b/src/data/runtime/RuntimeEnumSerializerTrait.php @@ -190,16 +190,17 @@ trait RuntimeEnumSerializerTrait{ \pocketmine\item\PotionType::STRONG_LEAPING() => 29, \pocketmine\item\PotionType::STRONG_POISON() => 30, \pocketmine\item\PotionType::STRONG_REGENERATION() => 31, - \pocketmine\item\PotionType::STRONG_STRENGTH() => 32, - \pocketmine\item\PotionType::STRONG_SWIFTNESS() => 33, - \pocketmine\item\PotionType::STRONG_TURTLE_MASTER() => 34, - \pocketmine\item\PotionType::SWIFTNESS() => 35, - \pocketmine\item\PotionType::THICK() => 36, - \pocketmine\item\PotionType::TURTLE_MASTER() => 37, - \pocketmine\item\PotionType::WATER() => 38, - \pocketmine\item\PotionType::WATER_BREATHING() => 39, - \pocketmine\item\PotionType::WEAKNESS() => 40, - \pocketmine\item\PotionType::WITHER() => 41, + \pocketmine\item\PotionType::STRONG_SLOWNESS() => 32, + \pocketmine\item\PotionType::STRONG_STRENGTH() => 33, + \pocketmine\item\PotionType::STRONG_SWIFTNESS() => 34, + \pocketmine\item\PotionType::STRONG_TURTLE_MASTER() => 35, + \pocketmine\item\PotionType::SWIFTNESS() => 36, + \pocketmine\item\PotionType::THICK() => 37, + \pocketmine\item\PotionType::TURTLE_MASTER() => 38, + \pocketmine\item\PotionType::WATER() => 39, + \pocketmine\item\PotionType::WATER_BREATHING() => 40, + \pocketmine\item\PotionType::WEAKNESS() => 41, + \pocketmine\item\PotionType::WITHER() => 42, default => throw new \pocketmine\utils\AssumptionFailedError("All PotionType cases should be covered") }); } diff --git a/src/item/PotionType.php b/src/item/PotionType.php index 7ec0f3876..e7feb0b8e 100644 --- a/src/item/PotionType.php +++ b/src/item/PotionType.php @@ -65,6 +65,7 @@ use pocketmine\utils\EnumTrait; * @method static PotionType STRONG_LEAPING() * @method static PotionType STRONG_POISON() * @method static PotionType STRONG_REGENERATION() + * @method static PotionType STRONG_SLOWNESS() * @method static PotionType STRONG_STRENGTH() * @method static PotionType STRONG_SWIFTNESS() * @method static PotionType STRONG_TURTLE_MASTER() @@ -201,6 +202,9 @@ final class PotionType{ ]), new self("long_slow_falling", "Long Slow Falling", fn() => [ //TODO + ]), + new self("strong_slowness", "Strong Slowness", fn() => [ + new EffectInstance(VanillaEffects::SLOWNESS(), 20 * 20, 3) ]) ); } diff --git a/src/item/StringToItemParser.php b/src/item/StringToItemParser.php index 46b37e3ae..e5e5252e1 100644 --- a/src/item/StringToItemParser.php +++ b/src/item/StringToItemParser.php @@ -1506,6 +1506,8 @@ final class StringToItemParser extends StringToTParser{ $result->register("strong_poison_splash_potion", fn() => Items::SPLASH_POTION()->setType(PotionType::STRONG_POISON())); $result->register("strong_regeneration_potion", fn() => Items::POTION()->setType(PotionType::STRONG_REGENERATION())); $result->register("strong_regeneration_splash_potion", fn() => Items::SPLASH_POTION()->setType(PotionType::STRONG_REGENERATION())); + $result->register("strong_slowness_potion", fn() => Items::POTION()->setType(PotionType::STRONG_SLOWNESS())); + $result->register("strong_slowness_splash_potion", fn() => Items::SPLASH_POTION()->setType(PotionType::STRONG_SLOWNESS())); $result->register("strong_strength_potion", fn() => Items::POTION()->setType(PotionType::STRONG_STRENGTH())); $result->register("strong_strength_splash_potion", fn() => Items::SPLASH_POTION()->setType(PotionType::STRONG_STRENGTH())); $result->register("strong_swiftness_potion", fn() => Items::POTION()->setType(PotionType::STRONG_SWIFTNESS()));