Palette
for improved generics@Deprecated public interface BlockPalette extends Palette<BlockState>
Modifier and Type | Method and Description |
---|---|
Optional<Integer> |
get(BlockState state)
Deprecated.
Gets the identifier for the given blockstate if it exists within the
mapping.
|
Optional<BlockState> |
get(int id)
Deprecated.
Gets the blockstate represented by the given identifier from the mapping.
|
Collection<BlockState> |
getEntries()
Deprecated.
Gets all
BlockState s contained in this palette. |
int |
getHighestId()
Deprecated.
Gets the highest identifier in this palette.
|
int |
getOrAssign(BlockState state)
Deprecated.
Gets the identifier for the given blockstate from the mapping.
|
BlockPaletteType |
getType()
Deprecated.
Gets the type of this palette.
|
boolean |
remove(BlockState state)
Deprecated.
Removes the given blockstate from the mapping.
|
BlockPaletteType getType()
getType
in interface Palette<BlockState>
int getHighestId()
getHighestId
in interface Palette<BlockState>
Optional<BlockState> get(int id)
get
in interface Palette<BlockState>
id
- The identifierOptional<Integer> get(BlockState state)
get
in interface Palette<BlockState>
state
- The block stateint getOrAssign(BlockState state)
getOrAssign
in interface Palette<BlockState>
state
- The blockstateboolean remove(BlockState state)
If this palette is the BlockPaletteTypes.GLOBAL
palette then
removal is not supported.
remove
in interface Palette<BlockState>
state
- The blockstate to removeCollection<BlockState> getEntries()
BlockState
s contained in this palette.getEntries
in interface Palette<BlockState>