Generate methods for surrogate enums, nip stupidity in the bud

this also allows changing the internal implementation later without breaking plugins.
This commit is contained in:
Dylan K. Taylor
2019-02-20 11:09:22 +00:00
parent 88c4b836f0
commit 36e9db4c07
17 changed files with 135 additions and 43 deletions

View File

@ -34,7 +34,7 @@ class BirchTree extends Tree{
protected $superBirch = false;
public function __construct(bool $superBirch = false){
parent::__construct(BlockFactory::get(Block::LOG, TreeType::$BIRCH->getMagicNumber()), BlockFactory::get(Block::LEAVES, TreeType::$BIRCH->getMagicNumber()));
parent::__construct(BlockFactory::get(Block::LOG, TreeType::BIRCH()->getMagicNumber()), BlockFactory::get(Block::LEAVES, TreeType::BIRCH()->getMagicNumber()));
$this->superBirch = $superBirch;
}