Package com.sk89q.worldedit.world.chunk
Class AnvilChunk18
java.lang.Object
com.sk89q.worldedit.world.chunk.AnvilChunk18
- All Implemented Interfaces:
Chunk
The chunk format for Minecraft 1.18 and newer
-
Constructor Summary
ConstructorDescriptionAnvilChunk18
(CompoundTag tag) Deprecated.AnvilChunk18
(CompoundTag tag, Supplier<CompoundTag> entitiesTag) Deprecated.AnvilChunk18
(com.sk89q.worldedit.util.nbt.CompoundBinaryTag tag, Supplier<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> entityTag) Construct the chunk with a compound tag. -
Method Summary
Modifier and TypeMethodDescriptiongetBiome
(BlockVector3 position) Get a biome.getBlock
(BlockVector3 position) Get a block.Get the stored entities.protected void
readBiomes
(BiomeType[] palette, long[] biomesSerialized, BiomeType[] chunkSectionBiomes) protected void
readBlockStates
(BlockState[] palette, long[] blockStatesSerialized, BlockState[] chunkSectionBlocks)
-
Constructor Details
-
AnvilChunk18
Deprecated.Construct the chunk with a compound tag.- Parameters:
tag
- the tag to read- Throws:
DataException
- on a data error
-
AnvilChunk18
@Deprecated public AnvilChunk18(CompoundTag tag, Supplier<CompoundTag> entitiesTag) throws DataException Deprecated.Construct the chunk with a compound tag.- Parameters:
tag
- the tag to read- Throws:
DataException
- on a data error- Since:
- 2.1.0
-
AnvilChunk18
public AnvilChunk18(com.sk89q.worldedit.util.nbt.CompoundBinaryTag tag, Supplier<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> entityTag) throws DataException Construct the chunk with a compound tag.- Parameters:
tag
- the tag to read- Throws:
DataException
- on a data error- Since:
- 2.1.0
-
-
Method Details
-
readBlockStates
protected void readBlockStates(BlockState[] palette, long[] blockStatesSerialized, BlockState[] chunkSectionBlocks) throws InvalidFormatException - Throws:
InvalidFormatException
-
getBlock
Description copied from interface:Chunk
Get a block.- Specified by:
getBlock
in interfaceChunk
- Parameters:
position
- the position of the block- Returns:
- block the block
- Throws:
DataException
- thrown on data error
-
getBiome
Description copied from interface:Chunk
Get a biome.- Specified by:
getBiome
in interfaceChunk
- Parameters:
position
- the position of the block- Returns:
- block the block
- Throws:
DataException
- thrown on data error
-
readBiomes
protected void readBiomes(BiomeType[] palette, long[] biomesSerialized, BiomeType[] chunkSectionBiomes) throws InvalidFormatException - Throws:
InvalidFormatException
-
getEntities
Description copied from interface:Chunk
Get the stored entities.- Specified by:
getEntities
in interfaceChunk
- Returns:
- list of stored entities
- Throws:
DataException
-
AnvilChunk18(CompoundBinaryTag, Supplier)