added VanillaItems static interface and start using it where possible

This commit is contained in:
Dylan K. Taylor
2019-07-10 14:44:55 +01:00
parent e8fe3d0664
commit 39bcd2ec3d
39 changed files with 672 additions and 88 deletions

View File

@@ -27,8 +27,8 @@ use pocketmine\block\utils\BlockDataValidator;
use pocketmine\block\utils\Fallable;
use pocketmine\block\utils\FallableTrait;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use pocketmine\item\TieredTool;
use pocketmine\item\VanillaItems;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Facing;
use pocketmine\math\Vector3;
@@ -99,7 +99,7 @@ class SnowLayer extends Flowable implements Fallable{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::SNOWBALL, 0, max(1, (int) floor($this->layers / 2)))
VanillaItems::SNOWBALL()->setCount(max(1, (int) floor($this->layers / 2)))
];
}