mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
Fixed #418 Placing blocks on top of Snow replaces it now
This commit is contained in:
parent
0d6ae6067c
commit
2f7e5688e2
@ -419,6 +419,12 @@ class BlockAPI{
|
|||||||
return $this->cancelAction($block, $player, false);
|
return $this->cancelAction($block, $player, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($target->isReplaceable === true){
|
||||||
|
$block = $target;
|
||||||
|
$hand->position($block);
|
||||||
|
$face = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if($hand->isSolid === true and $player->entity->inBlock($block)){
|
if($hand->isSolid === true and $player->entity->inBlock($block)){
|
||||||
return $this->cancelAction($block, $player, false); //Entity in block
|
return $this->cancelAction($block, $player, false); //Entity in block
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
class DeadBushBlock extends FlowableBlock{
|
class DeadBushBlock extends FlowableBlock{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
parent::__construct(DEAD_BUSH, 0, "Dead Bush");
|
parent::__construct(DEAD_BUSH, 0, "Dead Bush");
|
||||||
$this->isReplaceable = true;
|
//$this->isReplaceable = true;
|
||||||
$this->hardness = 0;
|
$this->hardness = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
class TallGrassBlock extends FlowableBlock{
|
class TallGrassBlock extends FlowableBlock{
|
||||||
public function __construct($meta = 1){
|
public function __construct($meta = 1){
|
||||||
parent::__construct(TALL_GRASS, $meta, "Tall Grass");
|
parent::__construct(TALL_GRASS, $meta, "Tall Grass");
|
||||||
$this->isReplaceable = true;
|
//$this->isReplaceable = true;
|
||||||
$names = array(
|
$names = array(
|
||||||
0 => "Dead Shrub",
|
0 => "Dead Shrub",
|
||||||
1 => "Tall Grass",
|
1 => "Tall Grass",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user