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:
@ -31,8 +31,12 @@ class CraftingGrid extends BaseInventory{
|
||||
parent::__construct($holder);
|
||||
}
|
||||
|
||||
public function getGridWidth() : int{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public function getDefaultSize() : int{
|
||||
return 4;
|
||||
return $this->getGridWidth() ** 2;
|
||||
}
|
||||
|
||||
public function setSize(int $size){
|
||||
|
Reference in New Issue
Block a user