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
ConstructorDescriptionChunkSectionImpl
(boolean holdsLight) ChunkSectionImpl
(boolean holdsLight, int expectedPaletteLength) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPalette
(PaletteType type, DataPalette palette) @Nullable ChunkSectionLight
getLight()
Returns the light of the chunk section.int
Returns the number of non-air blocks in this section.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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ChunkSection
Returns the number of non-air blocks in this section.- Specified by:
getNonAirBlocksCount
in interfaceChunkSection
- Returns:
- non-air blocks in this section
-
setNonAirBlocksCount
public void setNonAirBlocksCount(int nonAirBlocksCount) - Specified by:
setNonAirBlocksCount
in interfaceChunkSection
-
getLight
Description copied from interface:ChunkSection
Returns the light of the chunk section. Only present for < 1.14 chunks, otherwise sent separately.- Specified by:
getLight
in interfaceChunkSection
- Returns:
- chunk section light if present
-
setLight
- Specified by:
setLight
in interfaceChunkSection
-
palette
Description copied from interface:ChunkSection
Returns the palette of the given type if present.- Specified by:
palette
in interfaceChunkSection
- Parameters:
type
- type of the palette- Returns:
- palette
-
addPalette
- Specified by:
addPalette
in interfaceChunkSection
-
removePalette
- Specified by:
removePalette
in interfaceChunkSection
-