mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Added some documentation to FurnaceBurnEvent
This commit is contained in:
parent
ed0053d0ee
commit
b169d89291
@ -28,6 +28,9 @@ use pocketmine\event\Cancellable;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\tile\Furnace;
|
||||
|
||||
/**
|
||||
* Called when a furnace is about to consume a new fuel item.
|
||||
*/
|
||||
class FurnaceBurnEvent extends BlockEvent implements Cancellable{
|
||||
/** @var Furnace */
|
||||
private $furnace;
|
||||
@ -53,18 +56,31 @@ class FurnaceBurnEvent extends BlockEvent implements Cancellable{
|
||||
return $this->fuel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of ticks that the furnace will be powered for.
|
||||
*/
|
||||
public function getBurnTime() : int{
|
||||
return $this->burnTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the number of ticks that the given fuel will power the furnace for.
|
||||
*/
|
||||
public function setBurnTime(int $burnTime) : void{
|
||||
$this->burnTime = $burnTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the fuel item will be consumed.
|
||||
*/
|
||||
public function isBurning() : bool{
|
||||
return $this->burning;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the fuel will be consumed. If false, the furnace will smelt as if it consumed fuel, but no fuel
|
||||
* will be deducted.
|
||||
*/
|
||||
public function setBurning(bool $burning) : void{
|
||||
$this->burning = $burning;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user