Tree: renamed generateChunkHeight to generateTrunkHeight

I guess it must have been late at night when I originally wrote this code.
This commit is contained in:
Dylan K. Taylor 2021-08-27 20:32:07 +01:00
parent beba0ffe15
commit 6c1fec8a29
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ class SpruceTree extends Tree{
parent::__construct(VanillaBlocks::SPRUCE_LOG(), VanillaBlocks::SPRUCE_LEAVES(), 10);
}
protected function generateChunkHeight(Random $random) : int{
protected function generateTrunkHeight(Random $random) : int{
return $this->treeHeight - $random->nextBoundedInt(3);
}

View File

@ -76,13 +76,13 @@ abstract class Tree{
}
$transaction = new BlockTransaction($world);
$this->placeTrunk($x, $y, $z, $random, $this->generateChunkHeight($random), $transaction);
$this->placeTrunk($x, $y, $z, $random, $this->generateTrunkHeight($random), $transaction);
$this->placeCanopy($x, $y, $z, $random, $transaction);
return $transaction;
}
protected function generateChunkHeight(Random $random) : int{
protected function generateTrunkHeight(Random $random) : int{
return $this->treeHeight - 1;
}