Skip to content

API reference / @jsprismarine/prismarine / blockentity/BlockEntities / Furnace

Class: Furnace ​

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:83

Extends ​

  • Container

Properties ​

constructor ​

constructor: typeof BlockEntity

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:23

TypeScript types this.constructor as Function. Declaring it as the class itself lets BlockEntity.getId read the static ID the subclass set. Emits nothing.

Inherited from ​

Container.constructor


position ​

readonly position: Vector3

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:28

Inherited from ​

Container.position


ID ​

readonly static ID: "Furnace" = 'Furnace'

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:84

Vanilla's id string - Chest, Sign, Furnace. Not a namespaced identifier.

Overrides ​

Container.ID

Methods ​

canReuseSerialization() ​

canReuseSerialization(): boolean

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:53

Whether a caller can safely reuse a previously serialized form of this block entity. Mutable getters and setters disable reuse because their changes cannot be observed here.

Returns ​

boolean

Inherited from ​

Container.canReuseSerialization


getBurnDuration() ​

getBurnDuration(): number

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:114

The initial fuel time used to draw the flame fraction on a furnace screen.

Returns ​

number


getBurnTime() ​

getBurnTime(): number

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:105

Returns ​

number


getCookTime() ​

getCookTime(): number

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:109

Returns ​

number


getCustomName() ​

getCustomName(): string | null

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:34

A container's display name, when the player has renamed it in an anvil.

Returns ​

string | null

Inherited from ​

Container.getCustomName


getId() ​

getId(): string

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:41

Returns ​

string

Inherited from ​

Container.getId


getItems() ​

getItems(): Set<NBTTagCompound>

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:21

Returns ​

Set<NBTTagCompound>

Inherited from ​

Container.getItems


getPosition() ​

getPosition(): Vector3

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:45

Returns ​

Vector3

Inherited from ​

Container.getPosition


isEmpty() ​

isEmpty(): boolean

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:29

Returns ​

boolean

Inherited from ​

Container.isEmpty


isLit() ​

isLit(): boolean

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:118

Returns ​

boolean


isMovable() ​

isMovable(): boolean

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:63

Whether a piston may push this. Vanilla stores it on every block entity.

Returns ​

boolean

Inherited from ​

Container.isMovable


toNBT() ​

toNBT(): NBTTagCompound

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:122

The compound to write back: the untouched remainder, then the fields this class models. Subclasses override, call super.toNBT(), and add theirs to the result.

Returns ​

NBTTagCompound

Overrides ​

Container.toNBT


fromNBT() ​

static fromNBT(nbt): Furnace

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:95

Parameters ​

nbt ​

NBTTagCompound

Returns ​

Furnace