-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor cloning of chunk data containers for robustness
- Loading branch information
1 parent
9b996ce
commit 7af64b5
Showing
13 changed files
with
213 additions
and
184 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/main/java/me/jellysquid/mods/sodium/client/world/PaletteStorageExtended.java
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,7 @@ | ||
package me.jellysquid.mods.sodium.client.world; | ||
|
||
import net.minecraft.world.chunk.Palette; | ||
|
||
public interface PaletteStorageExtended { | ||
<T> void sodium$unpack(T[] out, Palette<T> palette); | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/me/jellysquid/mods/sodium/client/world/ReadableContainerExtended.java
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,23 @@ | ||
package me.jellysquid.mods.sodium.client.world; | ||
|
||
import net.minecraft.world.chunk.ReadableContainer; | ||
|
||
public interface ReadableContainerExtended<T> { | ||
@SuppressWarnings("unchecked") | ||
static <T> ReadableContainerExtended<T> of(ReadableContainer<T> container) { | ||
return (ReadableContainerExtended<T>) container; | ||
} | ||
|
||
static <T> ReadableContainer<T> clone(ReadableContainer<T> container) { | ||
if (container == null) { | ||
return null; | ||
} | ||
|
||
return of(container).sodium$copy(); | ||
} | ||
|
||
void sodium$unpack(T[] values); | ||
void sodium$unpack(T[] values, int minX, int minY, int minZ, int maxX, int maxY, int maxZ); | ||
|
||
ReadableContainer<T> sodium$copy(); | ||
} |
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
7 changes: 0 additions & 7 deletions
7
src/main/java/me/jellysquid/mods/sodium/client/world/cloned/PackedIntegerArrayExtended.java
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
src/main/java/me/jellysquid/mods/sodium/client/world/cloned/palette/ClonedPalette.java
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
...ain/java/me/jellysquid/mods/sodium/client/world/cloned/palette/ClonedPaletteFallback.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.