mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Mass removal of useless @param/@return PHPDoc annotations, pass 1
This commit is contained in:
@ -64,8 +64,6 @@ class Flat extends Generator{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $options
|
||||
*
|
||||
* @throws InvalidGeneratorOptionsException
|
||||
*/
|
||||
public function __construct(array $options = []){
|
||||
@ -96,8 +94,6 @@ class Flat extends Generator{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $layers
|
||||
*
|
||||
* @return int[][]
|
||||
* @throws InvalidGeneratorOptionsException
|
||||
*/
|
||||
|
@ -36,10 +36,6 @@ abstract class Generator{
|
||||
|
||||
/**
|
||||
* Converts a string level seed into an integer for use by the generator.
|
||||
*
|
||||
* @param string $seed
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public static function convertSeed(string $seed) : ?int{
|
||||
if($seed === ""){ //empty seed should cause a random seed to be selected - can't use 0 here because 0 is a valid seed
|
||||
@ -59,8 +55,6 @@ abstract class Generator{
|
||||
protected $random;
|
||||
|
||||
/**
|
||||
* @param array $settings
|
||||
*
|
||||
* @throws InvalidGeneratorOptionsException
|
||||
*/
|
||||
abstract public function __construct(array $settings = []);
|
||||
|
@ -73,7 +73,6 @@ final class GeneratorManager{
|
||||
/**
|
||||
* Returns a class name of a registered Generator matching the given name.
|
||||
*
|
||||
* @param string $name
|
||||
* @param bool $throwOnMissing @deprecated this is for backwards compatibility only
|
||||
*
|
||||
* @return string|Generator Name of class that extends Generator (not an actual Generator object)
|
||||
@ -94,8 +93,6 @@ final class GeneratorManager{
|
||||
* Returns the registered name of the given Generator class.
|
||||
*
|
||||
* @param string $class Fully qualified name of class that extends \pocketmine\level\generator\Generator
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getGeneratorName(string $class) : string{
|
||||
foreach(self::$list as $name => $c){
|
||||
|
@ -45,9 +45,6 @@ abstract class BiomeSelector{
|
||||
/**
|
||||
* Lookup function called by recalculate() to determine the biome to use for this temperature and rainfall.
|
||||
*
|
||||
* @param float $temperature
|
||||
* @param float $rainfall
|
||||
*
|
||||
* @return int biome ID 0-255
|
||||
*/
|
||||
abstract protected function lookup(float $temperature, float $rainfall) : int;
|
||||
@ -92,8 +89,6 @@ abstract class BiomeSelector{
|
||||
/**
|
||||
* @param int $x
|
||||
* @param int $z
|
||||
*
|
||||
* @return Biome
|
||||
*/
|
||||
public function pickBiome($x, $z) : Biome{
|
||||
$temperature = (int) ($this->getTemperature($x, $z) * 63);
|
||||
|
@ -53,8 +53,6 @@ class Nether extends Generator{
|
||||
private $noiseBase;
|
||||
|
||||
/**
|
||||
* @param array $options
|
||||
*
|
||||
* @throws InvalidGeneratorOptionsException
|
||||
*/
|
||||
public function __construct(array $options = []){
|
||||
|
@ -48,8 +48,6 @@ abstract class Noise{
|
||||
|
||||
/**
|
||||
* @param float $x
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public static function floor($x) : int{
|
||||
return $x >= 0 ? (int) $x : (int) ($x - 1);
|
||||
@ -250,16 +248,6 @@ abstract class Noise{
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $xSize
|
||||
* @param int $samplingRate
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
*
|
||||
* @return \SplFixedArray
|
||||
*/
|
||||
public function getFastNoise1D(int $xSize, int $samplingRate, int $x, int $y, int $z) : \SplFixedArray{
|
||||
if($samplingRate === 0){
|
||||
throw new \InvalidArgumentException("samplingRate cannot be 0");
|
||||
@ -284,16 +272,6 @@ abstract class Noise{
|
||||
return $noiseArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $xSize
|
||||
* @param int $zSize
|
||||
* @param int $samplingRate
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
*
|
||||
* @return \SplFixedArray
|
||||
*/
|
||||
public function getFastNoise2D(int $xSize, int $zSize, int $samplingRate, int $x, int $y, int $z) : \SplFixedArray{
|
||||
assert($samplingRate !== 0, new \InvalidArgumentException("samplingRate cannot be 0"));
|
||||
|
||||
@ -330,19 +308,6 @@ abstract class Noise{
|
||||
return $noiseArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $xSize
|
||||
* @param int $ySize
|
||||
* @param int $zSize
|
||||
* @param int $xSamplingRate
|
||||
* @param int $ySamplingRate
|
||||
* @param int $zSamplingRate
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFastNoise3D(int $xSize, int $ySize, int $zSize, int $xSamplingRate, int $ySamplingRate, int $zSamplingRate, int $x, int $y, int $z) : array{
|
||||
|
||||
assert($xSamplingRate !== 0, new \InvalidArgumentException("xSamplingRate cannot be 0"));
|
||||
|
@ -35,7 +35,6 @@ class Perlin extends Noise{
|
||||
|
||||
|
||||
/**
|
||||
* @param Random $random
|
||||
* @param int $octaves
|
||||
* @param float $persistence
|
||||
* @param float $expansion
|
||||
|
@ -84,7 +84,6 @@ class Simplex extends Perlin{
|
||||
|
||||
|
||||
/**
|
||||
* @param Random $random
|
||||
* @param int $octaves
|
||||
* @param float $persistence
|
||||
* @param float $expansion
|
||||
|
@ -61,8 +61,6 @@ class Normal extends Generator{
|
||||
private static $SMOOTH_SIZE = 2;
|
||||
|
||||
/**
|
||||
* @param array $options
|
||||
*
|
||||
* @throws InvalidGeneratorOptionsException
|
||||
*/
|
||||
public function __construct(array $options = []){
|
||||
|
@ -36,12 +36,6 @@ class BigTree extends Tree{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
* @param Random $random
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function placeObject(ChunkManager $level, int $x, int $y, int $z, Random $random){
|
||||
|
@ -41,12 +41,6 @@ class BirchTree extends Tree{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
* @param Random $random
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function placeObject(ChunkManager $level, int $x, int $y, int $z, Random $random){
|
||||
|
@ -37,12 +37,6 @@ class OakTree extends Tree{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
* @param Random $random
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function placeObject(ChunkManager $level, int $x, int $y, int $z, Random $random){
|
||||
|
@ -50,11 +50,6 @@ class Ore{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function placeObject(ChunkManager $level, int $x, int $y, int $z){
|
||||
|
@ -44,9 +44,6 @@ class Pond{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param Vector3 $pos
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function placeObject(ChunkManager $level, Vector3 $pos){
|
||||
|
@ -40,12 +40,6 @@ class SpruceTree extends Tree{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
* @param Random $random
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function placeObject(ChunkManager $level, int $x, int $y, int $z, Random $random){
|
||||
|
@ -32,12 +32,6 @@ use function count;
|
||||
class TallGrass{
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param Vector3 $pos
|
||||
* @param Random $random
|
||||
* @param int $count
|
||||
* @param int $radius
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function growGrass(ChunkManager $level, Vector3 $pos, Random $random, int $count = 15, int $radius = 10){
|
||||
|
@ -50,13 +50,6 @@ abstract class Tree{
|
||||
public $treeHeight = 7;
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
* @param Random $random
|
||||
* @param int $type
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function growTree(ChunkManager $level, int $x, int $y, int $z, Random $random, int $type = 0){
|
||||
@ -111,12 +104,6 @@ abstract class Tree{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
* @param Random $random
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function placeObject(ChunkManager $level, int $x, int $y, int $z, Random $random){
|
||||
@ -143,13 +130,6 @@ abstract class Tree{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
* @param Random $random
|
||||
* @param int $trunkHeight
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function placeTrunk(ChunkManager $level, int $x, int $y, int $z, Random $random, int $trunkHeight){
|
||||
|
@ -50,8 +50,6 @@ class Pond extends Populator{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $waterOdd
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setWaterOdd(int $waterOdd){
|
||||
@ -59,8 +57,6 @@ class Pond extends Populator{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $lavaOdd
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setLavaOdd(int $lavaOdd){
|
||||
@ -68,8 +64,6 @@ class Pond extends Populator{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $lavaSurfaceOdd
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setLavaSurfaceOdd(int $lavaSurfaceOdd){
|
||||
|
@ -32,11 +32,6 @@ use pocketmine\utils\Random;
|
||||
abstract class Populator{
|
||||
|
||||
/**
|
||||
* @param ChunkManager $level
|
||||
* @param int $chunkX
|
||||
* @param int $chunkZ
|
||||
* @param Random $random
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract public function populate(ChunkManager $level, int $chunkX, int $chunkZ, Random $random);
|
||||
|
Reference in New Issue
Block a user