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