mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
CraftingTransaction: Don't hardcode crafting grid sizes
This commit is contained in:
@ -46,7 +46,7 @@ class CraftingTransaction extends InventoryTransaction{
|
||||
protected $recipe = null;
|
||||
|
||||
public function __construct(Player $source, $actions = []){
|
||||
$this->gridSize = ($source->getCraftingGrid() instanceof BigCraftingGrid) ? 3 : 2;
|
||||
$this->gridSize = $source->getCraftingGrid()->getGridWidth();
|
||||
|
||||
$air = ItemFactory::get(Item::AIR, 0, 0);
|
||||
$this->inputs = array_fill(0, $this->gridSize, array_fill(0, $this->gridSize, $air));
|
||||
|
Reference in New Issue
Block a user