PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
FurnaceSmeltEvent.php
1 <?php
2 
22 namespace pocketmine\event\inventory;
23 
28 
29 class FurnaceSmeltEvent extends BlockEvent implements Cancellable{
30  public static $handlerList = null;
31  public static $eventPool = [];
32  public static $nextEvent = 0;
33 
34  private $furnace;
35  private $source;
36  private $result;
37 
38  public function __construct(Furnace $furnace, Item $source, Item $result){
39  parent::__construct($furnace->getBlock());
40  $this->source = clone $source;
41  $this->source->setCount(1);
42  $this->result = $result;
43  $this->furnace = $furnace;
44  }
45 
49  public function getFurnace(){
50  return $this->furnace;
51  }
52 
56  public function getSource(){
57  return $this->source;
58  }
59 
63  public function getResult(){
64  return $this->result;
65  }
66 
70  public function setResult(Item $result){
71  $this->result = $result;
72  }
73 }