mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Updated some packets for 0.12, UUIDs, other stuff!
This commit is contained in:
@ -23,11 +23,14 @@ namespace pocketmine\inventory;
|
||||
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\utils\UUID;
|
||||
|
||||
class ShapelessRecipe implements Recipe{
|
||||
/** @var Item */
|
||||
private $output;
|
||||
|
||||
private $id = null;
|
||||
|
||||
/** @var Item[] */
|
||||
private $ingredients = [];
|
||||
|
||||
@ -35,6 +38,18 @@ class ShapelessRecipe implements Recipe{
|
||||
$this->output = clone $result;
|
||||
}
|
||||
|
||||
public function getId(){
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(UUID $id){
|
||||
if($this->id !== null){
|
||||
throw new \InvalidStateException("Id is already set");
|
||||
}
|
||||
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function getResult(){
|
||||
return clone $this->output;
|
||||
}
|
||||
|
Reference in New Issue
Block a user