Inventory: Removed BigCraftingGrid, allow arbitrary size parameter

This is more flexible and requires less classes.
This commit is contained in:
Dylan K. Taylor
2018-03-27 11:20:23 +01:00
parent 1420cd1fa5
commit 1f4f8ab3f0
4 changed files with 13 additions and 39 deletions

View File

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\inventory\BigCraftingGrid;
use pocketmine\inventory\CraftingGrid;
use pocketmine\item\Item;
use pocketmine\Player;
@ -49,7 +49,7 @@ class CraftingTable extends Solid{
public function onActivate(Item $item, Player $player = null) : bool{
if($player instanceof Player){
$player->setCraftingGrid(new BigCraftingGrid($player));
$player->setCraftingGrid(new CraftingGrid($player, CraftingGrid::SIZE_BIG));
}
return true;