Skip to main content

Class: ProbabilityBlockPaletteItem

Extends

Constructors

new ProbabilityBlockPaletteItem()

new ProbabilityBlockPaletteItem(displayName?): ProbabilityBlockPaletteItem

Parameters

ParameterType
displayName?string

Returns

ProbabilityBlockPaletteItem

Overrides

IBlockPaletteItem . constructor

Methods

addBlock()

addBlock(block, weight): void

Parameters

ParameterType
blockstring | BlockType | BlockPermutation
weightnumber

Returns

void

Remarks

This function can't be called in read-only mode.

Throws

This function can throw errors.

Error


getBlock()

getBlock(): BlockType

Returns

BlockType

Inherited from

IBlockPaletteItem . getBlock


getDisplayName()

getDisplayName(): string

Returns

string

Inherited from

IBlockPaletteItem . getDisplayName


getType()

getType(): BlockPaletteItemType

Returns

BlockPaletteItemType

Inherited from

IBlockPaletteItem . getType


removeBlockAt()

removeBlockAt(index): void

Parameters

ParameterType
indexnumber

Returns

void

Remarks

This function can't be called in read-only mode.

Throws

This function can throw errors.

minecraftcommon.ArgumentOutOfBoundsError

Error


setBlock()

setBlock(block): void

Parameters

ParameterType
blockstring | BlockType | BlockPermutation

Returns

void

Inherited from

IBlockPaletteItem . setBlock

Remarks

This function can't be called in read-only mode.

Throws

This function can throw errors.

Error