-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22b6501
commit 5ecb0f3
Showing
154 changed files
with
4,500 additions
and
6,930 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...s/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java | ||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java | ||
@@ -8,9 +_,9 @@ | ||
|
||
public boolean moonrise$doesRegionFileNotExistNoIO(final int chunkX, final int chunkZ); | ||
|
||
- public RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ); | ||
+ public com.triassic.linearpaper.region.AbstractRegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ); // LinearPaper | ||
|
||
- public RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException; | ||
+ public com.triassic.linearpaper.region.AbstractRegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException; // LinearPaper | ||
|
||
public MoonriseRegionFileIO.RegionDataController.WriteData moonrise$startWrite( | ||
final int chunkX, final int chunkZ, final CompoundTag compound |
11 changes: 11 additions & 0 deletions
11
...s/sources/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java | ||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java | ||
@@ -1462,7 +_,7 @@ | ||
|
||
public static interface IORunnable { | ||
|
||
- public void run(final RegionFile regionFile) throws IOException; | ||
+ public void run(final com.triassic.linearpaper.region.AbstractRegionFile regionFile) throws IOException; // LinearPaper | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...es/ca/spottedleaf/moonrise/patches/chunk_system/storage/ChunkSystemChunkBuffer.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/storage/ChunkSystemChunkBuffer.java | ||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/storage/ChunkSystemChunkBuffer.java | ||
@@ -8,5 +_,5 @@ | ||
|
||
public void moonrise$setWriteOnClose(final boolean value); | ||
|
||
- public void moonrise$write(final RegionFile regionFile) throws IOException; | ||
+ public void moonrise$write(final com.triassic.linearpaper.region.AbstractRegionFile regionFile) throws IOException; // LinearPaper | ||
} |
31 changes: 31 additions & 0 deletions
31
...r/minecraft-patches/sources/com/triassic/linearpaper/region/AbstractRegionFile.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- /dev/null | ||
+++ b/com/triassic/linearpaper/region/AbstractRegionFile.java | ||
@@ -1,0 +_,28 @@ | ||
+package com.triassic.linearpaper.region; | ||
+ | ||
+import java.io.DataInputStream; | ||
+import java.io.DataOutputStream; | ||
+import java.io.IOException; | ||
+import java.nio.ByteBuffer; | ||
+import java.nio.file.Path; | ||
+import net.minecraft.nbt.CompoundTag; | ||
+import net.minecraft.world.level.ChunkPos; | ||
+ | ||
+public interface AbstractRegionFile extends AutoCloseable { | ||
+ | ||
+ Path getPath(); | ||
+ DataInputStream getChunkDataInputStream(ChunkPos pos) throws IOException; | ||
+ DataOutputStream getChunkDataOutputStream(ChunkPos pos) throws IOException; | ||
+ CompoundTag getOversizedData(int x, int z) throws IOException; | ||
+ | ||
+ boolean hasChunk(ChunkPos pos); | ||
+ boolean doesChunkExist(ChunkPos pos); | ||
+ boolean isOversized(int x, int z); | ||
+ boolean recalculateHeader() throws IOException; | ||
+ | ||
+ void flush() throws IOException; | ||
+ void close() throws IOException; | ||
+ void clear(ChunkPos pos) throws IOException; | ||
+ void setOversized(int x, int z, boolean oversized) throws IOException; | ||
+ void write(ChunkPos pos, ByteBuffer buf) throws IOException; | ||
+} |
25 changes: 25 additions & 0 deletions
25
...raft-patches/sources/com/triassic/linearpaper/region/AbstractRegionFileFactory.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- /dev/null | ||
+++ b/com/triassic/linearpaper/region/AbstractRegionFileFactory.java | ||
@@ -1,0 +_,22 @@ | ||
+package com.triassic.linearpaper.region; | ||
+ | ||
+import java.io.IOException; | ||
+import java.nio.file.Path; | ||
+import net.minecraft.world.level.chunk.storage.RegionFile; | ||
+import net.minecraft.world.level.chunk.storage.RegionFileVersion; | ||
+import net.minecraft.world.level.chunk.storage.RegionStorageInfo; | ||
+ | ||
+public class AbstractRegionFileFactory { | ||
+ | ||
+ public static AbstractRegionFile getAbstractRegionFile(RegionStorageInfo storageKey, Path directory, Path path, boolean dsync) throws IOException { | ||
+ return getAbstractRegionFile(storageKey, directory, path, RegionFileVersion.getCompressionFormat(), dsync); | ||
+ } | ||
+ | ||
+ public static AbstractRegionFile getAbstractRegionFile(RegionStorageInfo storageKey, Path path, Path directory, RegionFileVersion compressionFormat, boolean dsync) throws IOException { | ||
+ if (path.toString().endsWith(".linear")) { | ||
+ return new LinearRegionFile(path, storageKey.linearCompressionLevel()); | ||
+ } else { | ||
+ return new RegionFile(storageKey, path, directory, compressionFormat, dsync); | ||
+ } | ||
+ } | ||
+} |
Oops, something went wrong.