Class ChunkStoreHelper
java.lang.Object
com.sk89q.worldedit.world.storage.ChunkStoreHelper
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Chunk
getChunk
(CompoundTag rootTag) Convert a chunk NBT tag into aChunk
implementation.static Chunk
getChunk
(CompoundTag rootTag, Supplier<CompoundTag> entitiesTag) Convert a chunk NBT tag into aChunk
implementation.static CompoundTag
-
Method Details
-
readCompoundTag
public static CompoundTag readCompoundTag(ChunkStoreHelper.ChunkDataInputSupplier input) throws DataException, IOException - Throws:
DataException
IOException
-
getChunk
Convert a chunk NBT tag into aChunk
implementation.- Parameters:
rootTag
- the root tag of the chunk- Returns:
- a Chunk implementation
- Throws:
DataException
- if the rootTag is not valid chunk data
-
getChunk
public static Chunk getChunk(CompoundTag rootTag, Supplier<CompoundTag> entitiesTag) throws DataException Convert a chunk NBT tag into aChunk
implementation.- Parameters:
rootTag
- the root tag of the chunkentitiesTag
- supplier to provide entities tag. Only required for 1.17+ where entities are stored in a separate location- Returns:
- a Chunk implementation
- Throws:
DataException
- if the rootTag is not valid chunk data- Since:
- 2.1.0
-