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 it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet
private com.mojang.datafixers.DataFixer
protected LevelHeightAccessor
private static org.apache.logging.log4j.Logger
private static String
private DataFixTypes
private IOWorker
-
Constructor Summary
ConstructorDescriptionSectionStorage(File p_156620_, Function<Runnable,com.mojang.serialization.Codec<R>> p_156621_, Function<Runnable,R> p_156622_, com.mojang.datafixers.DataFixer p_156623_, DataFixTypes p_156624_, boolean p_156625_, LevelHeightAccessor p_156626_)
-
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_)
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.apache.logging.log4j.Logger LOGGER -
SECTIONS_TAG
- See Also:
- Constant Field Values
-
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(File p_156620_, Function<Runnable,com.mojang.serialization.Codec<R>> p_156621_, Function<Runnable,R> p_156622_, com.mojang.datafixers.DataFixer p_156623_, DataFixTypes p_156624_, boolean p_156625_, LevelHeightAccessor p_156626_)
-
-
Method Details
-
tick
-
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
-