Class RegionFile

java.lang.Object
net.minecraft.world.storage.RegionFile
All Implemented Interfaces:
AutoCloseable

public class RegionFile extends Object implements AutoCloseable
Mappings:
Namespace Name
official cno
intermediary net/minecraft/class_2861
named net/minecraft/world/storage/RegionFile
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official c Lcno;c:Lorg/apache/logging/log4j/Logger;
      intermediary field_20434 Lnet/minecraft/class_2861;field_20434:Lorg/apache/logging/log4j/Logger;
      named LOGGER Lnet/minecraft/world/storage/RegionFile;LOGGER:Lorg/apache/logging/log4j/Logger;
    • field_31418

      private static final int field_31418
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official d Lcno;d:I
      intermediary field_31418 Lnet/minecraft/class_2861;field_31418:I
      named field_31418 Lnet/minecraft/world/storage/RegionFile;field_31418:I
    • field_31417

      protected static final int field_31417
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a:I
      intermediary field_31417 Lnet/minecraft/class_2861;field_31417:I
      named field_31417 Lnet/minecraft/world/storage/RegionFile;field_31417:I
    • field_31419

      private static final int field_31419
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official e Lcno;e:I
      intermediary field_31419 Lnet/minecraft/class_2861;field_31419:I
      named field_31419 Lnet/minecraft/world/storage/RegionFile;field_31419:I
    • field_31420

      private static final int field_31420
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official f Lcno;f:I
      intermediary field_31420 Lnet/minecraft/class_2861;field_31420:I
      named field_31420 Lnet/minecraft/world/storage/RegionFile;field_31420:I
    • ZERO

      private static final ByteBuffer ZERO
      Mappings:
      Namespace Name Mixin selector
      official g Lcno;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;
    • field_31421

      private static final String field_31421
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official h Lcno;h:Ljava/lang/String;
      intermediary field_31421 Lnet/minecraft/class_2861;field_31421:Ljava/lang/String;
      named field_31421 Lnet/minecraft/world/storage/RegionFile;field_31421:Ljava/lang/String;
    • field_31422

      private static final int field_31422
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official i Lcno;i:I
      intermediary field_31422 Lnet/minecraft/class_2861;field_31422:I
      named field_31422 Lnet/minecraft/world/storage/RegionFile;field_31422:I
    • field_31423

      private static final int field_31423
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official j Lcno;j:I
      intermediary field_31423 Lnet/minecraft/class_2861;field_31423:I
      named field_31423 Lnet/minecraft/world/storage/RegionFile;field_31423:I
    • field_31424

      private static final int field_31424
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official k Lcno;k:I
      intermediary field_31424 Lnet/minecraft/class_2861;field_31424:I
      named field_31424 Lnet/minecraft/world/storage/RegionFile;field_31424:I
    • channel

      private final FileChannel channel
      Mappings:
      Namespace Name Mixin selector
      official l Lcno;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

      private final Path directory
      Mappings:
      Namespace Name Mixin selector
      official m Lcno;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

      final ChunkStreamVersion outputChunkStreamVersion
      Mappings:
      Namespace Name Mixin selector
      official n Lcno;n:Lcnq;
      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;
    • sectorData

      private final IntBuffer sectorData
      Mappings:
      Namespace Name Mixin selector
      official p Lcno;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

      private final IntBuffer saveTimes
      Mappings:
      Namespace Name Mixin selector
      official q Lcno;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

      protected final SectorMap sectors
      Mappings:
      Namespace Name Mixin selector
      official b Lcno;b:Lcnn;
      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

      public RegionFile(File file, File directory, boolean dsync) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcno;<init>(Ljava/io/File;Ljava/io/File;Z)V
      intermediary <init> Lnet/minecraft/class_2861;<init>(Ljava/io/File;Ljava/io/File;Z)V
      named <init> Lnet/minecraft/world/storage/RegionFile;<init>(Ljava/io/File;Ljava/io/File;Z)V
    • RegionFile

      public RegionFile(Path file, Path directory, ChunkStreamVersion outputChunkStreamVersion, boolean dsync) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcno;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Lcnq;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

      private Path getExternalChunkPath(ChunkPos chunkPos)
      Mappings:
      Namespace Name Mixin selector
      official f Lcno;f(Lbvu;)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

      @Nullable public @Nullable DataInputStream getChunkInputStream(ChunkPos pos) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a(Lbvu;)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;
    • method_31739

      private static int method_31739()
      Mappings:
      Namespace Name Mixin selector
      official b Lcno;b()I
      intermediary method_31739 Lnet/minecraft/class_2861;method_31739()I
      named method_31739 Lnet/minecraft/world/storage/RegionFile;method_31739()I
    • hasChunkStreamVersionId

      private static boolean hasChunkStreamVersionId(byte byte2)
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a(B)Z
      intermediary method_22407 Lnet/minecraft/class_2861;method_22407(B)Z
      named hasChunkStreamVersionId Lnet/minecraft/world/storage/RegionFile;hasChunkStreamVersionId(B)Z
    • getChunkStreamVersionId

      private static byte getChunkStreamVersionId(byte byte2)
      Mappings:
      Namespace Name Mixin selector
      official b Lcno;b(B)B
      intermediary method_22412 Lnet/minecraft/class_2861;method_22412(B)B
      named getChunkStreamVersionId Lnet/minecraft/world/storage/RegionFile;getChunkStreamVersionId(B)B
    • method_22409

      @Nullable private @Nullable DataInputStream method_22409(ChunkPos chunkPos, byte byte2, InputStream inputStream) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a(Lbvu;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 method_22409 Lnet/minecraft/world/storage/RegionFile;method_22409(Lnet/minecraft/util/math/ChunkPos;BLjava/io/InputStream;)Ljava/io/DataInputStream;
    • method_22408

      @Nullable private @Nullable DataInputStream method_22408(ChunkPos chunkPos, byte byte2) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a(Lbvu;B)Ljava/io/DataInputStream;
      intermediary method_22408 Lnet/minecraft/class_2861;method_22408(Lnet/minecraft/class_1923;B)Ljava/io/DataInputStream;
      named method_22408 Lnet/minecraft/world/storage/RegionFile;method_22408(Lnet/minecraft/util/math/ChunkPos;B)Ljava/io/DataInputStream;
    • getInputStream

      private static ByteArrayInputStream getInputStream(ByteBuffer buffer, int length)
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;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;
    • packSectorData

      private int packSectorData(int offset, int size)
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a(II)I
      intermediary method_21872 Lnet/minecraft/class_2861;method_21872(II)I
      named packSectorData Lnet/minecraft/world/storage/RegionFile;packSectorData(II)I
    • getSize

      private static int getSize(int sectorData)
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a(I)I
      intermediary method_21871 Lnet/minecraft/class_2861;method_21871(I)I
      named getSize Lnet/minecraft/world/storage/RegionFile;getSize(I)I
    • getOffset

      private static int getOffset(int sectorData)
      Mappings:
      Namespace Name Mixin selector
      official b Lcno;b(I)I
      intermediary method_21878 Lnet/minecraft/class_2861;method_21878(I)I
      named getOffset Lnet/minecraft/world/storage/RegionFile;getOffset(I)I
    • getSectorCount

      private static int getSectorCount(int byteCount)
      Mappings:
      Namespace Name Mixin selector
      official c Lcno;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

      public boolean isChunkValid(ChunkPos pos)
      Mappings:
      Namespace Name Mixin selector
      official b Lcno;b(Lbvu;)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

      public DataOutputStream getChunkOutputStream(ChunkPos pos) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official c Lcno;c(Lbvu;)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

      public void sync() throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a()V
      intermediary method_26981 Lnet/minecraft/class_2861;method_26981()V
      named sync Lnet/minecraft/world/storage/RegionFile;sync()V
    • method_31740

      public void method_31740(ChunkPos chunkPos) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official d Lcno;d(Lbvu;)V
      intermediary method_31740 Lnet/minecraft/class_2861;method_31740(Lnet/minecraft/class_1923;)V
      named method_31740 Lnet/minecraft/world/storage/RegionFile;method_31740(Lnet/minecraft/util/math/ChunkPos;)V
    • writeChunk

      protected void writeChunk(ChunkPos pos, ByteBuffer byteBuffer) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a(Lbvu;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
    • method_22406

      private ByteBuffer method_22406()
      Mappings:
      Namespace Name Mixin selector
      official c Lcno;c()Ljava/nio/ByteBuffer;
      intermediary method_22406 Lnet/minecraft/class_2861;method_22406()Ljava/nio/ByteBuffer;
      named method_22406 Lnet/minecraft/world/storage/RegionFile;method_22406()Ljava/nio/ByteBuffer;
    • writeSafely

      private RegionFile.OutputAction writeSafely(Path path, ByteBuffer byteBuffer) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lcno;a(Ljava/nio/file/Path;Ljava/nio/ByteBuffer;)Lcno$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

      private void writeHeader() throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official d Lcno;d()V
      intermediary method_21870 Lnet/minecraft/class_2861;method_21870()V
      named writeHeader Lnet/minecraft/world/storage/RegionFile;writeHeader()V
    • getSectorData

      private int getSectorData(ChunkPos pos)
      Mappings:
      Namespace Name Mixin selector
      official g Lcno;g(Lbvu;)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

      public boolean hasChunk(ChunkPos pos)
      Mappings:
      Namespace Name Mixin selector
      official e Lcno;e(Lbvu;)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

      private static int getIndex(ChunkPos pos)
      Mappings:
      Namespace Name Mixin selector
      official h Lcno;h(Lbvu;)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

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • fillLastSector

      private void fillLastSector() throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official e Lcno;e()V
      intermediary method_21877 Lnet/minecraft/class_2861;method_21877()V
      named fillLastSector Lnet/minecraft/world/storage/RegionFile;fillLastSector()V