mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
Traits suck. Fixed missed getDamage() from 9ad0ea85c7caeea065ccfadf3bd12bd97cc5f0b6
This commit is contained in:
parent
08673172c7
commit
fb02071a9d
@ -43,7 +43,7 @@ trait FallableTrait{
|
|||||||
|
|
||||||
abstract protected function getId() : int;
|
abstract protected function getId() : int;
|
||||||
|
|
||||||
abstract protected function getDamage() : int;
|
abstract protected function getMeta() : int;
|
||||||
|
|
||||||
public function onNearbyBlockChange() : void{
|
public function onNearbyBlockChange() : void{
|
||||||
$pos = $this->asPosition();
|
$pos = $this->asPosition();
|
||||||
@ -53,7 +53,7 @@ trait FallableTrait{
|
|||||||
|
|
||||||
$nbt = EntityFactory::createBaseNBT($pos->add(0.5, 0, 0.5));
|
$nbt = EntityFactory::createBaseNBT($pos->add(0.5, 0, 0.5));
|
||||||
$nbt->setInt("TileID", $this->getId());
|
$nbt->setInt("TileID", $this->getId());
|
||||||
$nbt->setByte("Data", $this->getDamage());
|
$nbt->setByte("Data", $this->getMeta());
|
||||||
|
|
||||||
/** @var FallingBlock $fall */
|
/** @var FallingBlock $fall */
|
||||||
$fall = EntityFactory::create(FallingBlock::class, $pos->getLevel(), $nbt);
|
$fall = EntityFactory::create(FallingBlock::class, $pos->getLevel(), $nbt);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user