mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 07:54:19 +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);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user