mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Modernize property declarations in src/world/*
This commit is contained in:
@ -38,21 +38,16 @@ use function abs;
|
||||
|
||||
class Nether extends Generator{
|
||||
|
||||
/** @var Populator[] */
|
||||
private $populators = [];
|
||||
/** @var int */
|
||||
private $waterHeight = 32;
|
||||
/** @var int */
|
||||
private $emptyHeight = 64;
|
||||
/** @var int */
|
||||
private $emptyAmplitude = 1;
|
||||
/** @var float */
|
||||
private $density = 0.5;
|
||||
private int $waterHeight = 32;
|
||||
private int $emptyHeight = 64;
|
||||
private int $emptyAmplitude = 1;
|
||||
private float $density = 0.5;
|
||||
|
||||
/** @var Populator[] */
|
||||
private $generationPopulators = [];
|
||||
/** @var Simplex */
|
||||
private $noiseBase;
|
||||
private array $populators = [];
|
||||
/** @var Populator[] */
|
||||
private array $generationPopulators = [];
|
||||
private Simplex $noiseBase;
|
||||
|
||||
/**
|
||||
* @throws InvalidGeneratorOptionsException
|
||||
|
@ -42,21 +42,14 @@ use pocketmine\world\World;
|
||||
|
||||
class Normal extends Generator{
|
||||
|
||||
private int $waterHeight = 62;
|
||||
/** @var Populator[] */
|
||||
private $populators = [];
|
||||
/** @var int */
|
||||
private $waterHeight = 62;
|
||||
|
||||
private array $populators = [];
|
||||
/** @var Populator[] */
|
||||
private $generationPopulators = [];
|
||||
/** @var Simplex */
|
||||
private $noiseBase;
|
||||
|
||||
/** @var BiomeSelector */
|
||||
private $selector;
|
||||
|
||||
/** @var Gaussian */
|
||||
private $gaussian;
|
||||
private array $generationPopulators = [];
|
||||
private Simplex $noiseBase;
|
||||
private BiomeSelector $selector;
|
||||
private Gaussian $gaussian;
|
||||
|
||||
/**
|
||||
* @throws InvalidGeneratorOptionsException
|
||||
|
@ -30,8 +30,7 @@ use function sin;
|
||||
use const M_PI;
|
||||
|
||||
class Ore{
|
||||
/** @var Random */
|
||||
private $random;
|
||||
private Random $random;
|
||||
/** @var OreType */
|
||||
public $type;
|
||||
|
||||
|
@ -31,7 +31,7 @@ use pocketmine\world\generator\object\OreType;
|
||||
|
||||
class Ore implements Populator{
|
||||
/** @var OreType[] */
|
||||
private $oreTypes = [];
|
||||
private array $oreTypes = [];
|
||||
|
||||
public function populate(ChunkManager $world, int $chunkX, int $chunkZ, Random $random) : void{
|
||||
foreach($this->oreTypes as $type){
|
||||
|
@ -30,10 +30,8 @@ use pocketmine\world\ChunkManager;
|
||||
use pocketmine\world\format\Chunk;
|
||||
|
||||
class TallGrass implements Populator{
|
||||
/** @var int */
|
||||
private $randomAmount = 1;
|
||||
/** @var int */
|
||||
private $baseAmount = 0;
|
||||
private int $randomAmount = 1;
|
||||
private int $baseAmount = 0;
|
||||
|
||||
public function setRandomAmount(int $amount) : void{
|
||||
$this->randomAmount = $amount;
|
||||
|
@ -31,13 +31,9 @@ use pocketmine\world\format\Chunk;
|
||||
use pocketmine\world\generator\object\TreeFactory;
|
||||
|
||||
class Tree implements Populator{
|
||||
/** @var int */
|
||||
private $randomAmount = 1;
|
||||
/** @var int */
|
||||
private $baseAmount = 0;
|
||||
|
||||
/** @var TreeType */
|
||||
private $type;
|
||||
private int $randomAmount = 1;
|
||||
private int $baseAmount = 0;
|
||||
private TreeType $type;
|
||||
|
||||
/**
|
||||
* @param TreeType|null $type default oak
|
||||
|
Reference in New Issue
Block a user