Package net.minecraft.world.storage
Class RegionFile
java.lang.Object
net.minecraft.world.storage.RegionFile
- All Implemented Interfaces:
- AutoCloseable
- Mappings:
- Namespace - Name - official - dfd- intermediary - net/minecraft/class_2861- named - net/minecraft/world/storage/RegionFile
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprivate classprivate static interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final FileChannelprivate final Pathprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final Stringprivate final ByteBufferprivate static final Logger(package private) final ChunkStreamVersionprivate final IntBufferprotected static final intprivate final IntBufferprotected final SectorMapprivate static final ByteBuffer
- 
Constructor SummaryConstructorsConstructorDescriptionRegionFile(Path file, Path directory, boolean dsync) RegionFile(Path file, Path directory, ChunkStreamVersion outputChunkStreamVersion, boolean dsync) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()private @Nullable DataInputStreamdecompress(ChunkPos pos, byte flags, InputStream stream) voidprivate voidprivate static bytegetChunkStreamVersionId(byte flags) private static intprivate PathgetExternalChunkPath(ChunkPos chunkPos) private ByteBufferprivate static intprivate static ByteArrayInputStreamgetInputStream(ByteBuffer buffer, int length) private @Nullable DataInputStreamgetInputStream(ChunkPos pos, byte flags) private static intgetOffset(int sectorData) private static intgetSectorCount(int byteCount) private intgetSectorData(ChunkPos pos) private static intgetSize(int sectorData) booleanprivate static booleanhasChunkStreamVersionId(byte flags) booleanisChunkValid(ChunkPos pos) private intpackSectorData(int offset, int size) voidsync()protected voidwriteChunk(ChunkPos pos, ByteBuffer buf) private voidprivate RegionFile.OutputActionwriteSafely(Path path, ByteBuffer buf) 
- 
Field Details- 
LOGGER- Mappings:
- Namespace - Name - Mixin selector - official - c- Ldfd;c:Lorg/slf4j/Logger;- intermediary - field_20434- Lnet/minecraft/class_2861;field_20434:Lorg/slf4j/Logger;- named - LOGGER- Lnet/minecraft/world/storage/RegionFile;LOGGER:Lorg/slf4j/Logger;
 
- 
field_31418private static final int field_31418- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - d- Ldfd;d:I- intermediary - field_31418- Lnet/minecraft/class_2861;field_31418:I- named - field_31418- Lnet/minecraft/world/storage/RegionFile;field_31418:I
 
- 
SECTOR_DATA_LIMITprotected static final int SECTOR_DATA_LIMIT- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a:I- intermediary - field_31417- Lnet/minecraft/class_2861;field_31417:I- named - SECTOR_DATA_LIMIT- Lnet/minecraft/world/storage/RegionFile;SECTOR_DATA_LIMIT:I
 
- 
field_31419private static final int field_31419- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - e- Ldfd;e:I- intermediary - field_31419- Lnet/minecraft/class_2861;field_31419:I- named - field_31419- Lnet/minecraft/world/storage/RegionFile;field_31419:I
 
- 
field_31420private static final int field_31420- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - f- Ldfd;f:I- intermediary - field_31420- Lnet/minecraft/class_2861;field_31420:I- named - field_31420- Lnet/minecraft/world/storage/RegionFile;field_31420:I
 
- 
ZERO- Mappings:
- Namespace - Name - Mixin selector - official - g- Ldfd;g:Ljava/nio/ByteBuffer;- intermediary - field_20435- Lnet/minecraft/class_2861;field_20435:Ljava/nio/ByteBuffer;- named - ZERO- Lnet/minecraft/world/storage/RegionFile;ZERO:Ljava/nio/ByteBuffer;
 
- 
FILE_EXTENSION- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - h- Ldfd;h:Ljava/lang/String;- intermediary - field_31421- Lnet/minecraft/class_2861;field_31421:Ljava/lang/String;- named - FILE_EXTENSION- Lnet/minecraft/world/storage/RegionFile;FILE_EXTENSION:Ljava/lang/String;
 
- 
field_31422private static final int field_31422- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - i- Ldfd;i:I- intermediary - field_31422- Lnet/minecraft/class_2861;field_31422:I- named - field_31422- Lnet/minecraft/world/storage/RegionFile;field_31422:I
 
- 
field_31423private static final int field_31423- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - j- Ldfd;j:I- intermediary - field_31423- Lnet/minecraft/class_2861;field_31423:I- named - field_31423- Lnet/minecraft/world/storage/RegionFile;field_31423:I
 
