Class ChunkSerializer
java.lang.Object
net.minecraft.world.level.chunk.storage.ChunkSerializer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
private static final com.mojang.serialization.Codec
<PalettedContainer<BlockState>> private static final String
private static final String
static final String
static final String
private static final org.slf4j.Logger
static final String
static final String
private static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChunkType
private static ListTag
getListOfCompoundsOrNull
(CompoundTag tag, String key) private static void
private static com.mojang.serialization.Codec
<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec
(Registry<Biome> biomeRegistry) static ListTag
packOffsets
(it.unimi.dsi.fastutil.shorts.ShortList[] list) private static CompoundTag
packStructureData
(StructurePieceSerializationContext context, ChunkPos pos, Map<Structure, StructureStart> structureMap, Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> referenceMap) private static LevelChunk.PostLoadProcessor
postLoadChunk
(ServerLevel level, CompoundTag tag) static ProtoChunk
read
(ServerLevel level, PoiManager poiManager, RegionStorageInfo regionStorageInfo, ChunkPos pos, CompoundTag tag) private static void
saveTicks
(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 CompoundTag
write
(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
-