mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
This reverts commit f2ff0198cc
.
This commit is contained in:
@ -54,7 +54,7 @@ class Air extends Transparent{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function canBeReplaced(Block $with = null) : bool{
|
||||
public function canBeReplaced() : bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -284,11 +284,9 @@ class Block extends Position implements BlockIds, Metadatable{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Block|null $with
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canBeReplaced(Block $with = null) : bool{
|
||||
public function canBeReplaced() : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class DoublePlant extends Flowable{
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
||||
public function canBeReplaced(Block $with = null) : bool{
|
||||
public function canBeReplaced() : bool{
|
||||
return $this->meta === 2 or $this->meta === 3; //grass or fern
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ class Fire extends Flowable{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function canBeReplaced(Block $with = null) : bool{
|
||||
public function canBeReplaced() : bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ abstract class Liquid extends Transparent{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function canBeReplaced(Block $with = null) : bool{
|
||||
public function canBeReplaced() : bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class SnowLayer extends Flowable{
|
||||
return "Snow Layer";
|
||||
}
|
||||
|
||||
public function canBeReplaced(Block $with = null) : bool{
|
||||
public function canBeReplaced() : bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ class TallGrass extends Flowable{
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
||||
public function canBeReplaced(Block $with = null) : bool{
|
||||
public function canBeReplaced() : bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -78,10 +78,6 @@ class WoodenSlab extends Transparent{
|
||||
}
|
||||
}
|
||||
|
||||
public function canBeReplaced(Block $with = null) : bool{
|
||||
return $with !== null and $with->getId() === $this->getId() and ($with->getDamage() & 0x07) === ($this->getDamage() & 0x07);
|
||||
}
|
||||
|
||||
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $facePos, Player $player = null) : bool{
|
||||
$this->meta &= 0x07;
|
||||
if($face === Vector3::SIDE_DOWN){
|
||||
|
Reference in New Issue
Block a user