- 
field_31424private static final int field_31424- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - k- Ldfd;k:I- intermediary - field_31424- Lnet/minecraft/class_2861;field_31424:I- named - field_31424- Lnet/minecraft/world/storage/RegionFile;field_31424:I
 
- 
channel- Mappings:
- Namespace - Name - Mixin selector - official - l- Ldfd;l:Ljava/nio/channels/FileChannel;- intermediary - field_20436- Lnet/minecraft/class_2861;field_20436:Ljava/nio/channels/FileChannel;- named - channel- Lnet/minecraft/world/storage/RegionFile;channel:Ljava/nio/channels/FileChannel;
 
- 
directory- Mappings:
- Namespace - Name - Mixin selector - official - m- Ldfd;m:Ljava/nio/file/Path;- intermediary - field_20657- Lnet/minecraft/class_2861;field_20657:Ljava/nio/file/Path;- named - directory- Lnet/minecraft/world/storage/RegionFile;directory:Ljava/nio/file/Path;
 
- 
outputChunkStreamVersion- Mappings:
- Namespace - Name - Mixin selector - official - n- Ldfd;n:Ldff;- intermediary - field_20437- Lnet/minecraft/class_2861;field_20437:Lnet/minecraft/class_4486;- named - outputChunkStreamVersion- Lnet/minecraft/world/storage/RegionFile;outputChunkStreamVersion:Lnet/minecraft/world/storage/ChunkStreamVersion;
 
- 
header- Mappings:
- Namespace - Name - Mixin selector - official - o- Ldfd;o:Ljava/nio/ByteBuffer;- intermediary - field_20438- Lnet/minecraft/class_2861;field_20438:Ljava/nio/ByteBuffer;- named - header- Lnet/minecraft/world/storage/RegionFile;header:Ljava/nio/ByteBuffer;
 
- 
sectorData- Mappings:
- Namespace - Name - Mixin selector - official - p- Ldfd;p:Ljava/nio/IntBuffer;- intermediary - field_20439- Lnet/minecraft/class_2861;field_20439:Ljava/nio/IntBuffer;- named - sectorData- Lnet/minecraft/world/storage/RegionFile;sectorData:Ljava/nio/IntBuffer;
 
- 
saveTimes- Mappings:
- Namespace - Name - Mixin selector - official - q- Ldfd;q:Ljava/nio/IntBuffer;- intermediary - field_20440- Lnet/minecraft/class_2861;field_20440:Ljava/nio/IntBuffer;- named - saveTimes- Lnet/minecraft/world/storage/RegionFile;saveTimes:Ljava/nio/IntBuffer;
 
- 
sectors- Mappings:
- Namespace - Name - Mixin selector - official - b- Ldfd;b:Ldfc;- intermediary - field_20441- Lnet/minecraft/class_2861;field_20441:Lnet/minecraft/class_4485;- named - sectors- Lnet/minecraft/world/storage/RegionFile;sectors:Lnet/minecraft/world/storage/SectorMap;
 
 
- 
- 
Constructor Details- 
RegionFile- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Ldfd;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Z)V- intermediary - <init>- Lnet/minecraft/class_2861;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Z)V- named - <init>- Lnet/minecraft/world/storage/RegionFile;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Z)V
 
- 
RegionFilepublic RegionFile(Path file, Path directory, ChunkStreamVersion outputChunkStreamVersion, boolean dsync) throws IOException - Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Ldfd;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Ldff;Z)V- intermediary - <init>- Lnet/minecraft/class_2861;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Lnet/minecraft/class_4486;Z)V- named - <init>- Lnet/minecraft/world/storage/RegionFile;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Lnet/minecraft/world/storage/ChunkStreamVersion;Z)V
 
 
- 
- 
Method Details- 
getExternalChunkPath- Mappings:
- Namespace - Name - Mixin selector - official - f- Ldfd;f(Lclt;)Ljava/nio/file/Path;- intermediary - method_22413- Lnet/minecraft/class_2861;method_22413(Lnet/minecraft/class_1923;)Ljava/nio/file/Path;- named - getExternalChunkPath- Lnet/minecraft/world/storage/RegionFile;getExternalChunkPath(Lnet/minecraft/util/math/ChunkPos;)Ljava/nio/file/Path;
 
