PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
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 ( )
inherited

Calls event handlers registered for this event.

Exceptions

RuntimeException if event call recursion reaches the max depth limit

Definition at line 49 of file Event.php.

◆ getBlock()

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

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 ( )
finalinherited

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 ( )
staticinherited

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 ( )
inherited

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
protectedinherited

Definition at line 38 of file Event.php.


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