Added ItemFactory::air() sugar

This makes it easier to create air stacks without accidents, and also reduces the amount of throwaway air objects which get created.
This commit is contained in:
Dylan K. Taylor
2019-02-16 11:58:08 +00:00
parent 0ac7164b16
commit b252be1c7a
12 changed files with 24 additions and 20 deletions

View File

@ -1674,7 +1674,7 @@ class Level implements ChunkManager, Metadatable{
$affectedBlocks = $target->getAffectedBlocks();
if($item === null){
$item = ItemFactory::get(Item::AIR, 0, 0);
$item = ItemFactory::air();
}
$drops = [];