mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 10:31:51 +00:00
Coral: remove obsolete workaround
This commit is contained in:
parent
b125d4d25f
commit
7430e1fbc0
@ -31,18 +31,6 @@ use pocketmine\world\BlockTransaction;
|
|||||||
|
|
||||||
final class Coral extends BaseCoral{
|
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{
|
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()))){
|
if(!$this->canBeSupportedBy($tx->fetchBlock($blockReplace->getPosition()->down()))){
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user