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 com.mojang.datafixers.DataFixer
protected final LevelHeightAccessor
private static final org.slf4j.Logger
private static final String
private final DataFixTypes
private final IOWorker
-
Constructor Summary
ConstructorDescriptionSectionStorage
(Path p_196968_, Function<Runnable, com.mojang.serialization.Codec<R>> p_196969_, Function<Runnable, R> p_196970_, com.mojang.datafixers.DataFixer p_196971_, DataFixTypes p_196972_, boolean p_196973_, LevelHeightAccessor p_196974_) -
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 <T> void
readColumn
(ChunkPos p_63802_, com.mojang.serialization.DynamicOps<T> p_63803_, T p_63804_) protected void
setDirty
(long p_63788_) protected void
tick
(BooleanSupplier p_63812_) private 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:
-
worker
-
storage
-
dirty
private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet dirty -
codec
-
factory
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
type
-
levelHeightAccessor
-
-
Constructor Details
-
SectionStorage
public SectionStorage(Path p_196968_, Function<Runnable, com.mojang.serialization.Codec<R>> p_196969_, Function<Runnable, R> p_196970_, com.mojang.datafixers.DataFixer p_196971_, DataFixTypes p_196972_, boolean p_196973_, LevelHeightAccessor p_196974_)
-
-
Method Details
-
tick
-
hasWork
public boolean hasWork() -
get
-
getOrLoad
-
outsideStoredRange
protected boolean outsideStoredRange(long p_156631_) -
getOrCreate
-
readColumn
-
tryRead
-
readColumn
private <T> void readColumn(ChunkPos p_63802_, com.mojang.serialization.DynamicOps<T> p_63803_, @Nullable T p_63804_) -
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
-