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 pTag, String pKey) private static void
private static com.mojang.serialization.Codec
<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec
(Registry<Biome> p_188261_) static ListTag
packOffsets
(it.unimi.dsi.fastutil.shorts.ShortList[] p_63491_) private static CompoundTag
packStructureData
(StructurePieceSerializationContext pContext, ChunkPos pPos, Map<Structure, StructureStart> pStructureMap, Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> pReferenceMap) private static LevelChunk.PostLoadProcessor
postLoadChunk
(ServerLevel pLevel, CompoundTag pTag) static ProtoChunk
read
(ServerLevel pLevel, PoiManager pPoiManager, RegionStorageInfo pRegionStorageInfo, ChunkPos pPos, CompoundTag pTag) private static void
saveTicks
(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 CompoundTag
write
(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> p_188261_) -
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
-