public class RegionFile
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
(package private) class |
RegionFile.ChunkBuffer |
(package private) static interface |
RegionFile.ICompleteCallback |
Modifier and Type | Field and Description |
---|---|
private java.nio.IntBuffer |
chunkTimestamps |
private java.nio.channels.FileChannel |
dataFile |
private static org.apache.logging.log4j.Logger |
field_227122_a_ |
private static java.nio.ByteBuffer |
field_227123_b_ |
private java.nio.file.Path |
field_227124_d_ |
private RegionFileVersion |
field_227125_e_ |
private java.nio.ByteBuffer |
field_227126_f_ |
private RegionBitmap |
field_227128_i_ |
private java.nio.file.Path |
filePath |
private java.nio.IntBuffer |
offsets |
Constructor and Description |
---|
RegionFile(java.io.File p_i225784_1_,
java.io.File p_i225784_2_) |
RegionFile(java.nio.file.Path p_i225785_1_,
java.nio.file.Path p_i225785_2_,
RegionFileVersion p_i225785_3_) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
contains(ChunkPos p_222667_1_) |
RegionFile |
extractLargeChunks(ChunkPos pos)
In 1.14, Forge added support for large chunks by allowing it to overflow the 255 section limit.
|
private int |
forgeGetRealLength(int index,
int offset) |
java.io.DataOutputStream |
func_222661_c(ChunkPos p_222661_1_) |
boolean |
func_222662_b(ChunkPos p_222662_1_) |
java.io.DataInputStream |
func_222666_a(ChunkPos pos) |
private java.nio.ByteBuffer |
func_227129_a_() |
private static boolean |
func_227130_a_(byte p_227130_0_) |
private static int |
func_227131_a_(int p_227131_0_) |
private int |
func_227132_a_(int p_227132_1_,
int p_227132_2_) |
private java.io.DataInputStream |
func_227133_a_(ChunkPos p_227133_1_,
byte p_227133_2_) |
private java.io.DataInputStream |
func_227134_a_(ChunkPos p_227134_1_,
byte p_227134_2_,
java.io.InputStream p_227134_3_) |
protected void |
func_227135_a_(ChunkPos p_227135_1_,
java.nio.ByteBuffer p_227135_2_) |
private static java.io.ByteArrayInputStream |
func_227137_a_(java.nio.ByteBuffer p_227137_0_,
int p_227137_1_) |
private RegionFile.ICompleteCallback |
func_227138_a_(java.nio.file.Path p_227138_1_,
java.nio.ByteBuffer p_227138_2_) |
private void |
func_227140_b_() |
private static byte |
func_227141_b_(byte p_227141_0_) |
private static int |
func_227142_b_(int p_227142_0_) |
private void |
func_227143_c_() |
private static int |
func_227144_c_(int p_227144_0_) |
private java.nio.file.Path |
func_227145_e_(ChunkPos p_227145_1_) |
private static int |
getIndex(ChunkPos p_222668_0_) |
private int |
getOffset(ChunkPos p_222660_1_) |
private static final org.apache.logging.log4j.Logger field_227122_a_
private static final java.nio.ByteBuffer field_227123_b_
private final java.nio.channels.FileChannel dataFile
private final java.nio.file.Path field_227124_d_
private final RegionFileVersion field_227125_e_
private final java.nio.ByteBuffer field_227126_f_
private final java.nio.IntBuffer offsets
private final java.nio.IntBuffer chunkTimestamps
private final RegionBitmap field_227128_i_
private final java.nio.file.Path filePath
public RegionFile(java.io.File p_i225784_1_, java.io.File p_i225784_2_) throws java.io.IOException
java.io.IOException
public RegionFile(java.nio.file.Path p_i225785_1_, java.nio.file.Path p_i225785_2_, RegionFileVersion p_i225785_3_) throws java.io.IOException
java.io.IOException
private int forgeGetRealLength(int index, int offset) throws java.io.IOException
java.io.IOException
public RegionFile extractLargeChunks(ChunkPos pos) throws java.io.IOException
java.io.IOException
private java.nio.file.Path func_227145_e_(ChunkPos p_227145_1_)
@Nullable public java.io.DataInputStream func_222666_a(ChunkPos pos) throws java.io.IOException
java.io.IOException
private static boolean func_227130_a_(byte p_227130_0_)
private static byte func_227141_b_(byte p_227141_0_)
@Nullable private java.io.DataInputStream func_227134_a_(ChunkPos p_227134_1_, byte p_227134_2_, java.io.InputStream p_227134_3_) throws java.io.IOException
java.io.IOException
@Nullable private java.io.DataInputStream func_227133_a_(ChunkPos p_227133_1_, byte p_227133_2_) throws java.io.IOException
java.io.IOException
private static java.io.ByteArrayInputStream func_227137_a_(java.nio.ByteBuffer p_227137_0_, int p_227137_1_)
private int func_227132_a_(int p_227132_1_, int p_227132_2_)
private static int func_227131_a_(int p_227131_0_)
private static int func_227142_b_(int p_227142_0_)
private static int func_227144_c_(int p_227144_0_)
public boolean func_222662_b(ChunkPos p_222662_1_)
public java.io.DataOutputStream func_222661_c(ChunkPos p_222661_1_) throws java.io.IOException
java.io.IOException
protected void func_227135_a_(ChunkPos p_227135_1_, java.nio.ByteBuffer p_227135_2_) throws java.io.IOException
java.io.IOException
private java.nio.ByteBuffer func_227129_a_()
private RegionFile.ICompleteCallback func_227138_a_(java.nio.file.Path p_227138_1_, java.nio.ByteBuffer p_227138_2_) throws java.io.IOException
java.io.IOException
private void func_227140_b_() throws java.io.IOException
java.io.IOException
private int getOffset(ChunkPos p_222660_1_)
public boolean contains(ChunkPos p_222667_1_)
private static int getIndex(ChunkPos p_222668_0_)
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException
private void func_227143_c_() throws java.io.IOException
java.io.IOException