mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-16 08:25:29 +00:00
parent
23ed3334c2
commit
5c8297f4a1
@ -121,7 +121,8 @@ class FallingSand extends Entity{
|
|||||||
if($this->onGround){
|
if($this->onGround){
|
||||||
$this->kill();
|
$this->kill();
|
||||||
$block = $this->level->getBlock($pos);
|
$block = $this->level->getBlock($pos);
|
||||||
if($block->getId() > 0 and !$block->isSolid() and !($block instanceof Liquid)){
|
if($block->getId() > 0 and $block->isTransparent() and !$block->canBeReplaced()){
|
||||||
|
//FIXME: falling blocks are supposed to be destroyed by glass blocks, and anvils are supposed to destroy torches
|
||||||
$this->getLevel()->dropItem($this, ItemItem::get($this->getBlock(), $this->getDamage(), 1));
|
$this->getLevel()->dropItem($this, ItemItem::get($this->getBlock(), $this->getDamage(), 1));
|
||||||
}else{
|
}else{
|
||||||
$this->server->getPluginManager()->callEvent($ev = new EntityBlockChangeEvent($this, $block, Block::get($this->getBlock(), $this->getDamage())));
|
$this->server->getPluginManager()->callEvent($ev = new EntityBlockChangeEvent($this, $block, Block::get($this->getBlock(), $this->getDamage())));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user