FurnaceBurnEvent
extends BlockEvent
in package
implements
Cancellable
Uses
CancellableTrait
Called when a furnace is about to consume a new fuel item.
Interfaces, Classes, Traits and Enums
- Cancellable
- This interface is implemented by an Event subclass if and only if it can be cancelled.
Table of Contents
- MAX_EVENT_CALL_DEPTH = 50
- $block : Block
- $eventName : string|null
- $burning : bool
- $burnTime : int
- $eventCallDepth : int
- $fuel : Item
- $furnace : Furnace
- $isCancelled : bool
- __construct() : mixed
- call() : void
- Calls event handlers registered for this event.
- cancel() : void
- getBlock() : Block
- getBurnTime() : int
- Returns the number of ticks that the furnace will be powered for.
- getEventName() : string
- getFuel() : Item
- getFurnace() : Furnace
- isBurning() : bool
- Returns whether the fuel item will be consumed.
- isCancelled() : bool
- setBurning() : void
- Sets whether the fuel will be consumed. If false, the furnace will smelt as if it consumed fuel, but no fuel will be deducted.
- setBurnTime() : void
- Sets the number of ticks that the given fuel will power the furnace for.
- uncancel() : void
Constants
MAX_EVENT_CALL_DEPTH
private
mixed
MAX_EVENT_CALL_DEPTH
= 50
Properties
$block
protected
Block
$block
$eventName
protected
string|null
$eventName
= null
$burning
private
bool
$burning
= true
$burnTime
private
int
$burnTime
$eventCallDepth
private
static int
$eventCallDepth
= 1
$fuel
private
Item
$fuel
$furnace
private
Furnace
$furnace
$isCancelled
private
bool
$isCancelled
= false
Methods
__construct()
public
__construct(Furnace $furnace, Item $fuel, int $burnTime) : mixed
Parameters
Return values
mixed —call()
Calls event handlers registered for this event.
public
call() : void
Tags
Return values
void —cancel()
public
cancel() : void
Return values
void —getBlock()
public
getBlock() : Block
Return values
Block —getBurnTime()
Returns the number of ticks that the furnace will be powered for.
public
getBurnTime() : int
Return values
int —getEventName()
public
final getEventName() : string
Return values
string —getFuel()
public
getFuel() : Item
Return values
Item —getFurnace()
public
getFurnace() : Furnace
Return values
Furnace —isBurning()
Returns whether the fuel item will be consumed.
public
isBurning() : bool
Return values
bool —isCancelled()
public
isCancelled() : bool
Return values
bool —setBurning()
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
setBurning(bool $burning) : void
Parameters
- $burning : bool
Return values
void —setBurnTime()
Sets the number of ticks that the given fuel will power the furnace for.
public
setBurnTime(int $burnTime) : void
Parameters
- $burnTime : int
Return values
void —uncancel()
public
uncancel() : void