Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Shift ZSTD bindings check
Dieser Commit ist enthalten in:
Ursprung
1dd0dac462
Commit
9fb6ebe7ac
@ -268,15 +268,16 @@ public class Fawe {
|
|||||||
* - LocalSession supports VirtualPlayers and undo on disk
|
* - LocalSession supports VirtualPlayers and undo on disk
|
||||||
*/
|
*/
|
||||||
if (!Settings.IMP.EXPERIMENTAL.DISABLE_NATIVES) {
|
if (!Settings.IMP.EXPERIMENTAL.DISABLE_NATIVES) {
|
||||||
try {
|
// A higher amount is currently not supported by ZSTD / ZSTD JNI
|
||||||
Native.load();
|
|
||||||
} catch (Throwable e) {
|
|
||||||
if (Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL > 6 || Settings.IMP.HISTORY.COMPRESSION_LEVEL > 6) {
|
if (Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL > 6 || Settings.IMP.HISTORY.COMPRESSION_LEVEL > 6) {
|
||||||
Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL = Math.min(6, Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL);
|
Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL = Math.min(6, Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL);
|
||||||
Settings.IMP.HISTORY.COMPRESSION_LEVEL = Math.min(6, Settings.IMP.HISTORY.COMPRESSION_LEVEL);
|
Settings.IMP.HISTORY.COMPRESSION_LEVEL = Math.min(6, Settings.IMP.HISTORY.COMPRESSION_LEVEL);
|
||||||
LOGGER.error("ZSTD Compression Binding Not Found.\n"
|
|
||||||
+ "FAWE will still work but compression won't work as well.\n", e);
|
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
Native.load();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
LOGGER.error("ZSTD compression binding not found.\n"
|
||||||
|
+ "FAWE will still work but compression won't work as well.\n", e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
net.jpountz.util.Native.load();
|
net.jpountz.util.Native.load();
|
||||||
|
@ -224,10 +224,12 @@ public class Settings extends Config {
|
|||||||
"4 = 1 x medium, 1 x fast",
|
"4 = 1 x medium, 1 x fast",
|
||||||
"5 = 1 x medium, 2 x fast",
|
"5 = 1 x medium, 2 x fast",
|
||||||
"6 = 1 x medium, 3 x fast",
|
"6 = 1 x medium, 3 x fast",
|
||||||
|
/* A higher value is currently not supported by ZSTD / ZSTD-JNI
|
||||||
"7 = 1 x high, 1 x medium, 1 x fast",
|
"7 = 1 x high, 1 x medium, 1 x fast",
|
||||||
"8 = 1 x high, 1 x medium, 2 x fast",
|
"8 = 1 x high, 1 x medium, 2 x fast",
|
||||||
"9 = 1 x high, 1 x medium, 3 x fast (best compression)",
|
"9 = 1 x high, 1 x medium, 3 x fast (best compression)",
|
||||||
"NOTE: If using disk, do some compression (3+) as smaller files save faster"
|
"NOTE: If using disk, do some compression (3+) as smaller files save faster"
|
||||||
|
*/
|
||||||
})
|
})
|
||||||
public int COMPRESSION_LEVEL = 3;
|
public int COMPRESSION_LEVEL = 3;
|
||||||
@Comment({
|
@Comment({
|
||||||
@ -500,7 +502,7 @@ public class Settings extends Config {
|
|||||||
" - TODO: Buffered random access with compression is not implemented on disk yet",
|
" - TODO: Buffered random access with compression is not implemented on disk yet",
|
||||||
" - 0 = No compression",
|
" - 0 = No compression",
|
||||||
" - 1 = Fast compression",
|
" - 1 = Fast compression",
|
||||||
" - 2-17 = Slower compression"
|
" - 2-6 = Slower compression"
|
||||||
})
|
})
|
||||||
public int COMPRESSION_LEVEL = 1;
|
public int COMPRESSION_LEVEL = 1;
|
||||||
@Comment("Number of days to keep history on disk before deleting it")
|
@Comment("Number of days to keep history on disk before deleting it")
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren