net.minecraft.world.level.chunk.storage

public class SectionStorage<R, P>

implements AutoCloseable

ean
net.minecraft.world.level.chunk.storage.SectionStorage
net.minecraft.class_4180
net.minecraft.world.storage.SerializingRegionBasedStorage
net.minecraft.world.level.chunk.storage.RegionFileSection

Field summary

Modifier and TypeField
static final org.slf4j.Logger
a
LOGGER
field_18691
LOGGER
private static final String
b
SECTIONS_TAG
field_31427
SECTIONS_KEY
private final SimpleRegionStorage
d
simpleRegionStorage
field_48759
storageAccess
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<Optional<R>>
e
storage
field_18692
loadedElements
private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet
f
dirtyChunks
field_18693
unsavedElements
private final com.mojang.serialization.Codec<P>
g
codec
field_24750
codec
private final Function<R, P>
h
packer
field_52647
serializer
private final BiFunction<P, Runnable, R>
i
unpacker
field_52648
deserializer
private final Function<Runnable, R>
j
factory
field_18695
factory
private final RegistryAccess
k
registryAccess
field_39315
registryManager
private final ChunkIOErrorReporter
l
errorReporter
field_52227
errorHandler
protected final LevelHeightAccessor
c
levelHeightAccessor
field_27240
world
private final it.unimi.dsi.fastutil.longs.LongSet
m
loadedChunks
field_52649
loadedChunks
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<CompletableFuture<Optional<SectionStorage$PackedChunk<P>>>>
n
pendingLoads
field_52650
pendingLoads
private final Object
o
loadLock
field_52651
lock

Constructor summary

ModifierConstructor
public (SimpleRegionStorage storageAccess, com.mojang.serialization.Codec<P> codec, Function<R, P> serializer, BiFunction<P, Runnable, R> deserializer, Function<Runnable, R> factory, RegistryAccess registryManager, ChunkIOErrorReporter errorHandler, LevelHeightAccessor world)

Method summary

Modifier and TypeMethod
protected void
a(BooleanSupplier arg0)
tick(BooleanSupplier arg0)
method_19290(BooleanSupplier arg0)
tick(BooleanSupplier shouldKeepTicking)
private void
c()
unpackPendingLoads()
method_61786()
tickPendingLoads()
public void
a()
flushAll()
method_61775()
save()
public boolean
b()
hasWork()
method_40020()
hasUnsavedElements()
protected Optional<R>
c(long arg0)
get(long arg0)
method_19293(long arg0)
getIfLoaded(long pos)
protected Optional<R>
d(long arg0)
getOrLoad(long arg0)
method_19294(long arg0)
get(long pos)
protected boolean
e(long arg0)
outsideStoredRange(long arg0)
method_19292(long arg0)
isPosInvalid(long pos)
protected R
f(long arg0)
getOrCreate(long arg0)
method_19295(long arg0)
getOrCreate(long pos)
public CompletableFuture<?>
a(dfp arg0)
prefetch(ChunkPos arg0)
method_61780(class_1923 arg0)
load(ChunkPos chunkPos)
private void
c(dfp arg0)
unpackChunk(ChunkPos arg0)
method_61787(class_1923 arg0)
loadAndWait(ChunkPos chunkPos)
private CompletableFuture<Optional<SectionStorage$PackedChunk<P>>>
d(dfp arg0)
tryRead(ChunkPos arg0)
method_20621(class_1923 arg0)
loadNbt(ChunkPos chunkPos)
private void
a(dfp arg0, ean$a<P> arg1)
unpackChunk(ChunkPos arg0, SectionStorage$PackedChunk<P> arg1)
method_61782(class_1923 arg0, class_4180$class_9897<P> arg1)
onLoad(ChunkPos chunkPos, SerializingRegionBasedStorage$LoadResult<P> result)
private void
e(dfp arg0)
writeChunk(ChunkPos arg0)
method_20370(class_1923 arg0)
save(ChunkPos pos)
private <T> com.mojang.serialization.Dynamic<T>
a(dfp arg0, com.mojang.serialization.DynamicOps<T> arg1)
writeChunk(ChunkPos arg0, com.mojang.serialization.DynamicOps<T> arg1)
method_20367(class_1923 arg0, com.mojang.serialization.DynamicOps<T> arg1)
serialize(ChunkPos chunkPos, com.mojang.serialization.DynamicOps<T> ops)
private static long
a(dfp arg0, int arg1)
getKey(ChunkPos arg0, int arg1)
method_33637(class_1923 arg0, int arg1)
chunkSectionPosAsLong(ChunkPos chunkPos, int y)
protected void
b(long arg0)
onSectionLoad(long arg0)
method_19291(long arg0)
onLoad(long pos)
protected void
a(long arg0)
setDirty(long arg0)
method_19288(long arg0)
onUpdate(long pos)
static int
a(com.mojang.serialization.Dynamic<?> arg0)
getVersion(com.mojang.serialization.Dynamic<?> arg0)
method_20369(com.mojang.serialization.Dynamic<?> arg0)
getDataVersion(com.mojang.serialization.Dynamic<?> dynamic)
public void
b(dfp arg0)
flush(ChunkPos arg0)
method_20436(class_1923 arg0)
saveChunk(ChunkPos pos)
public void
close()
close()