- 
getChunkInputStream- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(Lclt;)Ljava/io/DataInputStream;- intermediary - method_21873- Lnet/minecraft/class_2861;method_21873(Lnet/minecraft/class_1923;)Ljava/io/DataInputStream;- named - getChunkInputStream- Lnet/minecraft/world/storage/RegionFile;getChunkInputStream(Lnet/minecraft/util/math/ChunkPos;)Ljava/io/DataInputStream;
 
- 
getEpochTimeSecondsprivate static int getEpochTimeSeconds()- Mappings:
- Namespace - Name - Mixin selector - official - b- Ldfd;b()I- intermediary - method_31739- Lnet/minecraft/class_2861;method_31739()I- named - getEpochTimeSeconds- Lnet/minecraft/world/storage/RegionFile;getEpochTimeSeconds()I
 
- 
hasChunkStreamVersionIdprivate static boolean hasChunkStreamVersionId(byte flags) - Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(B)Z- intermediary - method_22407- Lnet/minecraft/class_2861;method_22407(B)Z- named - hasChunkStreamVersionId- Lnet/minecraft/world/storage/RegionFile;hasChunkStreamVersionId(B)Z
 
- 
getChunkStreamVersionIdprivate static byte getChunkStreamVersionId(byte flags) - Mappings:
- Namespace - Name - Mixin selector - official - b- Ldfd;b(B)B- intermediary - method_22412- Lnet/minecraft/class_2861;method_22412(B)B- named - getChunkStreamVersionId- Lnet/minecraft/world/storage/RegionFile;getChunkStreamVersionId(B)B
 
- 
decompress@Nullable private @Nullable DataInputStream decompress(ChunkPos pos, byte flags, InputStream stream) throws IOException - Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(Lclt;BLjava/io/InputStream;)Ljava/io/DataInputStream;- intermediary - method_22409- Lnet/minecraft/class_2861;method_22409(Lnet/minecraft/class_1923;BLjava/io/InputStream;)Ljava/io/DataInputStream;- named - decompress- Lnet/minecraft/world/storage/RegionFile;decompress(Lnet/minecraft/util/math/ChunkPos;BLjava/io/InputStream;)Ljava/io/DataInputStream;
 
- 
getInputStream@Nullable private @Nullable DataInputStream getInputStream(ChunkPos pos, byte flags) throws IOException - Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(Lclt;B)Ljava/io/DataInputStream;- intermediary - method_22408- Lnet/minecraft/class_2861;method_22408(Lnet/minecraft/class_1923;B)Ljava/io/DataInputStream;- named - getInputStream- Lnet/minecraft/world/storage/RegionFile;getInputStream(Lnet/minecraft/util/math/ChunkPos;B)Ljava/io/DataInputStream;
 
- 
getInputStream- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(Ljava/nio/ByteBuffer;I)Ljava/io/ByteArrayInputStream;- intermediary - method_21876- Lnet/minecraft/class_2861;method_21876(Ljava/nio/ByteBuffer;I)Ljava/io/ByteArrayInputStream;- named - getInputStream- Lnet/minecraft/world/storage/RegionFile;getInputStream(Ljava/nio/ByteBuffer;I)Ljava/io/ByteArrayInputStream;
 
- 
packSectorDataprivate int packSectorData(int offset, int size) - Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(II)I- intermediary - method_21872- Lnet/minecraft/class_2861;method_21872(II)I- named - packSectorData- Lnet/minecraft/world/storage/RegionFile;packSectorData(II)I
 
- 
getSizeprivate static int getSize(int sectorData) - Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(I)I- intermediary - method_21871- Lnet/minecraft/class_2861;method_21871(I)I- named - getSize- Lnet/minecraft/world/storage/RegionFile;getSize(I)I
 
- 
getOffsetprivate static int getOffset(int sectorData) - Mappings:
- Namespace - Name - Mixin selector - official - b- Ldfd;b(I)I- intermediary - method_21878- Lnet/minecraft/class_2861;method_21878(I)I- named - getOffset- Lnet/minecraft/world/storage/RegionFile;getOffset(I)I
 
- 
getSectorCountprivate static int getSectorCount(int byteCount) - Mappings:
- Namespace - Name - Mixin selector - official - c- Ldfd;c(I)I- intermediary - method_21880- Lnet/minecraft/class_2861;method_21880(I)I- named - getSectorCount- Lnet/minecraft/world/storage/RegionFile;getSectorCount(I)I
 
