Class SectionStorage<R>
java.lang.Object
net.minecraft.world.level.chunk.storage.SectionStorage<R>
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
PoiManager
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet
private final ChunkIOErrorReporter
protected final LevelHeightAccessor
private static final org.slf4j.Logger
private final RegistryAccess
private static final String
private final SimpleRegionStorage
-
Constructor Summary
ConstructorDescriptionSectionStorage
(SimpleRegionStorage p_335141_, Function<Runnable, com.mojang.serialization.Codec<R>> p_223510_, Function<Runnable, R> p_223511_, RegistryAccess p_223515_, ChunkIOErrorReporter p_345160_, LevelHeightAccessor p_223516_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
get
(long p_63819_) private static long
protected R
getOrCreate
(long p_63828_) getOrLoad
(long p_63824_) private static int
getVersion
(com.mojang.serialization.Dynamic<?> p_63806_) boolean
hasWork()
protected void
onSectionLoad
(long p_63813_) protected boolean
outsideStoredRange
(long p_156631_) private void
readColumn
(ChunkPos p_63815_) private void
readColumn
(ChunkPos p_63802_, RegistryOps<Tag> p_331342_, CompoundTag p_329050_) protected void
setDirty
(long p_63788_) protected void
tick
(BooleanSupplier p_63812_) private CompletableFuture
<Optional<CompoundTag>> private void
writeColumn
(ChunkPos p_63826_) private <T> com.mojang.serialization.Dynamic
<T> writeColumn
(ChunkPos p_63799_, com.mojang.serialization.DynamicOps<T> p_63800_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
SECTIONS_TAG
- See Also:
-
simpleRegionStorage
-
storage
-
dirty
private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet dirty -
codec
-
factory
-
registryAccess
-
errorReporter
-
levelHeightAccessor
-
-
Constructor Details
-
SectionStorage
public SectionStorage(SimpleRegionStorage p_335141_, Function<Runnable, com.mojang.serialization.Codec<R>> p_223510_, Function<Runnable, R> p_223511_, RegistryAccess p_223515_, ChunkIOErrorReporter p_345160_, LevelHeightAccessor p_223516_)
-
-
Method Details
-
tick
-
hasWork
public boolean hasWork() -
get
-
getOrLoad
-
outsideStoredRange
protected boolean outsideStoredRange(long p_156631_) -
getOrCreate
-
readColumn
-
tryRead
-
readColumn
private void readColumn(ChunkPos p_63802_, RegistryOps<Tag> p_331342_, @Nullable CompoundTag p_329050_) -
writeColumn
-
writeColumn
private <T> com.mojang.serialization.Dynamic<T> writeColumn(ChunkPos p_63799_, com.mojang.serialization.DynamicOps<T> p_63800_) -
getKey
-
onSectionLoad
protected void onSectionLoad(long p_63813_) -
setDirty
protected void setDirty(long p_63788_) -
getVersion
private static int getVersion(com.mojang.serialization.Dynamic<?> p_63806_) -
flush
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-