Package net.minecraft.world.storage
Class RegionFile
java.lang.Object
net.minecraft.world.storage.RegionFile
- All Implemented Interfaces:
AutoCloseable
- Mappings:
Namespace Name official dauintermediary net/minecraft/class_2861named net/minecraft/world/storage/RegionFile
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FileChannelprivate final Pathprotected static final intprivate 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 IntBufferprivate final IntBufferprotected final SectorMapprivate static final ByteBuffer -
Constructor Summary
ConstructorsConstructorDescriptionRegionFile(Path file, Path directory, boolean dsync) RegionFile(Path file, Path directory, ChunkStreamVersion outputChunkStreamVersion, boolean dsync) -
Method Summary
Modifier 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 cLdau;c:Lorg/slf4j/Logger;intermediary field_20434Lnet/minecraft/class_2861;field_20434:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/world/storage/RegionFile;LOGGER:Lorg/slf4j/Logger;
-
field_31418
private static final int field_31418- See Also:
- Mappings:
Namespace Name Mixin selector official dLdau;d:Iintermediary field_31418Lnet/minecraft/class_2861;field_31418:Inamed field_31418Lnet/minecraft/world/storage/RegionFile;field_31418:I
-
field_31417
protected static final int field_31417- See Also:
- Mappings:
Namespace Name Mixin selector official aLdau;a:Iintermediary field_31417Lnet/minecraft/class_2861;field_31417:Inamed field_31417Lnet/minecraft/world/storage/RegionFile;field_31417:I
-
field_31419
private static final int field_31419- See Also:
- Mappings:
Namespace Name Mixin selector official eLdau;e:Iintermediary field_31419Lnet/minecraft/class_2861;field_31419:Inamed field_31419Lnet/minecraft/world/storage/RegionFile;field_31419:I
-
field_31420
private static final int field_31420- See Also:
- Mappings:
Namespace Name Mixin selector official fLdau;f:Iintermediary field_31420Lnet/minecraft/class_2861;field_31420:Inamed field_31420Lnet/minecraft/world/storage/RegionFile;field_31420:I
-
ZERO
- Mappings:
Namespace Name Mixin selector official gLdau;g:Ljava/nio/ByteBuffer;intermediary field_20435Lnet/minecraft/class_2861;field_20435:Ljava/nio/ByteBuffer;named ZEROLnet/minecraft/world/storage/RegionFile;ZERO:Ljava/nio/ByteBuffer;
-
FILE_EXTENSION
- See Also:
- Mappings:
Namespace Name Mixin selector official hLdau;h:Ljava/lang/String;intermediary field_31421Lnet/minecraft/class_2861;field_31421:Ljava/lang/String;named FILE_EXTENSIONLnet/minecraft/world/storage/RegionFile;FILE_EXTENSION:Ljava/lang/String;
-
field_31422
private static final int field_31422- See Also:
- Mappings:
Namespace Name Mixin selector official iLdau;i:Iintermediary field_31422Lnet/minecraft/class_2861;field_31422:Inamed field_31422Lnet/minecraft/world/storage/RegionFile;field_31422:I
-
field_31423
private static final int field_31423- See Also:
- Mappings:
Namespace Name Mixin selector official jLdau;j:Iintermediary field_31423Lnet/minecraft/class_2861;field_31423:Inamed field_31423Lnet/minecraft/world/storage/RegionFile;field_31423:I
-
field_31424
private static final int field_31424- See Also:
- Mappings:
Namespace Name Mixin selector official kLdau;k:Iintermediary field_31424Lnet/minecraft/class_2861;field_31424:Inamed field_31424Lnet/minecraft/world/storage/RegionFile;field_31424:I
-
channel
- Mappings:
Namespace Name Mixin selector official lLdau;l:Ljava/nio/channels/FileChannel;intermediary field_20436Lnet/minecraft/class_2861;field_20436:Ljava/nio/channels/FileChannel;named channelLnet/minecraft/world/storage/RegionFile;channel:Ljava/nio/channels/FileChannel;
-
directory
- Mappings:
Namespace Name Mixin selector official mLdau;m:Ljava/nio/file/Path;intermediary field_20657Lnet/minecraft/class_2861;field_20657:Ljava/nio/file/Path;named directoryLnet/minecraft/world/storage/RegionFile;directory:Ljava/nio/file/Path;
-
outputChunkStreamVersion
- Mappings:
Namespace Name Mixin selector official nLdau;n:Ldaw;intermediary field_20437Lnet/minecraft/class_2861;field_20437:Lnet/minecraft/class_4486;named outputChunkStreamVersionLnet/minecraft/world/storage/RegionFile;outputChunkStreamVersion:Lnet/minecraft/world/storage/ChunkStreamVersion;
-
header
- Mappings:
Namespace Name Mixin selector official oLdau;o:Ljava/nio/ByteBuffer;intermediary field_20438Lnet/minecraft/class_2861;field_20438:Ljava/nio/ByteBuffer;named headerLnet/minecraft/world/storage/RegionFile;header:Ljava/nio/ByteBuffer;
-
sectorData
- Mappings:
Namespace Name Mixin selector official pLdau;p:Ljava/nio/IntBuffer;intermediary field_20439Lnet/minecraft/class_2861;field_20439:Ljava/nio/IntBuffer;named sectorDataLnet/minecraft/world/storage/RegionFile;sectorData:Ljava/nio/IntBuffer;
-
saveTimes
- Mappings:
Namespace Name Mixin selector official qLdau;q:Ljava/nio/IntBuffer;intermediary field_20440Lnet/minecraft/class_2861;field_20440:Ljava/nio/IntBuffer;named saveTimesLnet/minecraft/world/storage/RegionFile;saveTimes:Ljava/nio/IntBuffer;
-
sectors
- Mappings:
Namespace Name Mixin selector official bLdau;b:Ldat;intermediary field_20441Lnet/minecraft/class_2861;field_20441:Lnet/minecraft/class_4485;named sectorsLnet/minecraft/world/storage/RegionFile;sectors:Lnet/minecraft/world/storage/SectorMap;
-
-
Constructor Details
-
RegionFile
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official <init>Ldau;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Z)Vintermediary <init>Lnet/minecraft/class_2861;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Z)Vnamed <init>Lnet/minecraft/world/storage/RegionFile;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Z)V
-
RegionFile
public RegionFile(Path file, Path directory, ChunkStreamVersion outputChunkStreamVersion, boolean dsync) throws IOException - Throws:
IOException- Mappings:
Namespace Name Mixin selector official <init>Ldau;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Ldaw;Z)Vintermediary <init>Lnet/minecraft/class_2861;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Lnet/minecraft/class_4486;Z)Vnamed <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 fLdau;f(Lcig;)Ljava/nio/file/Path;intermediary method_22413Lnet/minecraft/class_2861;method_22413(Lnet/minecraft/class_1923;)Ljava/nio/file/Path;named getExternalChunkPathLnet/minecraft/world/storage/RegionFile;getExternalChunkPath(Lnet/minecraft/util/math/ChunkPos;)Ljava/nio/file/Path;
-
getChunkInputStream
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdau;a(Lcig;)Ljava/io/DataInputStream;intermediary method_21873Lnet/minecraft/class_2861;method_21873(Lnet/minecraft/class_1923;)Ljava/io/DataInputStream;named getChunkInputStreamLnet/minecraft/world/storage/RegionFile;getChunkInputStream(Lnet/minecraft/util/math/ChunkPos;)Ljava/io/DataInputStream;
-
getEpochTimeSeconds
private static int getEpochTimeSeconds()- Mappings:
Namespace Name Mixin selector official bLdau;b()Iintermediary method_31739Lnet/minecraft/class_2861;method_31739()Inamed getEpochTimeSecondsLnet/minecraft/world/storage/RegionFile;getEpochTimeSeconds()I
-
hasChunkStreamVersionId
private static boolean hasChunkStreamVersionId(byte flags) - Mappings:
Namespace Name Mixin selector official aLdau;a(B)Zintermediary method_22407Lnet/minecraft/class_2861;method_22407(B)Znamed hasChunkStreamVersionIdLnet/minecraft/world/storage/RegionFile;hasChunkStreamVersionId(B)Z
-
getChunkStreamVersionId
private static byte getChunkStreamVersionId(byte flags) - Mappings:
Namespace Name Mixin selector official bLdau;b(B)Bintermediary method_22412Lnet/minecraft/class_2861;method_22412(B)Bnamed getChunkStreamVersionIdLnet/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 aLdau;a(Lcig;BLjava/io/InputStream;)Ljava/io/DataInputStream;intermediary method_22409Lnet/minecraft/class_2861;method_22409(Lnet/minecraft/class_1923;BLjava/io/InputStream;)Ljava/io/DataInputStream;named decompressLnet/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 aLdau;a(Lcig;B)Ljava/io/DataInputStream;intermediary method_22408Lnet/minecraft/class_2861;method_22408(Lnet/minecraft/class_1923;B)Ljava/io/DataInputStream;named getInputStreamLnet/minecraft/world/storage/RegionFile;getInputStream(Lnet/minecraft/util/math/ChunkPos;B)Ljava/io/DataInputStream;
-
getInputStream
- Mappings:
Namespace Name Mixin selector official aLdau;a(Ljava/nio/ByteBuffer;I)Ljava/io/ByteArrayInputStream;intermediary method_21876Lnet/minecraft/class_2861;method_21876(Ljava/nio/ByteBuffer;I)Ljava/io/ByteArrayInputStream;named getInputStreamLnet/minecraft/world/storage/RegionFile;getInputStream(Ljava/nio/ByteBuffer;I)Ljava/io/ByteArrayInputStream;
-
packSectorData
private int packSectorData(int offset, int size) - Mappings:
Namespace Name Mixin selector official aLdau;a(II)Iintermediary method_21872Lnet/minecraft/class_2861;method_21872(II)Inamed packSectorDataLnet/minecraft/world/storage/RegionFile;packSectorData(II)I
-
getSize
private static int getSize(int sectorData) - Mappings:
Namespace Name Mixin selector official aLdau;a(I)Iintermediary method_21871Lnet/minecraft/class_2861;method_21871(I)Inamed getSizeLnet/minecraft/world/storage/RegionFile;getSize(I)I
-
getOffset
private static int getOffset(int sectorData) - Mappings:
Namespace Name Mixin selector official bLdau;b(I)Iintermediary method_21878Lnet/minecraft/class_2861;method_21878(I)Inamed getOffsetLnet/minecraft/world/storage/RegionFile;getOffset(I)I
-
getSectorCount
private static int getSectorCount(int byteCount) - Mappings:
Namespace Name Mixin selector official cLdau;c(I)Iintermediary method_21880Lnet/minecraft/class_2861;method_21880(I)Inamed getSectorCountLnet/minecraft/world/storage/RegionFile;getSectorCount(I)I
-
isChunkValid
- Mappings:
Namespace Name Mixin selector official bLdau;b(Lcig;)Zintermediary method_21879Lnet/minecraft/class_2861;method_21879(Lnet/minecraft/class_1923;)Znamed isChunkValidLnet/minecraft/world/storage/RegionFile;isChunkValid(Lnet/minecraft/util/math/ChunkPos;)Z
-
getChunkOutputStream
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official cLdau;c(Lcig;)Ljava/io/DataOutputStream;intermediary method_21881Lnet/minecraft/class_2861;method_21881(Lnet/minecraft/class_1923;)Ljava/io/DataOutputStream;named getChunkOutputStreamLnet/minecraft/world/storage/RegionFile;getChunkOutputStream(Lnet/minecraft/util/math/ChunkPos;)Ljava/io/DataOutputStream;
-
sync
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdau;a()Vintermediary method_26981Lnet/minecraft/class_2861;method_26981()Vnamed syncLnet/minecraft/world/storage/RegionFile;sync()V
-
delete
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official dLdau;d(Lcig;)Vintermediary method_31740Lnet/minecraft/class_2861;method_31740(Lnet/minecraft/class_1923;)Vnamed deleteLnet/minecraft/world/storage/RegionFile;delete(Lnet/minecraft/util/math/ChunkPos;)V
-
writeChunk
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdau;a(Lcig;Ljava/nio/ByteBuffer;)Vintermediary method_21874Lnet/minecraft/class_2861;method_21874(Lnet/minecraft/class_1923;Ljava/nio/ByteBuffer;)Vnamed writeChunkLnet/minecraft/world/storage/RegionFile;writeChunk(Lnet/minecraft/util/math/ChunkPos;Ljava/nio/ByteBuffer;)V
-
getHeaderBuf
- Mappings:
Namespace Name Mixin selector official cLdau;c()Ljava/nio/ByteBuffer;intermediary method_22406Lnet/minecraft/class_2861;method_22406()Ljava/nio/ByteBuffer;named getHeaderBufLnet/minecraft/world/storage/RegionFile;getHeaderBuf()Ljava/nio/ByteBuffer;
-
writeSafely
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdau;a(Ljava/nio/file/Path;Ljava/nio/ByteBuffer;)Ldau$b;intermediary method_22410Lnet/minecraft/class_2861;method_22410(Ljava/nio/file/Path;Ljava/nio/ByteBuffer;)Lnet/minecraft/class_2861$class_4549;named writeSafelyLnet/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 dLdau;d()Vintermediary method_21870Lnet/minecraft/class_2861;method_21870()Vnamed writeHeaderLnet/minecraft/world/storage/RegionFile;writeHeader()V
-
getSectorData
- Mappings:
Namespace Name Mixin selector official gLdau;g(Lcig;)Iintermediary method_12419Lnet/minecraft/class_2861;method_12419(Lnet/minecraft/class_1923;)Inamed getSectorDataLnet/minecraft/world/storage/RegionFile;getSectorData(Lnet/minecraft/util/math/ChunkPos;)I
-
hasChunk
- Mappings:
Namespace Name Mixin selector official eLdau;e(Lcig;)Zintermediary method_12423Lnet/minecraft/class_2861;method_12423(Lnet/minecraft/class_1923;)Znamed hasChunkLnet/minecraft/world/storage/RegionFile;hasChunk(Lnet/minecraft/util/math/ChunkPos;)Z
-
getIndex
- Mappings:
Namespace Name Mixin selector official hLdau;h(Lcig;)Iintermediary method_17909Lnet/minecraft/class_2861;method_17909(Lnet/minecraft/class_1923;)Inamed getIndexLnet/minecraft/world/storage/RegionFile;getIndex(Lnet/minecraft/util/math/ChunkPos;)I
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
fillLastSector
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official eLdau;e()Vintermediary method_21877Lnet/minecraft/class_2861;method_21877()Vnamed fillLastSectorLnet/minecraft/world/storage/RegionFile;fillLastSector()V
-