mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Removed unnecessary methods Block->canBeActivated() and Item->canBeActivated() (needless extra confusion)
This commit is contained in:
@ -39,10 +39,6 @@ class Bucket extends Item{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$targetBlock = Block::get($this->meta);
|
||||
|
||||
|
@ -34,10 +34,6 @@ class FlintSteel extends Tool{
|
||||
parent::__construct(self::FLINT_STEEL, $meta, $count, "Flint and Steel");
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($block->getId() === self::AIR and ($target instanceof Solid)){
|
||||
$level->setBlock($block, new Fire(), true);
|
||||
|
@ -93,10 +93,6 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
/** @var string */
|
||||
protected $name;
|
||||
|
||||
public function canBeActivated(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function init(){
|
||||
if(self::$list === null){
|
||||
self::$list = new \SplFixedArray(65536);
|
||||
|
@ -32,10 +32,6 @@ class Painting extends Item{
|
||||
parent::__construct(self::PAINTING, 0, $count, "Painting");
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($target->isTransparent() === false and $face > 1 and $block->isSolid() === false){
|
||||
$faces = [
|
||||
|
@ -38,10 +38,6 @@ class SpawnEgg extends Item{
|
||||
parent::__construct(self::SPAWN_EGG, $meta, $count, "Spawn Egg");
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$nbt = new CompoundTag("", [
|
||||
new ListTag("Pos", [
|
||||
|
Reference in New Issue
Block a user