GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
FurnaceRecipe Class Reference

Public Member Functions

 __construct (Item $result, Item $ingredient)
 
 getId ()
 
 setId (UUID $id)
 
 setInput (Item $item)
 
 getInput ()
 
 getResult ()
 
 registerToCraftingManager ()
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( Item  $result,
Item  $ingredient 
)
Parameters
Item$result
Item$ingredient
42  {
43  $this->output = clone $result;
44  $this->ingredient = clone $ingredient;
45  }

Member Function Documentation

◆ getId()

getId ( )
Returns
null

Implements Recipe.

50  {
51  return $this->id;
52  }

◆ getInput()

getInput ( )
Returns
Item
75  {
76  return clone $this->ingredient;
77  }

◆ getResult()

getResult ( )
Returns
Item

Implements Recipe.

82  {
83  return clone $this->output;
84  }

◆ registerToCraftingManager()

registerToCraftingManager ( )

Implements Recipe.

86  {
87  Server::getInstance()->getCraftingManager()->registerFurnaceRecipe($this);
88  }

◆ setId()

setId ( UUID  $id)
Parameters
UUID$id
57  {
58  if($this->id !== null){
59  throw new \InvalidStateException("Id is already set");
60  }
61 
62  $this->id = $id;
63  }

◆ setInput()

setInput ( Item  $item)
Parameters
Item$item
68  {
69  $this->ingredient = clone $item;
70  }

The documentation for this class was generated from the following file: