mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
Snow Layer is broken on update
This commit is contained in:
parent
bfa65e1e7d
commit
cd932d5c07
2 changed files with 15 additions and 5 deletions
|
|
@ -42,11 +42,11 @@ class RedMushroomBlock extends FlowableBlock{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||||
$down = $this->getSide(0);
|
$down = $this->getSide(0);
|
||||||
if($down->isTransparent === false){
|
if($down->isTransparent === false){
|
||||||
$this->level->setBlock($block, $this);
|
$this->level->setBlock($block, $this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -32,6 +32,16 @@ class SnowLayerBlock extends FlowableBlock{
|
||||||
$this->isSolid = false;
|
$this->isSolid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onUpdate($type){
|
||||||
|
if($type === BLOCK_UPDATE_NORMAL){
|
||||||
|
if($this->getSide(0)->getID() === AIR){ //Replace wit common break method
|
||||||
|
$this->level->setBlock($this, new AirBlock(), false);
|
||||||
|
return BLOCK_UPDATE_NORMAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getDrops(Item $item, Player $player){
|
public function getDrops(Item $item, Player $player){
|
||||||
if($item->isShovel() !== false){
|
if($item->isShovel() !== false){
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue