Replace some ItemFactory blockitem fetches with VanillaBlocks::THING()->asItem()

This commit is contained in:
Dylan K. Taylor
2019-07-09 18:30:02 +01:00
parent 41705db687
commit e8fe3d0664
6 changed files with 13 additions and 19 deletions

View File

@@ -25,7 +25,6 @@ namespace pocketmine\block;
use pocketmine\block\utils\BlockDataValidator;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Facing;
@@ -97,7 +96,7 @@ class Farmland extends Transparent{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::DIRT)
VanillaBlocks::DIRT()->asItem()
];
}
@@ -106,6 +105,6 @@ class Farmland extends Transparent{
}
public function getPickedItem(bool $addUserData = false) : Item{
return ItemFactory::get(Item::DIRT);
return VanillaBlocks::DIRT()->asItem();
}
}