Class PersistentStateManager

java.lang.Object
net.minecraft.world.PersistentStateManager
All Implemented Interfaces:
AutoCloseable

public class PersistentStateManager extends Object implements AutoCloseable
Mappings:
Namespace Name
named net/minecraft/world/PersistentStateManager
intermediary net/minecraft/class_26
official evw
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/world/PersistentStateManager;LOGGER:Lorg/slf4j/Logger;
      intermediary field_136 Lnet/minecraft/class_26;field_136:Lorg/slf4j/Logger;
      official a Levw;a:Lorg/slf4j/Logger;
    • loadedStates

      private final Map<String,Optional<PersistentState>> loadedStates
      Mappings:
      Namespace Name Mixin selector
      named loadedStates Lnet/minecraft/world/PersistentStateManager;loadedStates:Ljava/util/Map;
      intermediary field_134 Lnet/minecraft/class_26;field_134:Ljava/util/Map;
      official b Levw;b:Ljava/util/Map;
    • dataFixer

      private final com.mojang.datafixers.DataFixer dataFixer
      Mappings:
      Namespace Name Mixin selector
      named dataFixer Lnet/minecraft/world/PersistentStateManager;dataFixer:Lcom/mojang/datafixers/DataFixer;
      intermediary field_17663 Lnet/minecraft/class_26;field_17663:Lcom/mojang/datafixers/DataFixer;
      official c Levw;c:Lcom/mojang/datafixers/DataFixer;
    • registries

      private final RegistryWrapper.WrapperLookup registries
      Mappings:
      Namespace Name Mixin selector
      named registries Lnet/minecraft/world/PersistentStateManager;registries:Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;
      intermediary field_48926 Lnet/minecraft/class_26;field_48926:Lnet/minecraft/class_7225$class_7874;
      official d Levw;d:Ljs$a;
    • directory

      private final Path directory
      Mappings:
      Namespace Name Mixin selector
      named directory Lnet/minecraft/world/PersistentStateManager;directory:Ljava/nio/file/Path;
      intermediary field_17664 Lnet/minecraft/class_26;field_17664:Ljava/nio/file/Path;
      official e Levw;e:Ljava/nio/file/Path;
    • savingFuture

      private CompletableFuture<?> savingFuture
      Mappings:
      Namespace Name Mixin selector
      named savingFuture Lnet/minecraft/world/PersistentStateManager;savingFuture:Ljava/util/concurrent/CompletableFuture;
      intermediary field_52688 Lnet/minecraft/class_26;field_52688:Ljava/util/concurrent/CompletableFuture;
      official f Levw;f:Ljava/util/concurrent/CompletableFuture;
  • Constructor Details

    • PersistentStateManager

      public PersistentStateManager(Path directory, com.mojang.datafixers.DataFixer dataFixer, RegistryWrapper.WrapperLookup registries)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/world/PersistentStateManager;<init>(Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
      intermediary <init> Lnet/minecraft/class_26;<init>(Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/class_7225$class_7874;)V
      official <init> Levw;<init>(Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;Ljs$a;)V
  • Method Details

    • getFile

      private Path getFile(String id)
      Mappings:
      Namespace Name Mixin selector
      named getFile Lnet/minecraft/world/PersistentStateManager;getFile(Ljava/lang/String;)Ljava/nio/file/Path;
      intermediary method_17922 Lnet/minecraft/class_26;method_17922(Ljava/lang/String;)Ljava/nio/file/Path;
      official a Levw;a(Ljava/lang/String;)Ljava/nio/file/Path;
    • getOrCreate

      public <T extends PersistentState> T getOrCreate(PersistentState.Type<T> type, String id)
      Mappings:
      Namespace Name Mixin selector
      named getOrCreate Lnet/minecraft/world/PersistentStateManager;getOrCreate(Lnet/minecraft/world/PersistentState$Type;Ljava/lang/String;)Lnet/minecraft/world/PersistentState;
      intermediary method_17924 Lnet/minecraft/class_26;method_17924(Lnet/minecraft/class_18$class_8645;Ljava/lang/String;)Lnet/minecraft/class_18;
      official a Levw;a(Levi$a;Ljava/lang/String;)Levi;
    • get

      @Nullable public <T extends PersistentState> T get(PersistentState.Type<T> type, String id)
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/world/PersistentStateManager;get(Lnet/minecraft/world/PersistentState$Type;Ljava/lang/String;)Lnet/minecraft/world/PersistentState;
      intermediary method_20786 Lnet/minecraft/class_26;method_20786(Lnet/minecraft/class_18$class_8645;Ljava/lang/String;)Lnet/minecraft/class_18;
      official b Levw;b(Levi$a;Ljava/lang/String;)Levi;
    • readFromFile

      @Nullable private <T extends PersistentState> T readFromFile(BiFunction<NbtCompound,RegistryWrapper.WrapperLookup,T> readFunction, DataFixTypes dataFixTypes, String id)
      Mappings:
      Namespace Name Mixin selector
      named readFromFile Lnet/minecraft/world/PersistentStateManager;readFromFile(Ljava/util/function/BiFunction;Lnet/minecraft/datafixer/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/PersistentState;
      intermediary method_120 Lnet/minecraft/class_26;method_120(Ljava/util/function/BiFunction;Lnet/minecraft/class_4284;Ljava/lang/String;)Lnet/minecraft/class_18;
      official a Levw;a(Ljava/util/function/BiFunction;Lbbs;Ljava/lang/String;)Levi;
    • set

      public void set(String id, PersistentState state)
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/world/PersistentStateManager;set(Ljava/lang/String;Lnet/minecraft/world/PersistentState;)V
      intermediary method_123 Lnet/minecraft/class_26;method_123(Ljava/lang/String;Lnet/minecraft/class_18;)V
      official a Levw;a(Ljava/lang/String;Levi;)V
    • readNbt

      public NbtCompound readNbt(String id, DataFixTypes dataFixTypes, int currentSaveVersion) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named readNbt Lnet/minecraft/world/PersistentStateManager;readNbt(Ljava/lang/String;Lnet/minecraft/datafixer/DataFixTypes;I)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_17923 Lnet/minecraft/class_26;method_17923(Ljava/lang/String;Lnet/minecraft/class_4284;I)Lnet/minecraft/class_2487;
      official a Levw;a(Ljava/lang/String;Lbbs;I)Lux;
    • isCompressed

      private boolean isCompressed(PushbackInputStream stream) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named isCompressed Lnet/minecraft/world/PersistentStateManager;isCompressed(Ljava/io/PushbackInputStream;)Z
      intermediary method_17921 Lnet/minecraft/class_26;method_17921(Ljava/io/PushbackInputStream;)Z
      official a Levw;a(Ljava/io/PushbackInputStream;)Z
    • startSaving

      public CompletableFuture<?> startSaving()
      Mappings:
      Namespace Name Mixin selector
      named startSaving Lnet/minecraft/world/PersistentStateManager;startSaving()Ljava/util/concurrent/CompletableFuture;
      intermediary method_61873 Lnet/minecraft/class_26;method_61873()Ljava/util/concurrent/CompletableFuture;
      official a Levw;a()Ljava/util/concurrent/CompletableFuture;
    • collectStatesToSave

      private Map<Path,NbtCompound> collectStatesToSave()
      Mappings:
      Namespace Name Mixin selector
      named collectStatesToSave Lnet/minecraft/world/PersistentStateManager;collectStatesToSave()Ljava/util/Map;
      intermediary method_61881 Lnet/minecraft/class_26;method_61881()Ljava/util/Map;
      official c Levw;c()Ljava/util/Map;
    • save

      private static CompletableFuture<Void> save(Path path, NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named save Lnet/minecraft/world/PersistentStateManager;save(Ljava/nio/file/Path;Lnet/minecraft/nbt/NbtCompound;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_61875 Lnet/minecraft/class_26;method_61875(Ljava/nio/file/Path;Lnet/minecraft/class_2487;)Ljava/util/concurrent/CompletableFuture;
      official a Levw;a(Ljava/nio/file/Path;Lux;)Ljava/util/concurrent/CompletableFuture;
    • save

      public void save()
      Mappings:
      Namespace Name Mixin selector
      named save Lnet/minecraft/world/PersistentStateManager;save()V
      intermediary method_125 Lnet/minecraft/class_26;method_125()V
      official b Levw;b()V
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable