Implemented strong slowness potion (#5888)

This commit is contained in:
ace
2023-07-13 20:22:01 +08:00
committed by GitHub
parent 0d8a06732a
commit 7132ac0ad3
6 changed files with 30 additions and 20 deletions

View File

@@ -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)
])
);
}

View File

@@ -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()));