Block: Drop unnecessary parameters for ItemFactory::get()

This commit is contained in:
Dylan K. Taylor 2017-12-13 18:37:04 +00:00
parent 853411fa4f
commit 6abf880e44
20 changed files with 23 additions and 23 deletions

View File

@ -112,7 +112,7 @@ class Anvil extends Fallable{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get($this->getItemId(), $this->getDamage() & 0x0c, 1)
ItemFactory::get($this->getItemId(), $this->getDamage() & 0x0c)
];
}
}

View File

@ -204,11 +204,11 @@ class Bed extends Transparent{
$tile = $this->getLevel()->getTile($this);
if($tile instanceof TileBed){
return [
ItemFactory::get($this->getItemId(), $tile->getColor(), 1)
ItemFactory::get($this->getItemId(), $tile->getColor())
];
}else{
return [
ItemFactory::get($this->getItemId(), 14, 1) //Red
ItemFactory::get($this->getItemId(), 14) //Red
];
}
}

View File

@ -41,13 +41,13 @@ class Beetroot extends Crops{
public function getDropsForCompatibleTool(Item $item) : array{
if($this->meta >= 0x07){
return [
ItemFactory::get(Item::BEETROOT, 0, 1),
ItemFactory::get(Item::BEETROOT),
ItemFactory::get(Item::BEETROOT_SEEDS, 0, mt_rand(0, 3))
];
}
return [
ItemFactory::get(Item::BEETROOT_SEEDS, 0, 1)
ItemFactory::get(Item::BEETROOT_SEEDS)
];
}

View File

@ -448,7 +448,7 @@ class Block extends Position implements BlockIds, Metadatable{
*/
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get($this->getItemId(), $this->getVariant(), 1)
ItemFactory::get($this->getItemId(), $this->getVariant())
];
}

View File

@ -53,7 +53,7 @@ class CoalOre extends Solid{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::COAL, 0, 1)
ItemFactory::get(Item::COAL)
];
}

View File

@ -53,7 +53,7 @@ class DiamondOre extends Solid{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::DIAMOND, 0, 1)
ItemFactory::get(Item::DIAMOND)
];
}
}

View File

@ -125,7 +125,7 @@ class DoublePlant extends Flowable{
if(mt_rand(0, 24) === 0){
return [
ItemFactory::get(Item::SEEDS, 0, 1)
ItemFactory::get(Item::SEEDS)
];
}
}

View File

@ -53,7 +53,7 @@ class EmeraldOre extends Solid{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::EMERALD, 0, 1)
ItemFactory::get(Item::EMERALD)
];
}
}

View File

@ -109,7 +109,7 @@ class Farmland extends Transparent{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::DIRT, 0, 1)
ItemFactory::get(Item::DIRT)
];
}
}

View File

@ -54,7 +54,7 @@ class Grass extends Solid{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::DIRT, 0, 1)
ItemFactory::get(Item::DIRT)
];
}

View File

@ -71,7 +71,7 @@ class GrassPath extends Transparent{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::DIRT, 0, 1)
ItemFactory::get(Item::DIRT)
];
}
}

View File

@ -49,7 +49,7 @@ class Gravel extends Fallable{
public function getDropsForCompatibleTool(Item $item) : array{
if(mt_rand(1, 10) === 1){
return [
ItemFactory::get(Item::FLINT, 0, 1)
ItemFactory::get(Item::FLINT)
];
}

View File

@ -179,7 +179,7 @@ class Leaves extends Transparent{
$drops[] = $this->getSaplingItem();
}
if($this->canDropApples() and mt_rand(1, 200) === 1){ //Apples
$drops[] = ItemFactory::get(Item::APPLE, 0, 1);
$drops[] = ItemFactory::get(Item::APPLE);
}
return $drops;

View File

@ -52,7 +52,7 @@ class Mycelium extends Solid{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::DIRT, 0, 1)
ItemFactory::get(Item::DIRT)
];
}

View File

@ -53,7 +53,7 @@ class NetherQuartzOre extends Solid{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::QUARTZ, 0, 1)
ItemFactory::get(Item::QUARTZ)
];
}

View File

@ -75,7 +75,7 @@ class Skull extends Flowable{
$tile = $this->level->getTile($this);
if($tile instanceof TileSkull){
return [
ItemFactory::get(Item::SKULL, $tile->getType(), 1)
ItemFactory::get(Item::SKULL, $tile->getType())
];
}

View File

@ -93,7 +93,7 @@ class SnowLayer extends Flowable{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::SNOWBALL, 0, 1) //TODO: check layer count
ItemFactory::get(Item::SNOWBALL) //TODO: check layer count
];
}
}

View File

@ -70,7 +70,7 @@ class Stone extends Solid{
public function getDropsForCompatibleTool(Item $item) : array{
if($this->getDamage() === self::NORMAL){
return [
ItemFactory::get(Item::COBBLESTONE, $this->getDamage(), 1)
ItemFactory::get(Item::COBBLESTONE, $this->getDamage())
];
}

View File

@ -89,7 +89,7 @@ class TallGrass extends Flowable{
if(mt_rand(0, 15) === 0){
return [
ItemFactory::get(Item::WHEAT_SEEDS, 0, 1)
ItemFactory::get(Item::WHEAT_SEEDS)
];
}

View File

@ -41,12 +41,12 @@ class Wheat extends Crops{
public function getDropsForCompatibleTool(Item $item) : array{
if($this->meta >= 0x07){
return [
ItemFactory::get(Item::WHEAT, 0, 1),
ItemFactory::get(Item::WHEAT),
ItemFactory::get(Item::WHEAT_SEEDS, 0, mt_rand(0, 3))
];
}else{
return [
ItemFactory::get(Item::WHEAT_SEEDS, 0, 1)
ItemFactory::get(Item::WHEAT_SEEDS)
];
}
}