mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Added VanillaItems::AIR()
we don't usually add VanillaItems entries for blocks since they already exist in VanillaBlocks, but air has a special use case specifically as an itemstack, so we make an exception for this case.
This commit is contained in:
@ -52,9 +52,9 @@ use pocketmine\event\world\ChunkUnloadEvent;
|
||||
use pocketmine\event\world\SpawnChangeEvent;
|
||||
use pocketmine\event\world\WorldSaveEvent;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\item\ItemUseResult;
|
||||
use pocketmine\item\LegacyStringToItemParser;
|
||||
use pocketmine\item\VanillaItems;
|
||||
use pocketmine\lang\KnownTranslationFactory;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Vector3;
|
||||
@ -1687,7 +1687,7 @@ class World implements ChunkManager{
|
||||
$affectedBlocks = $target->getAffectedBlocks();
|
||||
|
||||
if($item === null){
|
||||
$item = ItemFactory::air();
|
||||
$item = VanillaItems::AIR();
|
||||
}
|
||||
|
||||
$drops = [];
|
||||
|
Reference in New Issue
Block a user