Remove unused deprecated stuff

This commit is contained in:
Dylan K. Taylor 2025-08-24 23:29:55 +01:00
parent 36211a96c1
commit 1ebd7d3960
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
4 changed files with 2 additions and 40 deletions

View File

@ -32,9 +32,6 @@ use pocketmine\nbt\tag\IntTag;
use pocketmine\nbt\tag\StringTag; use pocketmine\nbt\tag\StringTag;
use pocketmine\utils\Binary; use pocketmine\utils\Binary;
use pocketmine\world\World; use pocketmine\world\World;
use function array_pad;
use function array_slice;
use function explode;
use function implode; use function implode;
use function mb_scrub; use function mb_scrub;
use function sprintf; use function sprintf;
@ -60,14 +57,6 @@ class Sign extends Spawnable{
public const TAG_WAXED = "IsWaxed"; //TAG_Byte public const TAG_WAXED = "IsWaxed"; //TAG_Byte
public const TAG_LOCKED_FOR_EDITING_BY = "LockedForEditingBy"; //TAG_Long 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; protected SignText $text;
private bool $waxed = false; private bool $waxed = false;

View File

@ -102,17 +102,6 @@ class CraftingManager{
/** @phpstan-return ObjectSet<\Closure() : void> */ /** @phpstan-return ObjectSet<\Closure() : void> */
public function getRecipeRegisteredCallbacks() : ObjectSet{ return $this->recipeRegisteredCallbacks; } 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{ private static function hashOutput(Item $output) : string{
$write = new BinaryStream(); $write = new BinaryStream();
$write->putVarInt($output->getStateId()); $write->putVarInt($output->getStateId());

View File

@ -125,24 +125,18 @@ final class Process{
return Thread::getRunningCount() + 1; //pmmpthread doesn't count the main thread return Thread::getRunningCount() + 1; //pmmpthread doesn't count the main thread
} }
/** public static function kill(int $pid) : void{
* @param bool $subprocesses @deprecated
*/
public static function kill(int $pid, bool $subprocesses = false) : void{
$logger = \GlobalLogger::get(); $logger = \GlobalLogger::get();
if($logger instanceof MainLogger){ if($logger instanceof MainLogger){
$logger->syncFlushBuffer(); $logger->syncFlushBuffer();
} }
switch(Utils::getOS()){ switch(Utils::getOS()){
case Utils::OS_WINDOWS: 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; break;
case Utils::OS_MACOS: case Utils::OS_MACOS:
case Utils::OS_LINUX: case Utils::OS_LINUX:
default: default:
if($subprocesses){
$pid = -$pid;
}
if(function_exists("posix_kill")){ if(function_exists("posix_kill")){
posix_kill($pid, 9); //SIGKILL posix_kill($pid, 9); //SIGKILL
}else{ }else{

View File

@ -165,16 +165,6 @@ final class Utils{
return $reflect->getName(); 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 TKey of array-key
* @phpstan-template TValue of object * @phpstan-template TValue of object