Class Chunk1_18
java.lang.Object
com.viaversion.viaversion.api.minecraft.chunks.Chunk1_18
- All Implemented Interfaces:
Chunk
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<BlockEntity>
protected com.viaversion.nbt.tag.CompoundTag
protected ChunkSection[]
protected final int
protected final int
-
Constructor Summary
ConstructorDescriptionChunk1_18
(int x, int z, ChunkSection[] sections, com.viaversion.nbt.tag.CompoundTag heightMap, List<BlockEntity> blockEntities) -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of block entities.int @Nullable []
Returns the chunk's raw biome data.int
Returns the chunk section bit mask for chunks < 1.17.List<com.viaversion.nbt.tag.CompoundTag>
Returns a list of block entities.@Nullable BitSet
Returns the chunk section bit mask, only non-null for 1.17+ chunks.@Nullable com.viaversion.nbt.tag.CompoundTag
Returns a compoundtag containing the chunk's heightmaps if present.Returns an array of nullable chunk section entries.int
getX()
Returns the chunk x coordinate.int
getZ()
Returns the chunk z coordinate.boolean
Returns whether this chunk holds biome data, always true for 1.17+ chunks.boolean
Returns whether this is a full chunk, always true for 1.17+ chunks.boolean
void
setBiomeData
(int @Nullable [] biomeData) void
setBitmask
(int bitmask) void
setChunkMask
(BitSet chunkSectionMask) void
setHeightMap
(com.viaversion.nbt.tag.CompoundTag heightMap) void
setIgnoreOldLightData
(boolean ignoreOldLightData) void
setSections
(ChunkSection[] sections)
-
Field Details
-
x
protected final int x -
z
protected final int z -
sections
-
heightMap
protected com.viaversion.nbt.tag.CompoundTag heightMap -
blockEntities
-
-
Constructor Details
-
Chunk1_18
public Chunk1_18(int x, int z, ChunkSection[] sections, com.viaversion.nbt.tag.CompoundTag heightMap, List<BlockEntity> blockEntities)
-
-
Method Details
-
isBiomeData
public boolean isBiomeData()Description copied from interface:Chunk
Returns whether this chunk holds biome data, always true for 1.17+ chunks.- Specified by:
isBiomeData
in interfaceChunk
- Returns:
- true if this chunk holds biome data
-
getX
public int getX()Description copied from interface:Chunk
Returns the chunk x coordinate. -
getZ
public int getZ()Description copied from interface:Chunk
Returns the chunk z coordinate. -
isFullChunk
public boolean isFullChunk()Description copied from interface:Chunk
Returns whether this is a full chunk, always true for 1.17+ chunks.- Specified by:
isFullChunk
in interfaceChunk
- Returns:
- true if this is a full chunk
-
isIgnoreOldLightData
public boolean isIgnoreOldLightData()- Specified by:
isIgnoreOldLightData
in interfaceChunk
-
setIgnoreOldLightData
public void setIgnoreOldLightData(boolean ignoreOldLightData) - Specified by:
setIgnoreOldLightData
in interfaceChunk
-
getBitmask
public int getBitmask()Description copied from interface:Chunk
Returns the chunk section bit mask for chunks < 1.17.- Specified by:
getBitmask
in interfaceChunk
- Returns:
- chunk section bit mask for chunks < 1.17
- See Also:
-
setBitmask
public void setBitmask(int bitmask) - Specified by:
setBitmask
in interfaceChunk
-
getChunkMask
Description copied from interface:Chunk
Returns the chunk section bit mask, only non-null for 1.17+ chunks.- Specified by:
getChunkMask
in interfaceChunk
- Returns:
- chunk section bit mask, only non-null for 1.17+ chunks
- See Also:
-
setChunkMask
- Specified by:
setChunkMask
in interfaceChunk
-
getSections
Description copied from interface:Chunk
Returns an array of nullable chunk section entries.- Specified by:
getSections
in interfaceChunk
- Returns:
- array of nullable chunk sections
-
setSections
- Specified by:
setSections
in interfaceChunk
-
getBiomeData
public int @Nullable [] getBiomeData()Description copied from interface:Chunk
Returns the chunk's raw biome data. The format the biomes are stored may vary.- Specified by:
getBiomeData
in interfaceChunk
- Returns:
- raw biome data
-
setBiomeData
public void setBiomeData(int @Nullable [] biomeData) - Specified by:
setBiomeData
in interfaceChunk
-
getHeightMap
public @Nullable com.viaversion.nbt.tag.CompoundTag getHeightMap()Description copied from interface:Chunk
Returns a compoundtag containing the chunk's heightmaps if present.- Specified by:
getHeightMap
in interfaceChunk
- Returns:
- compoundtag containing heightmaps if present
-
setHeightMap
public void setHeightMap(com.viaversion.nbt.tag.CompoundTag heightMap) - Specified by:
setHeightMap
in interfaceChunk
-
getBlockEntities
Description copied from interface:Chunk
Returns a list of block entities.- Specified by:
getBlockEntities
in interfaceChunk
- Returns:
- list of block entities
-
blockEntities
Description copied from interface:Chunk
Returns a list of block entities.- Specified by:
blockEntities
in interfaceChunk
- Returns:
- list of block entities
-