public class ChunkSerializer extends Object
Constructor and Description |
---|
ChunkSerializer() |
Modifier and Type | Method and Description |
---|---|
static ProtoChunk |
deserialize(ServerWorld world,
StructureManager structureManager,
PointOfInterestStorage poiStorage,
ChunkPos pos,
CompoundTag tag) |
static ChunkStatus.ChunkType |
getChunkType(CompoundTag tag) |
private static Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> |
readStructureReferences(ChunkPos pos,
CompoundTag tag) |
private static Map<StructureFeature<?>,StructureStart<?>> |
readStructureStarts(StructureManager structureManager,
CompoundTag tag,
long worldSeed) |
static CompoundTag |
serialize(ServerWorld world,
Chunk chunk) |
static ListTag |
toNbt(it.unimi.dsi.fastutil.shorts.ShortList[] lists) |
private static void |
writeEntities(CompoundTag tag,
WorldChunk chunk) |
private static CompoundTag |
writeStructures(ChunkPos pos,
Map<StructureFeature<?>,StructureStart<?>> structureStarts,
Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> structureReferences) |
private static final Logger LOGGER
public static ProtoChunk deserialize(ServerWorld world, StructureManager structureManager, PointOfInterestStorage poiStorage, ChunkPos pos, CompoundTag tag)
public static CompoundTag serialize(ServerWorld world, Chunk chunk)
public static ChunkStatus.ChunkType getChunkType(@Nullable CompoundTag tag)
private static void writeEntities(CompoundTag tag, WorldChunk chunk)
private static CompoundTag writeStructures(ChunkPos pos, Map<StructureFeature<?>,StructureStart<?>> structureStarts, Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> structureReferences)
private static Map<StructureFeature<?>,StructureStart<?>> readStructureStarts(StructureManager structureManager, CompoundTag tag, long worldSeed)
private static Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> readStructureReferences(ChunkPos pos, CompoundTag tag)
public static ListTag toNbt(it.unimi.dsi.fastutil.shorts.ShortList[] lists)