Accept BlockTypeInfo in Block constructor, instead of BlockBreakInfo

this will allow more stuff to be passed via the constructor without having to change dozens of classes to do it.
This commit is contained in:
Dylan K. Taylor
2022-07-23 20:42:54 +01:00
parent 89b784734e
commit 6a2315a63d
41 changed files with 342 additions and 306 deletions

View File

@ -65,10 +65,10 @@ class Block{
/**
* @param string $name English name of the block type (TODO: implement translations)
*/
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
public function __construct(BlockIdentifier $idInfo, string $name, BlockTypeInfo $typeInfo){
$this->idInfo = $idInfo;
$this->fallbackName = $name;
$this->breakInfo = $breakInfo;
$this->breakInfo = $typeInfo->getBreakInfo();
$this->position = new Position(0, 0, 0, null);
}