Record Class SerializableChunkData
java.lang.Object
java.lang.Record
net.minecraft.world.level.chunk.storage.SerializableChunkData
public record SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, @Nullable BlendingData.Packed blendingData, @Nullable BelowZeroRetrogen belowZeroRetrogen, UpgradeData upgradeData, @Nullable long[] carvingMask, Map<Heightmap.Types,long[]> heightmaps, ChunkAccess.PackedTicks packedTicks, it.unimi.dsi.fastutil.shorts.ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.SectionData> sectionData, List<CompoundTag> entities, List<CompoundTag> blockEntities, CompoundTag structureData, @Nullable CompoundTag attachmentData, @Nullable ListTag auxLightData)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CompoundTag
The field for theattachmentData
record component.private final ListTag
The field for theauxLightData
record component.private final BelowZeroRetrogen
The field for thebelowZeroRetrogen
record component.The field for thebiomeRegistry
record component.private final BlendingData.Packed
The field for theblendingData
record component.static final String
private static final com.mojang.serialization.Codec
<PalettedContainer<BlockState>> private static final String
private final List
<CompoundTag> The field for theblockEntities
record component.private final long[]
The field for thecarvingMask
record component.private final ChunkPos
The field for thechunkPos
record component.private final ChunkStatus
The field for thechunkStatus
record component.private final List
<CompoundTag> The field for theentities
record component.private static final String
private final Map
<Heightmap.Types, long[]> The field for theheightmaps
record component.static final String
private final long
The field for theinhabitedTime
record component.static final String
private final long
The field for thelastUpdateTime
record component.private final boolean
The field for thelightCorrect
record component.private static final org.slf4j.Logger
private final int
The field for theminSectionY
record component.private final ChunkAccess.PackedTicks
The field for thepackedTicks
record component.private final it.unimi.dsi.fastutil.shorts.ShortList[]
The field for thepostProcessingSections
record component.private final List
<SerializableChunkData.SectionData> The field for thesectionData
record component.static final String
static final String
private final CompoundTag
The field for thestructureData
record component.private static final String
private final UpgradeData
The field for theupgradeData
record component.static final String
static final String
-
Constructor Summary
ConstructorsConstructorDescriptionSerializableChunkData
(Registry<Biome> biomeRegistry, ChunkPos chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, BlendingData.Packed blendingData, BelowZeroRetrogen belowZeroRetrogen, UpgradeData upgradeData, long[] carvingMask, Map<Heightmap.Types, long[]> heightmaps, ChunkAccess.PackedTicks packedTicks, it.unimi.dsi.fastutil.shorts.ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.SectionData> sectionData, List<CompoundTag> entities, List<CompoundTag> blockEntities, CompoundTag structureData) Deprecated.Neo: use constructor with additional data insteadSerializableChunkData
(Registry<Biome> biomeRegistry, ChunkPos chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, BlendingData.Packed blendingData, BelowZeroRetrogen belowZeroRetrogen, UpgradeData upgradeData, long[] carvingMask, Map<Heightmap.Types, long[]> heightmaps, ChunkAccess.PackedTicks packedTicks, it.unimi.dsi.fastutil.shorts.ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.SectionData> sectionData, List<CompoundTag> entities, List<CompoundTag> blockEntities, CompoundTag structureData, CompoundTag attachmentData, ListTag auxLightData) Creates an instance of aSerializableChunkData
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachmentData
record component.Returns the value of theauxLightData
record component.Returns the value of thebelowZeroRetrogen
record component.Returns the value of thebiomeRegistry
record component.Returns the value of theblendingData
record component.Returns the value of theblockEntities
record component.long[]
Returns the value of thecarvingMask
record component.chunkPos()
Returns the value of thechunkPos
record component.Returns the value of thechunkStatus
record component.static SerializableChunkData
copyOf
(ServerLevel p_365319_, ChunkAccess p_362284_) entities()
Returns the value of theentities
record component.final boolean
Indicates whether some other object is "equal to" this one.static ChunkStatus
getChunkStatusFromTag
(CompoundTag p_405768_) final int
hashCode()
Returns a hash code value for this object.Map
<Heightmap.Types, long[]> Returns the value of theheightmaps
record component.long
Returns the value of theinhabitedTime
record component.long
Returns the value of thelastUpdateTime
record component.boolean
Returns the value of thelightCorrect
record component.private static void
private static com.mojang.serialization.Codec
<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec
(Registry<Biome> p_364562_) int
Returns the value of theminSectionY
record component.Returns the value of thepackedTicks
record component.private static ListTag
packOffsets
(it.unimi.dsi.fastutil.shorts.ShortList[] p_364852_) private static CompoundTag
packStructureData
(StructurePieceSerializationContext p_361063_, ChunkPos p_365377_, Map<Structure, StructureStart> p_365385_, Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> p_362410_) static SerializableChunkData
parse
(LevelHeightAccessor p_361938_, RegistryAccess p_365010_, CompoundTag p_362040_) private static LevelChunk.PostLoadProcessor
postLoadChunk
(ServerLevel p_363005_, List<CompoundTag> p_362405_, List<CompoundTag> p_364156_) it.unimi.dsi.fastutil.shorts.ShortList[]
Returns the value of thepostProcessingSections
record component.read
(ServerLevel p_360452_, PoiManager p_364451_, RegionStorageInfo p_364971_, ChunkPos p_360628_) private static void
saveTicks
(CompoundTag p_362920_, ChunkAccess.PackedTicks p_361228_) Returns the value of thesectionData
record component.Returns the value of thestructureData
record component.final String
toString()
Returns a string representation of this record class.unpackStructureReferences
(RegistryAccess p_360856_, ChunkPos p_362116_, CompoundTag p_360575_) private static Map
<Structure, StructureStart> unpackStructureStart
(StructurePieceSerializationContext p_360982_, CompoundTag p_363682_, long p_362695_) Returns the value of theupgradeData
record component.write()
-
Field Details
-
biomeRegistry
The field for thebiomeRegistry
record component. -
chunkPos
The field for thechunkPos
record component. -
minSectionY
private final int minSectionYThe field for theminSectionY
record component. -
lastUpdateTime
private final long lastUpdateTimeThe field for thelastUpdateTime
record component. -
inhabitedTime
private final long inhabitedTimeThe field for theinhabitedTime
record component. -
chunkStatus
The field for thechunkStatus
record component. -
blendingData
The field for theblendingData
record component. -
belowZeroRetrogen
The field for thebelowZeroRetrogen
record component. -
upgradeData
The field for theupgradeData
record component. -
carvingMask
@Nullable private final long[] carvingMaskThe field for thecarvingMask
record component. -
heightmaps
The field for theheightmaps
record component. -
packedTicks
The field for thepackedTicks
record component. -
postProcessingSections
private final it.unimi.dsi.fastutil.shorts.ShortList[] postProcessingSectionsThe field for thepostProcessingSections
record component. -
lightCorrect
private final boolean lightCorrectThe field for thelightCorrect
record component. -
sectionData
The field for thesectionData
record component. -
entities
The field for theentities
record component. -
blockEntities
The field for theblockEntities
record component. -
structureData
The field for thestructureData
record component. -
attachmentData
The field for theattachmentData
record component. -
auxLightData
The field for theauxLightData
record component. -
BLOCK_STATE_CODEC
private static final com.mojang.serialization.Codec<PalettedContainer<BlockState>> BLOCK_STATE_CODEC -
BLOCK_TICKS_CODEC
-
FLUID_TICKS_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
-
SerializableChunkData
@Deprecated SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, @Nullable BlendingData.Packed blendingData, @Nullable BelowZeroRetrogen belowZeroRetrogen, UpgradeData upgradeData, @Nullable long[] carvingMask, Map<Heightmap.Types, long[]> heightmaps, ChunkAccess.PackedTicks packedTicks, it.unimi.dsi.fastutil.shorts.ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.SectionData> sectionData, List<CompoundTag> entities, List<CompoundTag> blockEntities, CompoundTag structureData) Deprecated.Neo: use constructor with additional data instead -
SerializableChunkData
public SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, @Nullable BlendingData.Packed blendingData, @Nullable BelowZeroRetrogen belowZeroRetrogen, UpgradeData upgradeData, @Nullable long[] carvingMask, Map<Heightmap.Types, long[]> heightmaps, ChunkAccess.PackedTicks packedTicks, it.unimi.dsi.fastutil.shorts.ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.SectionData> sectionData, List<CompoundTag> entities, List<CompoundTag> blockEntities, CompoundTag structureData, @Nullable CompoundTag attachmentData, @Nullable ListTag auxLightData) Creates an instance of aSerializableChunkData
record class.- Parameters:
biomeRegistry
- the value for thebiomeRegistry
record componentchunkPos
- the value for thechunkPos
record componentminSectionY
- the value for theminSectionY
record componentlastUpdateTime
- the value for thelastUpdateTime
record componentinhabitedTime
- the value for theinhabitedTime
record componentchunkStatus
- the value for thechunkStatus
record componentblendingData
- the value for theblendingData
record componentbelowZeroRetrogen
- the value for thebelowZeroRetrogen
record componentupgradeData
- the value for theupgradeData
record componentcarvingMask
- the value for thecarvingMask
record componentheightmaps
- the value for theheightmaps
record componentpackedTicks
- the value for thepackedTicks
record componentpostProcessingSections
- the value for thepostProcessingSections
record componentlightCorrect
- the value for thelightCorrect
record componentsectionData
- the value for thesectionData
record componententities
- the value for theentities
record componentblockEntities
- the value for theblockEntities
record componentstructureData
- the value for thestructureData
record componentattachmentData
- the value for theattachmentData
record componentauxLightData
- the value for theauxLightData
record component
-
-
Method Details
-
parse
@Nullable public static SerializableChunkData parse(LevelHeightAccessor p_361938_, RegistryAccess p_365010_, CompoundTag p_362040_) -
read
public ProtoChunk read(ServerLevel p_360452_, PoiManager p_364451_, RegionStorageInfo p_364971_, ChunkPos p_360628_) -
logErrors
-
makeBiomeCodec
private static com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec(Registry<Biome> p_364562_) -
copyOf
-
write
-
saveTicks
-
getChunkStatusFromTag
-
postLoadChunk
@Nullable private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel p_363005_, List<CompoundTag> p_362405_, List<CompoundTag> p_364156_) -
packStructureData
private static CompoundTag packStructureData(StructurePieceSerializationContext p_361063_, ChunkPos p_365377_, Map<Structure, StructureStart> p_365385_, Map<Structure, it.unimi.dsi.fastutil.longs.LongSet> p_362410_) -
unpackStructureStart
private static Map<Structure,StructureStart> unpackStructureStart(StructurePieceSerializationContext p_360982_, CompoundTag p_363682_, long p_362695_) -
unpackStructureReferences
private static Map<Structure,it.unimi.dsi.fastutil.longs.LongSet> unpackStructureReferences(RegistryAccess p_360856_, ChunkPos p_362116_, CompoundTag p_360575_) -
packOffsets
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
biomeRegistry
Returns the value of thebiomeRegistry
record component.- Returns:
- the value of the
biomeRegistry
record component
-
chunkPos
Returns the value of thechunkPos
record component.- Returns:
- the value of the
chunkPos
record component
-
minSectionY
public int minSectionY()Returns the value of theminSectionY
record component.- Returns:
- the value of the
minSectionY
record component
-
lastUpdateTime
public long lastUpdateTime()Returns the value of thelastUpdateTime
record component.- Returns:
- the value of the
lastUpdateTime
record component
-
inhabitedTime
public long inhabitedTime()Returns the value of theinhabitedTime
record component.- Returns:
- the value of the
inhabitedTime
record component
-
chunkStatus
Returns the value of thechunkStatus
record component.- Returns:
- the value of the
chunkStatus
record component
-
blendingData
Returns the value of theblendingData
record component.- Returns:
- the value of the
blendingData
record component
-
belowZeroRetrogen
Returns the value of thebelowZeroRetrogen
record component.- Returns:
- the value of the
belowZeroRetrogen
record component
-
upgradeData
Returns the value of theupgradeData
record component.- Returns:
- the value of the
upgradeData
record component
-
carvingMask
@Nullable public long[] carvingMask()Returns the value of thecarvingMask
record component.- Returns:
- the value of the
carvingMask
record component
-
heightmaps
Returns the value of theheightmaps
record component.- Returns:
- the value of the
heightmaps
record component
-
packedTicks
Returns the value of thepackedTicks
record component.- Returns:
- the value of the
packedTicks
record component
-
postProcessingSections
public it.unimi.dsi.fastutil.shorts.ShortList[] postProcessingSections()Returns the value of thepostProcessingSections
record component.- Returns:
- the value of the
postProcessingSections
record component
-
lightCorrect
public boolean lightCorrect()Returns the value of thelightCorrect
record component.- Returns:
- the value of the
lightCorrect
record component
-
sectionData
Returns the value of thesectionData
record component.- Returns:
- the value of the
sectionData
record component
-
entities
Returns the value of theentities
record component.- Returns:
- the value of the
entities
record component
-
blockEntities
Returns the value of theblockEntities
record component.- Returns:
- the value of the
blockEntities
record component
-
structureData
Returns the value of thestructureData
record component.- Returns:
- the value of the
structureData
record component
-
attachmentData
Returns the value of theattachmentData
record component.- Returns:
- the value of the
attachmentData
record component
-
auxLightData
Returns the value of theauxLightData
record component.- Returns:
- the value of the
auxLightData
record component
-