Coral: remove obsolete workaround

This commit is contained in:
Dylan K. Taylor 2022-07-02 17:51:48 +01:00
parent b125d4d25f
commit 7430e1fbc0
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -31,18 +31,6 @@ use pocketmine\world\BlockTransaction;
final class Coral extends BaseCoral{
public function readStateFromWorld() : void{
//TODO: this hack ensures correct state of coral plants, because they don't retain their dead flag in metadata
$world = $this->position->getWorld();
$this->dead = true;
foreach($this->position->sides() as $vector3){
if($world->getBlock($vector3) instanceof Water){
$this->dead = false;
break;
}
}
}
public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
if(!$this->canBeSupportedBy($tx->fetchBlock($blockReplace->getPosition()->down()))){
return false;