public class ChunkSectionImpl extends java.lang.Object implements ChunkSection
BIOME_SIZE, SIZE
Constructor and Description |
---|
ChunkSectionImpl() |
ChunkSectionImpl(boolean holdsLight) |
ChunkSectionImpl(boolean holdsLight,
int expectedPaletteLength) |
Modifier and Type | Method and Description |
---|---|
void |
addPalette(PaletteType type,
DataPalette palette) |
@Nullable ChunkSectionLight |
getLight()
Returns the light of the chunk section.
|
int |
getNonAirBlocksCount()
Returns the number of non-air blocks in this section.
|
DataPalette |
palette(PaletteType type)
Returns the palette of the given type if present.
|
void |
removePalette(PaletteType type) |
void |
setLight(@Nullable ChunkSectionLight light) |
void |
setNonAirBlocksCount(int nonAirBlocksCount) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPaletteEntry, clearPalette, getBlockData, getBlockWithoutData, getFlatBlock, getFlatBlock, getPaletteEntry, getPaletteIndex, getPaletteSize, hasLight, index, replacePaletteEntry, setBlockWithData, setBlockWithData, setFlatBlock, setFlatBlock, setPaletteEntry, setPaletteIndex, xFromIndex, yFromIndex, zFromIndex
public ChunkSectionImpl()
public ChunkSectionImpl(boolean holdsLight)
public ChunkSectionImpl(boolean holdsLight, int expectedPaletteLength)
public int getNonAirBlocksCount()
ChunkSection
getNonAirBlocksCount
in interface ChunkSection
public void setNonAirBlocksCount(int nonAirBlocksCount)
setNonAirBlocksCount
in interface ChunkSection
public @Nullable ChunkSectionLight getLight()
ChunkSection
getLight
in interface ChunkSection
public void setLight(@Nullable ChunkSectionLight light)
setLight
in interface ChunkSection
public DataPalette palette(PaletteType type)
ChunkSection
palette
in interface ChunkSection
type
- type of the palettepublic void addPalette(PaletteType type, DataPalette palette)
addPalette
in interface ChunkSection
public void removePalette(PaletteType type)
removePalette
in interface ChunkSection