mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
added VanillaItems static interface and start using it where possible
This commit is contained in:
@@ -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)))
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user