Class SectionStorage<R>

java.lang.Object
net.minecraft.world.level.chunk.storage.SectionStorage<R>
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
PoiManager

public class SectionStorage<R> extends Object implements AutoCloseable
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • SECTIONS_TAG

      private static final String SECTIONS_TAG
      See Also:
    • worker

      private final IOWorker worker
    • storage

      private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<Optional<R>> storage
    • dirty

      private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet dirty
    • codec

      private final Function<Runnable,com.mojang.serialization.Codec<R>> codec
    • factory

      private final Function<Runnable,R> factory
    • fixerUpper

      private final com.mojang.datafixers.DataFixer fixerUpper
    • type

      private final DataFixTypes type
    • registryAccess

      private final RegistryAccess registryAccess
    • levelHeightAccessor

      protected final LevelHeightAccessor levelHeightAccessor
  • Constructor Details

  • Method Details

    • tick

      protected void tick(BooleanSupplier p_63812_)
    • hasWork

      public boolean hasWork()
    • get

      @Nullable protected Optional<R> get(long p_63819_)
    • getOrLoad

      protected Optional<R> getOrLoad(long p_63824_)
    • outsideStoredRange

      protected boolean outsideStoredRange(long p_156631_)
    • getOrCreate

      protected R getOrCreate(long p_63828_)
    • readColumn

      private void readColumn(ChunkPos p_63815_)
    • tryRead

      private CompletableFuture<Optional<CompoundTag>> tryRead(ChunkPos p_223533_)
    • readColumn

      private <T> void readColumn(ChunkPos p_63802_, com.mojang.serialization.DynamicOps<T> p_63803_, @Nullable T p_63804_)
    • writeColumn

      private void writeColumn(ChunkPos p_63826_)
    • writeColumn

      private <T> com.mojang.serialization.Dynamic<T> writeColumn(ChunkPos p_63799_, com.mojang.serialization.DynamicOps<T> p_63800_)
    • getKey

      private static long getKey(ChunkPos p_156628_, int p_156629_)
    • 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

      public void flush(ChunkPos p_63797_)
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException