mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Consistently declare BlockBreakInfo at the constructor call site
instead of inside the class
This commit is contained in:
@ -32,10 +32,6 @@ class NetherPortal extends Transparent{
|
||||
/** @var int */
|
||||
protected $axis = Axis::X;
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){
|
||||
parent::__construct($idInfo, $name, $breakInfo ?? BlockBreakInfo::indestructible(0.0));
|
||||
}
|
||||
|
||||
public function readStateFromData(int $id, int $stateMeta) : void{
|
||||
$this->axis = $stateMeta === BlockLegacyMetadata::NETHER_PORTAL_AXIS_Z ? Axis::Z : Axis::X; //mojang u dumb
|
||||
}
|
||||
|
Reference in New Issue
Block a user