Skip to content

Class endstone::Furnace

ClassList > endstone > Furnace

Represents a captured state of a furnace.

  • #include <endstone/block/furnace.h>

Inherits the following classes: endstone::Container

Public Functions

Type Name
virtual int getBurnTime () const = 0
Gets the burn time.
virtual int getCookTime () const = 0
Gets the cook time.
virtual void setBurnTime (int burn_time) = 0
Sets the burn time.
virtual void setCookTime (int cook_time) = 0
Sets the cook time.

Public Functions inherited from endstone::Container

See endstone::Container

Type Name
virtual Inventory & getInventory () const = 0
Gets the inventory of the block represented by this block state.

Public Functions inherited from endstone::BlockState

See endstone::BlockState

Type Name
virtual std::unique_ptr< Block > getBlock () const = 0
Gets the block represented by this block state.
virtual std::unique_ptr< BlockData > getData () const = 0
Gets the data for this block state.
virtual NotNull< Dimension > getDimension () const = 0
Gets the dimension which contains the block represented by this block state.
virtual Location getLocation () const = 0
Gets the location of this block state.
virtual const BlockType & getType () const = 0
Gets the type of this block state.
virtual int getX () const = 0
Gets the x-coordinate of this block state.
virtual int getY () const = 0
Gets the y-coordinate of this block state.
virtual int getZ () const = 0
Gets the z-coordinate of this block state.
virtual void setData (const BlockData & data) = 0
Sets the data for this block state.
virtual void setType (BlockTypeId type) = 0
Sets the type of this block state.
virtual bool update () = 0
Attempts to update the block represented by this state, setting it to yhe new values as defined by this state.
virtual bool update (bool force) = 0
Attempts to update the block represented by this state, setting it to the new values as defined by this state.
virtual bool update (bool force, bool apply_physics) = 0
Attempts to update the block represented by this state, setting it to the new values as defined by this state.
~BlockState () override

Public Functions inherited from endstone::Object

See endstone::Object

Type Name
T * as ()
Attempts to cast this object to the given type T.
const T * as () const
Attempts to cast this object to the given type T.
virtual const std::type_info & getClassTypeId () const = 0
bool is () const
Checks if this object is an instance of the given type T (or a subclass of T).
virtual bool isInstanceOf (const std::type_info & target) const = 0
virtual ~Object () = default

Public Functions Documentation

function getBurnTime

Gets the burn time.

virtual int endstone::Furnace::getBurnTime () const = 0

This is the number of ticks the current fuel keeps the furnace lit for.

Returns:

the burn time


function getCookTime

Gets the cook time.

virtual int endstone::Furnace::getCookTime () const = 0

This is the amount of time the item has been cooking for.

Returns:

the cook time


function setBurnTime

Sets the burn time.

virtual void endstone::Furnace::setBurnTime (
    int burn_time
) = 0

A burn time greater than 0 will cause this block to be lit, whilst a time less than 0 will extinguish it.

Parameters:

  • burn_time the burn time

function setCookTime

Sets the cook time.

virtual void endstone::Furnace::setCookTime (
    int cook_time
) = 0

This is the amount of time the item has been cooking for.

Parameters:

  • cook_time the cook time


The documentation for this class was generated from the following file include/endstone/block/furnace.h