Fixed #756
This commit is contained in:
parent
258ac0a320
commit
a1ec60a194
2 changed files with 13 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ use pocketmine\item\Item;
|
|||
use pocketmine\item\Tool;
|
||||
|
||||
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
|
||||
|
||||
|
|
@ -56,6 +57,17 @@ class GrassPath extends Transparent{
|
|||
);
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
if($type == Level::BLOCK_UPDATE_NORMAL){
|
||||
$block = $this->getSide(self::SIDE_UP);
|
||||
if($block->getId() != self::AIR){
|
||||
$this->getLevel()->setBlock($this, new Dirt(), true);
|
||||
}
|
||||
return Level::BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getHardness() {
|
||||
return 0.6;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ class TNT extends Solid implements ElectricalAppliance{
|
|||
$block = $this->getSide($side);
|
||||
if($block instanceof RedstoneSource and $block->isActivated($this)){
|
||||
$this->prime();
|
||||
$this->getLevel()->setBlock($this, new Air(), true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue