Item factory refactor and added capability to register custom items

This commit is contained in:
Dylan K. Taylor
2017-08-20 19:11:21 +01:00
parent 604d11a8fd
commit 876659cc73
66 changed files with 491 additions and 347 deletions

View File

@ -33,6 +33,7 @@ use pocketmine\event\entity\EntityDamageByEntityEvent;
use pocketmine\event\entity\EntityDamageEvent;
use pocketmine\event\entity\EntityExplodeEvent;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use pocketmine\level\particle\HugeExplodeSeedParticle;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Math;
@ -192,7 +193,7 @@ class Explosion{
}
$air = Item::get(Item::AIR);
$air = ItemFactory::get(Item::AIR);
foreach($this->affectedBlocks as $block){
if($block instanceof TNT){