Class RegionSectionCache<R>
java.lang.Object
net.minecraft.world.chunk.storage.RegionSectionCache<R>
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
PointOfInterestManager
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet
private final com.mojang.datafixers.DataFixer
private static final org.apache.logging.log4j.Logger
private final DefaultTypeReferences
private final IOWorker
-
Constructor Summary
ConstructorDescriptionRegionSectionCache
(File p_i231897_1_, Function<Runnable, com.mojang.serialization.Codec<R>> p_i231897_2_, Function<Runnable, R> p_i231897_3_, com.mojang.datafixers.DataFixer p_i231897_4_, DefaultTypeReferences p_i231897_5_, boolean p_i231897_6_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
get
(long p_219106_1_) protected R
getOrCreate
(long p_235995_1_) getOrLoad
(long p_219113_1_) private static int
getVersion
(com.mojang.serialization.Dynamic<?> p_235993_0_) protected void
onSectionLoad
(long p_219111_1_) protected boolean
outsideStoredRange
(SectionPos p_219114_1_) private void
readColumn
(ChunkPos p_219107_1_) private <T> void
readColumn
(ChunkPos p_235992_1_, com.mojang.serialization.DynamicOps<T> p_235992_2_, T p_235992_3_) protected void
setDirty
(long p_219116_1_) protected void
tick
(BooleanSupplier p_219115_1_) private CompoundNBT
private void
writeColumn
(ChunkPos p_219117_1_) private <T> com.mojang.serialization.Dynamic<T>
writeColumn
(ChunkPos p_235991_1_, com.mojang.serialization.DynamicOps<T> p_235991_2_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
worker
-
storage
-
dirty
private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet dirty -
codec
-
factory
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
type
-
-
Constructor Details
-
RegionSectionCache
-
-
Method Details
-
tick
-
get
-
getOrLoad
-
outsideStoredRange
-
getOrCreate
-
readColumn
-
tryRead
-
readColumn
private <T> void readColumn(ChunkPos p_235992_1_, com.mojang.serialization.DynamicOps<T> p_235992_2_, @Nullable T p_235992_3_) -
writeColumn
-
writeColumn
private <T> com.mojang.serialization.Dynamic<T> writeColumn(ChunkPos p_235991_1_, com.mojang.serialization.DynamicOps<T> p_235991_2_) -
onSectionLoad
protected void onSectionLoad(long p_219111_1_) -
setDirty
protected void setDirty(long p_219116_1_) -
getVersion
private static int getVersion(com.mojang.serialization.Dynamic<?> p_235993_0_) -
flush
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-