Class ChunkSerializer
java.lang.Object
net.minecraft.world.level.chunk.storage.ChunkSerializer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate static final com.mojang.serialization.Codec<PalettedContainer<BlockState>> private static final Stringprivate static final Stringstatic final Stringstatic final Stringprivate static final org.slf4j.Loggerstatic final Stringstatic final Stringprivate static final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChunkTypeprivate static ListTaggetListOfCompoundsOrNull(CompoundTag pTag, String pKey) private static voidprivate static com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec(Registry<Biome> pBiomeRegistry) static ListTagpackOffsets(it.unimi.dsi.fastutil.shorts.ShortList[] pList) private static CompoundTagpackStructureData(StructurePieceSerializationContext pContext, ChunkPos pPos, Map<Structure, StructureStart> pStructureMap, Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> pReferenceMap) private static LevelChunk.PostLoadProcessorpostLoadChunk(ServerLevel pLevel, CompoundTag pTag) static ProtoChunkread(ServerLevel pLevel, PoiManager pPoiManager, RegionStorageInfo pRegionStorageInfo, ChunkPos pPos, CompoundTag pTag) private static voidsaveTicks(ServerLevel pLevel, CompoundTag pTag, ChunkAccess.TicksToSave pTicksToSave) unpackStructureReferences(RegistryAccess pRegistryAccess, ChunkPos pPos, CompoundTag pTag) private static Map<Structure, StructureStart> unpackStructureStart(StructurePieceSerializationContext pContext, CompoundTag pTag, long pSeed) static CompoundTagwrite(ServerLevel pLevel, ChunkAccess pChunk)
-
Field Details
-
BLOCK_STATE_CODEC
private static final com.mojang.serialization.Codec<PalettedContainer<BlockState>> BLOCK_STATE_CODEC -
LOGGER
private static final org.slf4j.Logger LOGGER -
TAG_UPGRADE_DATA
- See Also:
-
BLOCK_TICKS_TAG
- See Also:
-
FLUID_TICKS_TAG
- See Also:
-
X_POS_TAG
- See Also:
-
Z_POS_TAG
- See Also:
-
HEIGHTMAPS_TAG
- See Also:
-
IS_LIGHT_ON_TAG
- See Also:
-
SECTIONS_TAG
- See Also:
-
BLOCK_LIGHT_TAG
- See Also:
-
SKY_LIGHT_TAG
- See Also:
-
-
Constructor Details
-
ChunkSerializer
public ChunkSerializer()
-
-
Method Details
-
read
public static ProtoChunk read(ServerLevel pLevel, PoiManager pPoiManager, RegionStorageInfo pRegionStorageInfo, ChunkPos pPos, CompoundTag pTag) -
logErrors
-
makeBiomeCodec
private static com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec(Registry<Biome> pBiomeRegistry) -
write
-
saveTicks
private static void saveTicks(ServerLevel pLevel, CompoundTag pTag, ChunkAccess.TicksToSave pTicksToSave) -
getChunkTypeFromTag
-
postLoadChunk
@Nullable private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel pLevel, CompoundTag pTag) -
getListOfCompoundsOrNull
-
packStructureData
private static CompoundTag packStructureData(StructurePieceSerializationContext pContext, ChunkPos pPos, Map<Structure, StructureStart> pStructureMap, Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> pReferenceMap) -
unpackStructureStart
private static Map<Structure,StructureStart> unpackStructureStart(StructurePieceSerializationContext pContext, CompoundTag pTag, long pSeed) -
unpackStructureReferences
private static Map<Structure,it.unimi.dsi.fastutil.longs.LongSet> unpackStructureReferences(RegistryAccess pRegistryAccess, ChunkPos pPos, CompoundTag pTag) -
packOffsets
-