PocketMine-MP 5.17.1 git-df4ada81e5d74a14046f27cf44a37dcee69d657e
pocketmine\event\inventory\FurnaceBurnEvent Class Reference
+ Inheritance diagram for pocketmine\event\inventory\FurnaceBurnEvent:
+ Collaboration diagram for pocketmine\event\inventory\FurnaceBurnEvent:

Public Member Functions

 __construct (private Furnace $furnace, private Item $fuel, private int $burnTime)
 call ()
 getBlock ()
 getBurnTime ()
 getEventName ()
 getFuel ()
 getFurnace ()
 isBurning ()
 isCancelled ()
 setBurning (bool $burning)
 setBurnTime (int $burnTime)

Static Public Member Functions

static hasHandlers ()

Protected Attributes

string $eventName = null

Detailed Description

Called when a furnace is about to consume a new fuel item.

Definition at line 35 of file FurnaceBurnEvent.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\event\inventory\FurnaceBurnEvent::__construct ( private Furnace  $furnace,
private Item  $fuel,
private int  $burnTime 

Definition at line 40 of file FurnaceBurnEvent.php.

Member Function Documentation

◆ call()

pocketmine\event\Event::call ( )

Calls event handlers registered for this event.


RuntimeException if event call recursion reaches the max depth limit

Definition at line 49 of file Event.php.

◆ getBlock()

pocketmine\event\block\BlockEvent::getBlock ( )

Definition at line 37 of file BlockEvent.php.

◆ getBurnTime()

pocketmine\event\inventory\FurnaceBurnEvent::getBurnTime ( )

Returns the number of ticks that the furnace will be powered for.

Definition at line 59 of file FurnaceBurnEvent.php.

◆ getEventName()

pocketmine\event\Event::getEventName ( )

Definition at line 40 of file Event.php.

◆ getFuel()

pocketmine\event\inventory\FurnaceBurnEvent::getFuel ( )

Definition at line 52 of file FurnaceBurnEvent.php.

◆ getFurnace()

pocketmine\event\inventory\FurnaceBurnEvent::getFurnace ( )

Definition at line 48 of file FurnaceBurnEvent.php.

◆ hasHandlers()

static pocketmine\event\Event::hasHandlers ( )

Returns whether the current class context has any registered global handlers. This can be used in hot code paths to avoid unnecessary event object creation.

Usage: SomeEventClass::hasHandlers()

Definition at line 77 of file Event.php.

◆ isBurning()

pocketmine\event\inventory\FurnaceBurnEvent::isBurning ( )

Returns whether the fuel item will be consumed.

Definition at line 73 of file FurnaceBurnEvent.php.

◆ isCancelled()

pocketmine\event\Cancellable::isCancelled ( )

Returns whether this instance of the event is currently cancelled.

If it is cancelled, only downstream handlers that declare @handleCancelled will be called with this event.

◆ setBurning()

pocketmine\event\inventory\FurnaceBurnEvent::setBurning ( bool  $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.

Definition at line 81 of file FurnaceBurnEvent.php.

◆ setBurnTime()

pocketmine\event\inventory\FurnaceBurnEvent::setBurnTime ( int  $burnTime)

Sets the number of ticks that the given fuel will power the furnace for.

Definition at line 66 of file FurnaceBurnEvent.php.

Member Data Documentation

◆ $eventName

string pocketmine\event\Event::$eventName = null

Definition at line 38 of file Event.php.

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