- 
isChunkValid- Mappings:
- Namespace - Name - Mixin selector - official - b- Ldfd;b(Lclt;)Z- intermediary - method_21879- Lnet/minecraft/class_2861;method_21879(Lnet/minecraft/class_1923;)Z- named - isChunkValid- Lnet/minecraft/world/storage/RegionFile;isChunkValid(Lnet/minecraft/util/math/ChunkPos;)Z
 
- 
getChunkOutputStream- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - c- Ldfd;c(Lclt;)Ljava/io/DataOutputStream;- intermediary - method_21881- Lnet/minecraft/class_2861;method_21881(Lnet/minecraft/class_1923;)Ljava/io/DataOutputStream;- named - getChunkOutputStream- Lnet/minecraft/world/storage/RegionFile;getChunkOutputStream(Lnet/minecraft/util/math/ChunkPos;)Ljava/io/DataOutputStream;
 
- 
sync- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a()V- intermediary - method_26981- Lnet/minecraft/class_2861;method_26981()V- named - sync- Lnet/minecraft/world/storage/RegionFile;sync()V
 
- 
delete- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - d- Ldfd;d(Lclt;)V- intermediary - method_31740- Lnet/minecraft/class_2861;method_31740(Lnet/minecraft/class_1923;)V- named - delete- Lnet/minecraft/world/storage/RegionFile;delete(Lnet/minecraft/util/math/ChunkPos;)V
 
- 
writeChunk- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(Lclt;Ljava/nio/ByteBuffer;)V- intermediary - method_21874- Lnet/minecraft/class_2861;method_21874(Lnet/minecraft/class_1923;Ljava/nio/ByteBuffer;)V- named - writeChunk- Lnet/minecraft/world/storage/RegionFile;writeChunk(Lnet/minecraft/util/math/ChunkPos;Ljava/nio/ByteBuffer;)V
 
- 
getHeaderBuf- Mappings:
- Namespace - Name - Mixin selector - official - c- Ldfd;c()Ljava/nio/ByteBuffer;- intermediary - method_22406- Lnet/minecraft/class_2861;method_22406()Ljava/nio/ByteBuffer;- named - getHeaderBuf- Lnet/minecraft/world/storage/RegionFile;getHeaderBuf()Ljava/nio/ByteBuffer;
 
- 
writeSafely- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldfd;a(Ljava/nio/file/Path;Ljava/nio/ByteBuffer;)Ldfd$b;- intermediary - method_22410- Lnet/minecraft/class_2861;method_22410(Ljava/nio/file/Path;Ljava/nio/ByteBuffer;)Lnet/minecraft/class_2861$class_4549;- named - writeSafely- Lnet/minecraft/world/storage/RegionFile;writeSafely(Ljava/nio/file/Path;Ljava/nio/ByteBuffer;)Lnet/minecraft/world/storage/RegionFile$OutputAction;
 
- 
writeHeader- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - d- Ldfd;d()V- intermediary - method_21870- Lnet/minecraft/class_2861;method_21870()V- named - writeHeader- Lnet/minecraft/world/storage/RegionFile;writeHeader()V
 
- 
getSectorData- Mappings:
- Namespace - Name - Mixin selector - official - g- Ldfd;g(Lclt;)I- intermediary - method_12419- Lnet/minecraft/class_2861;method_12419(Lnet/minecraft/class_1923;)I- named - getSectorData- Lnet/minecraft/world/storage/RegionFile;getSectorData(Lnet/minecraft/util/math/ChunkPos;)I
 
- 
hasChunk- Mappings:
- Namespace - Name - Mixin selector - official - e- Ldfd;e(Lclt;)Z- intermediary - method_12423- Lnet/minecraft/class_2861;method_12423(Lnet/minecraft/class_1923;)Z- named - hasChunk- Lnet/minecraft/world/storage/RegionFile;hasChunk(Lnet/minecraft/util/math/ChunkPos;)Z
 
- 
getIndex- Mappings:
- Namespace - Name - Mixin selector - official - h- Ldfd;h(Lclt;)I- intermediary - method_17909- Lnet/minecraft/class_2861;method_17909(Lnet/minecraft/class_1923;)I- named - getIndex- Lnet/minecraft/world/storage/RegionFile;getIndex(Lnet/minecraft/util/math/ChunkPos;)I
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Throws:
- IOException
 
- 
fillLastSector- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - e- Ldfd;e()V- intermediary - method_21877- Lnet/minecraft/class_2861;method_21877()V- named - fillLastSector- Lnet/minecraft/world/storage/RegionFile;fillLastSector()V
 
 
-