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 tag, String key) private static voidprivate static com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec(Registry<Biome> biomeRegistry) static ListTagpackOffsets(it.unimi.dsi.fastutil.shorts.ShortList[] list) private static CompoundTagpackStructureData(StructurePieceSerializationContext context, ChunkPos pos, Map<Structure, StructureStart> structureMap, Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> referenceMap) private static LevelChunk.PostLoadProcessorpostLoadChunk(ServerLevel level, CompoundTag tag) static ProtoChunkread(ServerLevel level, PoiManager poiManager, RegionStorageInfo regionStorageInfo, ChunkPos pos, CompoundTag tag) private static voidsaveTicks(ServerLevel level, CompoundTag tag, ChunkAccess.TicksToSave ticksToSave) unpackStructureReferences(RegistryAccess registryAccess, ChunkPos pos, CompoundTag tag) private static Map<Structure, StructureStart> unpackStructureStart(StructurePieceSerializationContext context, CompoundTag tag, long seed) static CompoundTagwrite(ServerLevel level, ChunkAccess chunk)
-
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 level, PoiManager poiManager, RegionStorageInfo regionStorageInfo, ChunkPos pos, CompoundTag tag) -
logErrors
-
makeBiomeCodec
private static com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec(Registry<Biome> biomeRegistry) -
write
-
saveTicks
private static void saveTicks(ServerLevel level, CompoundTag tag, ChunkAccess.TicksToSave ticksToSave) -
getChunkTypeFromTag
-
postLoadChunk
@Nullable private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel level, CompoundTag tag) -
getListOfCompoundsOrNull
-
packStructureData
private static CompoundTag packStructureData(StructurePieceSerializationContext context, ChunkPos pos, Map<Structure, StructureStart> structureMap, Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> referenceMap) -
unpackStructureStart
private static Map<Structure,StructureStart> unpackStructureStart(StructurePieceSerializationContext context, CompoundTag tag, long seed) -
unpackStructureReferences
private static Map<Structure,it.unimi.dsi.fastutil.longs.LongSet> unpackStructureReferences(RegistryAccess registryAccess, ChunkPos pos, CompoundTag tag) -
packOffsets
-