mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
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:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user