public abstract class Palette<E> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Palette.PaletteLayer<E>
Class representation of a layer of a BlockPalette.
|
Constructor and Description |
---|
Palette()
Constructs a blank palette.
|
Modifier and Type | Method and Description |
---|---|
Palette<E> |
add(E m,
int layers)
Adds a material to the palette, for a number of layers.
|
Palette<E> |
add(ProbabilityCollection<E> m,
int layers)
Adds a ProbabilityCollection to the palette, for a number of layers.
|
abstract E |
get(int layer,
int x,
int z)
Fetches a material from the palette, at a given layer.
|
List<Palette.PaletteLayer<E>> |
getLayers() |
int |
getSize() |
public Palette<E> add(E m, int layers)
m
- - The material to add to the palette.layers
- - The number of layers the material occupies.public Palette<E> add(ProbabilityCollection<E> m, int layers)
m
- - The ProbabilityCollection to add to the palette.layers
- - The number of layers the material occupies.public abstract E get(int layer, int x, int z)
layer
- - The layer at which to fetch the material.public int getSize()
public List<Palette.PaletteLayer<E>> getLayers()
Copyright © 2020. All rights reserved.