BITS BITS EVERYWHERE

This commit is contained in:
cyberpwn
2021-09-23 10:44:56 -04:00
parent 5ed59d0282
commit 1628652264
28 changed files with 899 additions and 159 deletions
@@ -135,7 +135,7 @@ public class MCAFile {
/**
* Calls {@link MCAFile#serialize(RandomAccessFile, boolean)} without updating any timestamps.
*
* @param raf The {@code RandomAccessFile} to write to.
* @param raf The {@code RandomAccessFile} to writeNodeData to.
* @return The amount of chunks written to the file.
* @throws IOException If something went wrong during serialization.
* @see MCAFile#serialize(RandomAccessFile, boolean)
@@ -148,7 +148,7 @@ public class MCAFile {
* Serializes this object to an .mca file.
* This method does not perform any cleanups on the data.
*
* @param raf The {@code RandomAccessFile} to write to.
* @param raf The {@code RandomAccessFile} to writeNodeData to.
* @param changeLastUpdate Whether it should update all timestamps that show
* when this file was last updated.
* @return The amount of chunks written to the file.
@@ -190,7 +190,7 @@ public class MCAFile {
raf.writeByte(globalOffset & 0xFF);
raf.writeByte(sectors);
// write timestamp
// writeNodeData timestamp
raf.seek(index * 4L + 4096);
raf.writeInt(changeLastUpdate ? timestamp : chunk.getLastMCAUpdate());
@@ -30,7 +30,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Provides main and utility functions to read and write .mca files and
* Provides main and utility functions to read and writeNodeData .mca files and
* to convert block, chunk and region coordinates.
*/
public final class MCAUtil {
@@ -98,8 +98,8 @@ public final class MCAUtil {
/**
* Calls {@link MCAUtil#write(MCAFile, File, boolean)} without changing the timestamps.
*
* @param file The file to write to.
* @param mcaFile The data of the MCA file to write.
* @param file The file to writeNodeData to.
* @param mcaFile The data of the MCA file to writeNodeData.
* @return The amount of chunks written to the file.
* @throws IOException If something goes wrong during serialization.
* @see MCAUtil#write(MCAFile, File, boolean)
@@ -111,8 +111,8 @@ public final class MCAUtil {
/**
* Calls {@link MCAUtil#write(MCAFile, File, boolean)} without changing the timestamps.
*
* @param file The file to write to.
* @param mcaFile The data of the MCA file to write.
* @param file The file to writeNodeData to.
* @param mcaFile The data of the MCA file to writeNodeData.
* @return The amount of chunks written to the file.
* @throws IOException If something goes wrong during serialization.
* @see MCAUtil#write(MCAFile, File, boolean)
@@ -122,8 +122,8 @@ public final class MCAUtil {
}
/**
* @param file The file to write to.
* @param mcaFile The data of the MCA file to write.
* @param file The file to writeNodeData to.
* @param mcaFile The data of the MCA file to writeNodeData.
* @param changeLastUpdate Whether to adjust the timestamps of when the file was saved.
* @return The amount of chunks written to the file.
* @throws IOException If something goes wrong during serialization.
@@ -139,8 +139,8 @@ public final class MCAUtil {
* the value set by either loading an already existing MCA file or setting them manually.<br>
* If the file already exists, it is completely overwritten by the new file (no modification).
*
* @param file The file to write to.
* @param mcaFile The data of the MCA file to write.
* @param file The file to writeNodeData to.
* @param mcaFile The data of the MCA file to writeNodeData.
* @param changeLastUpdate Whether to adjust the timestamps of when the file was saved.
* @return The amount of chunks written to the file.
* @throws IOException If something goes wrong during serialization.