mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Shut some inspections up
This commit is contained in:
@ -101,7 +101,8 @@ class BurningFurnace extends Solid{
|
||||
|
||||
public function onActivate(Item $item, Player $player = null){
|
||||
if($player instanceof Player){
|
||||
if(!(($furnace = $this->getLevel()->getTile($this)) instanceof TileFurnace)){
|
||||
$furnace = $this->getLevel()->getTile($this);
|
||||
if(!($furnace instanceof TileFurnace)){
|
||||
$nbt = new CompoundTag("", [
|
||||
new ListTag("Items", []),
|
||||
new StringTag("id", Tile::FURNACE),
|
||||
|
@ -46,7 +46,8 @@ class ItemFrame extends Flowable{
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player = null){
|
||||
if(!(($tile = $this->level->getTile($this)) instanceof TileItemFrame)){
|
||||
$tile = $this->level->getTile($this);
|
||||
if(!($tile instanceof TileItemFrame)){
|
||||
$nbt = new CompoundTag("", [
|
||||
new StringTag("id", Tile::ITEM_FRAME),
|
||||
new IntTag("x", $this->x),
|
||||
@ -76,7 +77,8 @@ class ItemFrame extends Flowable{
|
||||
}
|
||||
|
||||
public function onBreak(Item $item){
|
||||
if(($tile = $this->level->getTile($this)) instanceof TileItemFrame){
|
||||
$tile = $this->level->getTile($this);
|
||||
if($tile instanceof TileItemFrame){
|
||||
//TODO: add events
|
||||
if(lcg_value() <= $tile->getItemDropChance() and $tile->getItem()->getId() !== Item::AIR){
|
||||
$this->level->dropItem($tile->getBlock(), $tile->getItem());
|
||||
|
@ -107,7 +107,8 @@ class MobHead extends Flowable{
|
||||
}
|
||||
|
||||
public function getDrops(Item $item){
|
||||
if(($tile = $this->level->getTile($this)) instanceof SkullTile){
|
||||
$tile = $this->level->getTile($this);
|
||||
if($tile instanceof SkullTile){
|
||||
return [
|
||||
[Item::MOB_HEAD, $tile->getType(), 1]
|
||||
];
|
||||
|
Reference in New Issue
Block a user