mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-30 06:55:11 +00:00
Wall: move function for consistency
This commit is contained in:
parent
03fdbd9f7b
commit
f57e02849a
@ -53,12 +53,6 @@ class Wall extends Transparent{
|
|||||||
$w->writeBool($this->post);
|
$w->writeBool($this->post);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onNearbyBlockChange() : void{
|
|
||||||
if($this->recalculateConnections()){
|
|
||||||
$this->position->getWorld()->setBlock($this->position, $this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return WallConnectionType[]
|
* @return WallConnectionType[]
|
||||||
* @phpstan-return WallConnectionSet
|
* @phpstan-return WallConnectionSet
|
||||||
@ -100,6 +94,12 @@ class Wall extends Transparent{
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onNearbyBlockChange() : void{
|
||||||
|
if($this->recalculateConnections()){
|
||||||
|
$this->position->getWorld()->setBlock($this->position, $this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function recalculateConnections() : bool{
|
protected function recalculateConnections() : bool{
|
||||||
$changed = 0;
|
$changed = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user