Class SerializingRegionBasedStorage<R,P>

java.lang.Object
net.minecraft.world.storage.SerializingRegionBasedStorage<R,P>
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
PointOfInterestStorage

public class SerializingRegionBasedStorage<R,P> extends Object implements AutoCloseable
Mappings:
Namespace Name
named net/minecraft/world/storage/SerializingRegionBasedStorage
intermediary net/minecraft/class_4180
official ebj
  • Field Details

    • LOGGER

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/world/storage/SerializingRegionBasedStorage;LOGGER:Lorg/slf4j/Logger;
      intermediary field_18691 Lnet/minecraft/class_4180;field_18691:Lorg/slf4j/Logger;
      official a Lebj;a:Lorg/slf4j/Logger;
    • SECTIONS_KEY

      private static final String SECTIONS_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SECTIONS_KEY Lnet/minecraft/world/storage/SerializingRegionBasedStorage;SECTIONS_KEY:Ljava/lang/String;
      intermediary field_31427 Lnet/minecraft/class_4180;field_31427:Ljava/lang/String;
      official b Lebj;b:Ljava/lang/String;
    • storageAccess

      private final ChunkPosKeyedStorage storageAccess
      Mappings:
      Namespace Name Mixin selector
      named storageAccess Lnet/minecraft/world/storage/SerializingRegionBasedStorage;storageAccess:Lnet/minecraft/world/storage/ChunkPosKeyedStorage;
      intermediary field_48759 Lnet/minecraft/class_4180;field_48759:Lnet/minecraft/class_9172;
      official d Lebj;d:Lebl;
    • loadedElements

      private final Long2ObjectMap<Optional<R>> loadedElements
      Mappings:
      Namespace Name Mixin selector
      named loadedElements Lnet/minecraft/world/storage/SerializingRegionBasedStorage;loadedElements:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
      intermediary field_18692 Lnet/minecraft/class_4180;field_18692:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
      official e Lebj;e:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
    • unsavedElements

      private final LongLinkedOpenHashSet unsavedElements
      Mappings:
      Namespace Name Mixin selector
      named unsavedElements Lnet/minecraft/world/storage/SerializingRegionBasedStorage;unsavedElements:Lit/unimi/dsi/fastutil/longs/LongLinkedOpenHashSet;
      intermediary field_18693 Lnet/minecraft/class_4180;field_18693:Lit/unimi/dsi/fastutil/longs/LongLinkedOpenHashSet;
      official f Lebj;f:Lit/unimi/dsi/fastutil/longs/LongLinkedOpenHashSet;
    • codec

      private final com.mojang.serialization.Codec<P> codec
      Mappings:
      Namespace Name Mixin selector
      named codec Lnet/minecraft/world/storage/SerializingRegionBasedStorage;codec:Lcom/mojang/serialization/Codec;
      intermediary field_24750 Lnet/minecraft/class_4180;field_24750:Lcom/mojang/serialization/Codec;
      official g Lebj;g:Lcom/mojang/serialization/Codec;
    • serializer

      private final Function<R,P> serializer
      Mappings:
      Namespace Name Mixin selector
      named serializer Lnet/minecraft/world/storage/SerializingRegionBasedStorage;serializer:Ljava/util/function/Function;
      intermediary field_52647 Lnet/minecraft/class_4180;field_52647:Ljava/util/function/Function;
      official h Lebj;h:Ljava/util/function/Function;
    • deserializer

      private final BiFunction<P,Runnable,R> deserializer
      Mappings:
      Namespace Name Mixin selector
      named deserializer Lnet/minecraft/world/storage/SerializingRegionBasedStorage;deserializer:Ljava/util/function/BiFunction;
      intermediary field_52648 Lnet/minecraft/class_4180;field_52648:Ljava/util/function/BiFunction;
      official i Lebj;i:Ljava/util/function/BiFunction;
    • factory

      private final Function<Runnable,R> factory
      Mappings:
      Namespace Name Mixin selector
      named factory Lnet/minecraft/world/storage/SerializingRegionBasedStorage;factory:Ljava/util/function/Function;
      intermediary field_18695 Lnet/minecraft/class_4180;field_18695:Ljava/util/function/Function;
      official j Lebj;j:Ljava/util/function/Function;
    • registryManager

      private final DynamicRegistryManager registryManager
      Mappings:
      Namespace Name Mixin selector
      named registryManager Lnet/minecraft/world/storage/SerializingRegionBasedStorage;registryManager:Lnet/minecraft/registry/DynamicRegistryManager;
      intermediary field_39315 Lnet/minecraft/class_4180;field_39315:Lnet/minecraft/class_5455;
      official k Lebj;k:Lke;
    • errorHandler

      private final ChunkErrorHandler errorHandler
      Mappings:
      Namespace Name Mixin selector
      named errorHandler Lnet/minecraft/world/storage/SerializingRegionBasedStorage;errorHandler:Lnet/minecraft/server/world/ChunkErrorHandler;
      intermediary field_52227 Lnet/minecraft/class_4180;field_52227:Lnet/minecraft/class_9820;
      official l Lebj;l:Leax;
    • world

      protected final HeightLimitView world
      Mappings:
      Namespace Name Mixin selector
      named world Lnet/minecraft/world/storage/SerializingRegionBasedStorage;world:Lnet/minecraft/world/HeightLimitView;
      intermediary field_27240 Lnet/minecraft/class_4180;field_27240:Lnet/minecraft/class_5539;
      official c Lebj;c:Ldhj;
    • loadedChunks

      private final LongSet loadedChunks
      Mappings:
      Namespace Name Mixin selector
      named loadedChunks Lnet/minecraft/world/storage/SerializingRegionBasedStorage;loadedChunks:Lit/unimi/dsi/fastutil/longs/LongSet;
      intermediary field_52649 Lnet/minecraft/class_4180;field_52649:Lit/unimi/dsi/fastutil/longs/LongSet;
      official m Lebj;m:Lit/unimi/dsi/fastutil/longs/LongSet;
    • pendingLoads

      Mappings:
      Namespace Name Mixin selector
      named pendingLoads Lnet/minecraft/world/storage/SerializingRegionBasedStorage;pendingLoads:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
      intermediary field_52650 Lnet/minecraft/class_4180;field_52650:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
      official n Lebj;n:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
    • lock

      private final Object lock
      Mappings:
      Namespace Name Mixin selector
      named lock Lnet/minecraft/world/storage/SerializingRegionBasedStorage;lock:Ljava/lang/Object;
      intermediary field_52651 Lnet/minecraft/class_4180;field_52651:Ljava/lang/Object;
      official o Lebj;o:Ljava/lang/Object;
  • Constructor Details

    • SerializingRegionBasedStorage

      public SerializingRegionBasedStorage(ChunkPosKeyedStorage storageAccess, com.mojang.serialization.Codec<P> codec, Function<R,P> serializer, BiFunction<P,Runnable,R> deserializer, Function<Runnable,R> factory, DynamicRegistryManager registryManager, ChunkErrorHandler errorHandler, HeightLimitView world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/world/storage/SerializingRegionBasedStorage;<init>(Lnet/minecraft/world/storage/ChunkPosKeyedStorage;Lcom/mojang/serialization/Codec;Ljava/util/function/Function;Ljava/util/function/BiFunction;Ljava/util/function/Function;Lnet/minecraft/registry/DynamicRegistryManager;Lnet/minecraft/server/world/ChunkErrorHandler;Lnet/minecraft/world/HeightLimitView;)V
      intermediary <init> Lnet/minecraft/class_4180;<init>(Lnet/minecraft/class_9172;Lcom/mojang/serialization/Codec;Ljava/util/function/Function;Ljava/util/function/BiFunction;Ljava/util/function/Function;Lnet/minecraft/class_5455;Lnet/minecraft/class_9820;Lnet/minecraft/class_5539;)V
      official <init> Lebj;<init>(Lebl;Lcom/mojang/serialization/Codec;Ljava/util/function/Function;Ljava/util/function/BiFunction;Ljava/util/function/Function;Lke;Leax;Ldhj;)V
  • Method Details

    • tick

      protected void tick(BooleanSupplier shouldKeepTicking)
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/world/storage/SerializingRegionBasedStorage;tick(Ljava/util/function/BooleanSupplier;)V
      intermediary method_19290 Lnet/minecraft/class_4180;method_19290(Ljava/util/function/BooleanSupplier;)V
      official a Lebj;a(Ljava/util/function/BooleanSupplier;)V
    • tickPendingLoads

      private void tickPendingLoads()
      Mappings:
      Namespace Name Mixin selector
      named tickPendingLoads Lnet/minecraft/world/storage/SerializingRegionBasedStorage;tickPendingLoads()V
      intermediary method_61786 Lnet/minecraft/class_4180;method_61786()V
      official c Lebj;c()V
    • save

      public void save()
      Mappings:
      Namespace Name Mixin selector
      named save Lnet/minecraft/world/storage/SerializingRegionBasedStorage;save()V
      intermediary method_61775 Lnet/minecraft/class_4180;method_61775()V
      official a Lebj;a()V
    • hasUnsavedElements

      public boolean hasUnsavedElements()
      Mappings:
      Namespace Name Mixin selector
      named hasUnsavedElements Lnet/minecraft/world/storage/SerializingRegionBasedStorage;hasUnsavedElements()Z
      intermediary method_40020 Lnet/minecraft/class_4180;method_40020()Z
      official b Lebj;b()Z
    • getIfLoaded

      @Nullable protected @Nullable Optional<R> getIfLoaded(long pos)
      Mappings:
      Namespace Name Mixin selector
      named getIfLoaded Lnet/minecraft/world/storage/SerializingRegionBasedStorage;getIfLoaded(J)Ljava/util/Optional;
      intermediary method_19293 Lnet/minecraft/class_4180;method_19293(J)Ljava/util/Optional;
      official c Lebj;c(J)Ljava/util/Optional;
    • get

      protected Optional<R> get(long pos)
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/world/storage/SerializingRegionBasedStorage;get(J)Ljava/util/Optional;
      intermediary method_19294 Lnet/minecraft/class_4180;method_19294(J)Ljava/util/Optional;
      official d Lebj;d(J)Ljava/util/Optional;
    • isPosInvalid

      protected boolean isPosInvalid(long pos)
      Mappings:
      Namespace Name Mixin selector
      named isPosInvalid Lnet/minecraft/world/storage/SerializingRegionBasedStorage;isPosInvalid(J)Z
      intermediary method_19292 Lnet/minecraft/class_4180;method_19292(J)Z
      official e Lebj;e(J)Z
    • getOrCreate

      protected R getOrCreate(long pos)
      Mappings:
      Namespace Name Mixin selector
      named getOrCreate Lnet/minecraft/world/storage/SerializingRegionBasedStorage;getOrCreate(J)Ljava/lang/Object;
      intermediary method_19295 Lnet/minecraft/class_4180;method_19295(J)Ljava/lang/Object;
      official f Lebj;f(J)Ljava/lang/Object;
    • load

      public CompletableFuture<?> load(ChunkPos chunkPos)
      Mappings:
      Namespace Name Mixin selector
      named load Lnet/minecraft/world/storage/SerializingRegionBasedStorage;load(Lnet/minecraft/util/math/ChunkPos;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_61780 Lnet/minecraft/class_4180;method_61780(Lnet/minecraft/class_1923;)Ljava/util/concurrent/CompletableFuture;
      official a Lebj;a(Ldgn;)Ljava/util/concurrent/CompletableFuture;
    • loadAndWait

      private void loadAndWait(ChunkPos chunkPos)
      Mappings:
      Namespace Name Mixin selector
      named loadAndWait Lnet/minecraft/world/storage/SerializingRegionBasedStorage;loadAndWait(Lnet/minecraft/util/math/ChunkPos;)V
      intermediary method_61787 Lnet/minecraft/class_4180;method_61787(Lnet/minecraft/class_1923;)V
      official c Lebj;c(Ldgn;)V
    • loadNbt

      Mappings:
      Namespace Name Mixin selector
      named loadNbt Lnet/minecraft/world/storage/SerializingRegionBasedStorage;loadNbt(Lnet/minecraft/util/math/ChunkPos;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_20621 Lnet/minecraft/class_4180;method_20621(Lnet/minecraft/class_1923;)Ljava/util/concurrent/CompletableFuture;
      official d Lebj;d(Ldgn;)Ljava/util/concurrent/CompletableFuture;
    • onLoad

      private void onLoad(ChunkPos chunkPos, @Nullable @Nullable SerializingRegionBasedStorage.LoadResult<P> result)
      Mappings:
      Namespace Name Mixin selector
      named onLoad Lnet/minecraft/world/storage/SerializingRegionBasedStorage;onLoad(Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/world/storage/SerializingRegionBasedStorage$LoadResult;)V
      intermediary method_61782 Lnet/minecraft/class_4180;method_61782(Lnet/minecraft/class_1923;Lnet/minecraft/class_4180$class_9897;)V
      official a Lebj;a(Ldgn;Lebj$a;)V
    • save

      private void save(ChunkPos pos)
      Mappings:
      Namespace Name Mixin selector
      named save Lnet/minecraft/world/storage/SerializingRegionBasedStorage;save(Lnet/minecraft/util/math/ChunkPos;)V
      intermediary method_20370 Lnet/minecraft/class_4180;method_20370(Lnet/minecraft/class_1923;)V
      official e Lebj;e(Ldgn;)V
    • serialize

      private <T> com.mojang.serialization.Dynamic<T> serialize(ChunkPos chunkPos, com.mojang.serialization.DynamicOps<T> ops)
      Mappings:
      Namespace Name Mixin selector
      named serialize Lnet/minecraft/world/storage/SerializingRegionBasedStorage;serialize(Lnet/minecraft/util/math/ChunkPos;Lcom/mojang/serialization/DynamicOps;)Lcom/mojang/serialization/Dynamic;
      intermediary method_20367 Lnet/minecraft/class_4180;method_20367(Lnet/minecraft/class_1923;Lcom/mojang/serialization/DynamicOps;)Lcom/mojang/serialization/Dynamic;
      official a Lebj;a(Ldgn;Lcom/mojang/serialization/DynamicOps;)Lcom/mojang/serialization/Dynamic;
    • chunkSectionPosAsLong

      private static long chunkSectionPosAsLong(ChunkPos chunkPos, int y)
      Mappings:
      Namespace Name Mixin selector
      named chunkSectionPosAsLong Lnet/minecraft/world/storage/SerializingRegionBasedStorage;chunkSectionPosAsLong(Lnet/minecraft/util/math/ChunkPos;I)J
      intermediary method_33637 Lnet/minecraft/class_4180;method_33637(Lnet/minecraft/class_1923;I)J
      official a Lebj;a(Ldgn;I)J
    • onLoad

      protected void onLoad(long pos)
      Mappings:
      Namespace Name Mixin selector
      named onLoad Lnet/minecraft/world/storage/SerializingRegionBasedStorage;onLoad(J)V
      intermediary method_19291 Lnet/minecraft/class_4180;method_19291(J)V
      official b Lebj;b(J)V
    • onUpdate

      protected void onUpdate(long pos)
      Mappings:
      Namespace Name Mixin selector
      named onUpdate Lnet/minecraft/world/storage/SerializingRegionBasedStorage;onUpdate(J)V
      intermediary method_19288 Lnet/minecraft/class_4180;method_19288(J)V
      official a Lebj;a(J)V
    • getDataVersion

      static int getDataVersion(com.mojang.serialization.Dynamic<?> dynamic)
      Mappings:
      Namespace Name Mixin selector
      named getDataVersion Lnet/minecraft/world/storage/SerializingRegionBasedStorage;getDataVersion(Lcom/mojang/serialization/Dynamic;)I
      intermediary method_20369 Lnet/minecraft/class_4180;method_20369(Lcom/mojang/serialization/Dynamic;)I
      official a Lebj;a(Lcom/mojang/serialization/Dynamic;)I
    • saveChunk

      public void saveChunk(ChunkPos pos)
      Mappings:
      Namespace Name Mixin selector
      named saveChunk Lnet/minecraft/world/storage/SerializingRegionBasedStorage;saveChunk(Lnet/minecraft/util/math/ChunkPos;)V
      intermediary method_20436 Lnet/minecraft/class_4180;method_20436(Lnet/minecraft/class_1923;)V
      official b Lebj;b(Ldgn;)V
    • close

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