Class DimensionSavedDataManager


  • public class DimensionSavedDataManager
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.String,​WorldSavedData> cache  
      private java.io.File dataFolder  
      private com.mojang.datafixers.DataFixer fixerUpper  
      private static org.apache.logging.log4j.Logger LOGGER  
    • Constructor Summary

      Constructors 
      Constructor Description
      DimensionSavedDataManager​(java.io.File p_i51279_1_, com.mojang.datafixers.DataFixer p_i51279_2_)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends WorldSavedData>
      T
      computeIfAbsent​(java.util.function.Supplier<T> p_215752_1_, java.lang.String p_215752_2_)  
      <T extends WorldSavedData>
      T
      get​(java.util.function.Supplier<T> p_215753_1_, java.lang.String p_215753_2_)  
      private java.io.File getDataFile​(java.lang.String p_215754_1_)  
      private boolean isGzip​(java.io.PushbackInputStream p_215756_1_)  
      private <T extends WorldSavedData>
      T
      readSavedData​(java.util.function.Supplier<T> p_223409_1_, java.lang.String p_223409_2_)  
      CompoundNBT readTagFromDisk​(java.lang.String p_215755_1_, int p_215755_2_)  
      void save()  
      void set​(WorldSavedData p_215757_1_)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • cache

        private final java.util.Map<java.lang.String,​WorldSavedData> cache
      • fixerUpper

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

        private final java.io.File dataFolder
    • Constructor Detail

      • DimensionSavedDataManager

        public DimensionSavedDataManager​(java.io.File p_i51279_1_,
                                         com.mojang.datafixers.DataFixer p_i51279_2_)
    • Method Detail

      • getDataFile

        private java.io.File getDataFile​(java.lang.String p_215754_1_)
      • computeIfAbsent

        public <T extends WorldSavedData> T computeIfAbsent​(java.util.function.Supplier<T> p_215752_1_,
                                                            java.lang.String p_215752_2_)
      • get

        @Nullable
        public <T extends WorldSavedData> T get​(java.util.function.Supplier<T> p_215753_1_,
                                                java.lang.String p_215753_2_)
      • readSavedData

        @Nullable
        private <T extends WorldSavedData> T readSavedData​(java.util.function.Supplier<T> p_223409_1_,
                                                           java.lang.String p_223409_2_)
      • readTagFromDisk

        public CompoundNBT readTagFromDisk​(java.lang.String p_215755_1_,
                                           int p_215755_2_)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • isGzip

        private boolean isGzip​(java.io.PushbackInputStream p_215756_1_)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • save

        public void save()