Class ChunkSectionImpl
java.lang.Object
com.viaversion.viaversion.api.minecraft.chunks.ChunkSectionImpl
- All Implemented Interfaces:
ChunkSection
-
Field Summary
Fields inherited from interface com.viaversion.viaversion.api.minecraft.chunks.ChunkSection
BIOME_SIZE, SIZE -
Constructor Summary
ConstructorsConstructorDescriptionChunkSectionImpl(boolean holdsLight) ChunkSectionImpl(boolean holdsLight, int expectedPaletteLength) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPalette(PaletteType type, DataPalette palette) @Nullable ChunkSectionLightgetLight()Returns the light of the chunk section.intReturns the number of non-air blocks in this section.palette(PaletteType type) Returns the palette of the given type if present.voidremovePalette(PaletteType type) voidsetLight(@Nullable ChunkSectionLight light) voidsetNonAirBlocksCount(int nonAirBlocksCount) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.viaversion.viaversion.api.minecraft.chunks.ChunkSection
hasLight
-
Constructor Details
-
ChunkSectionImpl
public ChunkSectionImpl() -
ChunkSectionImpl
public ChunkSectionImpl(boolean holdsLight) -
ChunkSectionImpl
public ChunkSectionImpl(boolean holdsLight, int expectedPaletteLength)
-
-
Method Details
-
getNonAirBlocksCount
public int getNonAirBlocksCount()Description copied from interface:ChunkSectionReturns the number of non-air blocks in this section.- Specified by:
getNonAirBlocksCountin interfaceChunkSection- Returns:
- non-air blocks in this section
-
setNonAirBlocksCount
public void setNonAirBlocksCount(int nonAirBlocksCount) - Specified by:
setNonAirBlocksCountin interfaceChunkSection
-
getLight
Description copied from interface:ChunkSectionReturns the light of the chunk section. Only present for < 1.14 chunks, otherwise sent separately.- Specified by:
getLightin interfaceChunkSection- Returns:
- chunk section light if present
-
setLight
- Specified by:
setLightin interfaceChunkSection
-
palette
Description copied from interface:ChunkSectionReturns the palette of the given type if present.- Specified by:
palettein interfaceChunkSection- Parameters:
type- type of the palette- Returns:
- palette
-
addPalette
- Specified by:
addPalettein interfaceChunkSection
-
removePalette
- Specified by:
removePalettein interfaceChunkSection
-