mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-31 23:33:06 +00:00
Cactus: fix bugs in local block updating
This commit is contained in:
parent
8a0414f306
commit
6a1f8640f6
@ -80,12 +80,14 @@ class Cactus extends Transparent{
|
|||||||
$down = $this->getSide(Vector3::SIDE_DOWN);
|
$down = $this->getSide(Vector3::SIDE_DOWN);
|
||||||
if($down->getId() !== self::SAND and $down->getId() !== self::CACTUS){
|
if($down->getId() !== self::SAND and $down->getId() !== self::CACTUS){
|
||||||
$this->getLevel()->useBreakOn($this);
|
$this->getLevel()->useBreakOn($this);
|
||||||
}else{
|
return Level::BLOCK_UPDATE_NORMAL;
|
||||||
for($side = 2; $side <= 5; ++$side){
|
}
|
||||||
$b = $this->getSide($side);
|
|
||||||
if(!$b->canBeFlowedInto()){
|
for($side = 2; $side <= 5; ++$side){
|
||||||
$this->getLevel()->useBreakOn($this);
|
$b = $this->getSide($side);
|
||||||
}
|
if(!$b->canBeFlowedInto()){
|
||||||
|
$this->getLevel()->useBreakOn($this);
|
||||||
|
return Level::BLOCK_UPDATE_NORMAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}elseif($type === Level::BLOCK_UPDATE_RANDOM){
|
}elseif($type === Level::BLOCK_UPDATE_RANDOM){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user