mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
phpdoc armageddon for master, pass 1
This commit is contained in:
@@ -79,16 +79,10 @@ class BannerPattern{
|
||||
$this->color = $color;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getId() : string{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DyeColor
|
||||
*/
|
||||
public function getColor() : DyeColor{
|
||||
return $this->color;
|
||||
}
|
||||
|
@@ -32,9 +32,6 @@ final class BlockDataSerializer{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $raw
|
||||
*
|
||||
* @return int
|
||||
* @throws InvalidBlockStateException
|
||||
*/
|
||||
public static function readFacing(int $raw) : int{
|
||||
@@ -68,9 +65,6 @@ final class BlockDataSerializer{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $facing
|
||||
*
|
||||
* @return int
|
||||
* @throws InvalidBlockStateException
|
||||
*/
|
||||
public static function readHorizontalFacing(int $facing) : int{
|
||||
@@ -89,9 +83,6 @@ final class BlockDataSerializer{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $raw
|
||||
*
|
||||
* @return int
|
||||
* @throws InvalidBlockStateException
|
||||
*/
|
||||
public static function readLegacyHorizontalFacing(int $raw) : int{
|
||||
@@ -121,9 +112,6 @@ final class BlockDataSerializer{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $value
|
||||
*
|
||||
* @return int
|
||||
* @throws InvalidBlockStateException
|
||||
*/
|
||||
public static function read5MinusHorizontalFacing(int $value) : int{
|
||||
|
@@ -87,10 +87,8 @@ final class DyeColor{
|
||||
* Returns a DyeColor object matching the given magic number
|
||||
* @internal
|
||||
*
|
||||
* @param int $magicNumber
|
||||
* @param bool $inverted Invert the ID before using it (useful for actual dye magic IDs)
|
||||
*
|
||||
* @return DyeColor
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function fromMagicNumber(int $magicNumber, bool $inverted = false) : DyeColor{
|
||||
@@ -116,30 +114,18 @@ final class DyeColor{
|
||||
$this->rgbValue = $rgbValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDisplayName() : string{
|
||||
return $this->displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Color
|
||||
*/
|
||||
public function getRgbValue() : Color{
|
||||
return $this->rgbValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMagicNumber() : int{
|
||||
return $this->magicNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getInvertedMagicNumber() : int{
|
||||
return ~$this->magicNumber & 0xf;
|
||||
}
|
||||
|
@@ -31,8 +31,6 @@ interface Fallable{
|
||||
* Called every tick by FallingBlock to update the falling state of this block. Used by concrete to check when it
|
||||
* hits water.
|
||||
* Return null if you don't want to change the usual behaviour.
|
||||
*
|
||||
* @return Block|null
|
||||
*/
|
||||
public function tickFalling() : ?Block;
|
||||
}
|
||||
|
@@ -41,7 +41,6 @@ trait PillarRotationTrait{
|
||||
|
||||
/**
|
||||
* @see Block::writeStateToMeta()
|
||||
* @return int
|
||||
*/
|
||||
protected function writeStateToMeta() : int{
|
||||
return $this->writeAxisToMeta();
|
||||
@@ -49,9 +48,6 @@ trait PillarRotationTrait{
|
||||
|
||||
/**
|
||||
* @see Block::readStateFromData()
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $stateMeta
|
||||
*/
|
||||
public function readStateFromData(int $id, int $stateMeta) : void{
|
||||
$this->readAxisFromMeta($stateMeta);
|
||||
@@ -59,7 +55,6 @@ trait PillarRotationTrait{
|
||||
|
||||
/**
|
||||
* @see Block::getStateBitmask()
|
||||
* @return int
|
||||
*/
|
||||
public function getStateBitmask() : int{
|
||||
return 0b11 << $this->getAxisMetaShift();
|
||||
@@ -89,16 +84,6 @@ trait PillarRotationTrait{
|
||||
|
||||
/**
|
||||
* @see Block::place()
|
||||
*
|
||||
* @param BlockTransaction $tx
|
||||
* @param Item $item
|
||||
* @param Block $blockReplace
|
||||
* @param Block $blockClicked
|
||||
* @param int $face
|
||||
* @param Vector3 $clickVector
|
||||
* @param Player|null $player
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
|
||||
$this->axis = Facing::axis($face);
|
||||
|
@@ -50,9 +50,6 @@ class SignText{
|
||||
* Parses sign lines from the given string blob.
|
||||
* TODO: add a strict mode for this
|
||||
*
|
||||
* @param string $blob
|
||||
*
|
||||
* @return SignText
|
||||
* @throws \InvalidArgumentException if the text is not valid UTF-8
|
||||
*/
|
||||
public static function fromBlob(string $blob) : SignText{
|
||||
@@ -101,9 +98,6 @@ class SignText{
|
||||
/**
|
||||
* Returns the sign line at the given offset.
|
||||
*
|
||||
* @param int $index
|
||||
*
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function getLine(int $index) : string{
|
||||
@@ -114,9 +108,6 @@ class SignText{
|
||||
/**
|
||||
* Sets the line at the given offset.
|
||||
*
|
||||
* @param int $index
|
||||
* @param string $line
|
||||
*
|
||||
* @throws \InvalidArgumentException if the text is not valid UTF-8
|
||||
* @throws \InvalidArgumentException if the text contains a newline
|
||||
*/
|
||||
|
@@ -64,9 +64,7 @@ final class SkullType{
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @param int $magicNumber
|
||||
*
|
||||
* @return SkullType
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function fromMagicNumber(int $magicNumber) : SkullType{
|
||||
@@ -87,16 +85,10 @@ final class SkullType{
|
||||
$this->magicNumber = $magicNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDisplayName() : string{
|
||||
return $this->displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMagicNumber() : int{
|
||||
return $this->magicNumber;
|
||||
}
|
||||
|
@@ -65,9 +65,6 @@ final class TreeType{
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @param int $magicNumber
|
||||
*
|
||||
* @return TreeType
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function fromMagicNumber(int $magicNumber) : TreeType{
|
||||
@@ -83,27 +80,16 @@ final class TreeType{
|
||||
/** @var int */
|
||||
private $magicNumber;
|
||||
|
||||
/**
|
||||
* @param string $enumName
|
||||
* @param string $displayName
|
||||
* @param int $magicNumber
|
||||
*/
|
||||
private function __construct(string $enumName, string $displayName, int $magicNumber){
|
||||
$this->Enum___construct($enumName);
|
||||
$this->displayName = $displayName;
|
||||
$this->magicNumber = $magicNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDisplayName() : string{
|
||||
return $this->displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMagicNumber() : int{
|
||||
return $this->magicNumber;
|
||||
}
|
||||
|
Reference in New Issue
Block a user