Class RegionFileCache

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public final class RegionFileCache
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Field Detail

      • regionCache

        private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<RegionFile> regionCache
      • folder

        private final java.io.File folder
      • sync

        private final boolean sync
    • Constructor Detail

      • RegionFileCache

        RegionFileCache​(java.io.File p_i231895_1_,
                        boolean p_i231895_2_)
    • Method Detail

      • getRegionFile

        private RegionFile getRegionFile​(ChunkPos p_219098_1_)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        @Nullable
        public CompoundNBT read​(ChunkPos p_219099_1_)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        protected void write​(ChunkPos p_219100_1_,
                             CompoundNBT p_219100_2_)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Throws:
        java.io.IOException