diff --git a/src/block/tile/Sign.php b/src/block/tile/Sign.php index 0bb21a6d3..662cf9eab 100644 --- a/src/block/tile/Sign.php +++ b/src/block/tile/Sign.php @@ -32,9 +32,6 @@ use pocketmine\nbt\tag\IntTag; use pocketmine\nbt\tag\StringTag; use pocketmine\utils\Binary; use pocketmine\world\World; -use function array_pad; -use function array_slice; -use function explode; use function implode; use function mb_scrub; use function sprintf; @@ -60,14 +57,6 @@ class Sign extends Spawnable{ public const TAG_WAXED = "IsWaxed"; //TAG_Byte public const TAG_LOCKED_FOR_EDITING_BY = "LockedForEditingBy"; //TAG_Long - /** - * @return string[] - * @deprecated - */ - public static function fixTextBlob(string $blob) : array{ - return array_slice(array_pad(explode("\n", $blob, limit: 5), 4, ""), 0, 4); - } - protected SignText $text; private bool $waxed = false; diff --git a/src/crafting/CraftingManager.php b/src/crafting/CraftingManager.php index 93d6e1838..32188f7e5 100644 --- a/src/crafting/CraftingManager.php +++ b/src/crafting/CraftingManager.php @@ -102,17 +102,6 @@ class CraftingManager{ /** @phpstan-return ObjectSet<\Closure() : void> */ public function getRecipeRegisteredCallbacks() : ObjectSet{ return $this->recipeRegisteredCallbacks; } - /** - * Function used to arrange Shapeless Recipe ingredient lists into a consistent order. - * @deprecated - */ - public static function sort(Item $i1, Item $i2) : int{ - //Use spaceship operator to compare each property, then try the next one if they are equivalent. - ($retval = $i1->getStateId() <=> $i2->getStateId()) === 0 && ($retval = $i1->getCount() <=> $i2->getCount()) === 0; - - return $retval; - } - private static function hashOutput(Item $output) : string{ $write = new BinaryStream(); $write->putVarInt($output->getStateId()); diff --git a/src/utils/Process.php b/src/utils/Process.php index 90149870a..897f60626 100644 --- a/src/utils/Process.php +++ b/src/utils/Process.php @@ -125,24 +125,18 @@ final class Process{ return Thread::getRunningCount() + 1; //pmmpthread doesn't count the main thread } - /** - * @param bool $subprocesses @deprecated - */ - public static function kill(int $pid, bool $subprocesses = false) : void{ + public static function kill(int $pid) : void{ $logger = \GlobalLogger::get(); if($logger instanceof MainLogger){ $logger->syncFlushBuffer(); } switch(Utils::getOS()){ case Utils::OS_WINDOWS: - exec("taskkill.exe /F " . ($subprocesses ? "/T " : "") . "/PID $pid > NUL 2> NUL"); + exec("taskkill.exe /F /PID $pid > NUL 2> NUL"); break; case Utils::OS_MACOS: case Utils::OS_LINUX: default: - if($subprocesses){ - $pid = -$pid; - } if(function_exists("posix_kill")){ posix_kill($pid, 9); //SIGKILL }else{ diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 800bd0183..c132e6636 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -165,16 +165,6 @@ final class Utils{ return $reflect->getName(); } - /** - * @phpstan-return \Closure(object) : object - * @deprecated - */ - public static function cloneCallback() : \Closure{ - return static function(object $o){ - return clone $o; - }; - } - /** * @phpstan-template TKey of array-key * @phpstan-template TValue of object