Class RegionFileCache
- java.lang.Object
-
- net.minecraft.world.chunk.storage.RegionFileCache
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public final class RegionFileCache extends java.lang.Object implements java.lang.AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
folder
private it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<RegionFile>
regionCache
private boolean
sync
-
Constructor Summary
Constructors Constructor Description RegionFileCache(java.io.File p_i231895_1_, boolean p_i231895_2_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
private RegionFile
getRegionFile(ChunkPos p_219098_1_)
CompoundNBT
read(ChunkPos p_219099_1_)
protected void
write(ChunkPos p_219100_1_, CompoundNBT p_219100_2_)
-
-
-
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
-
-
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 interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Throws:
java.io.IOException
-
-