mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-29 03:49:15 +00:00
添加自定义压缩方案
This commit is contained in:
@@ -73,5 +73,6 @@ tasks {
|
||||
relocate("net.bytebuddy", "net.momirealms.craftengine.libraries.bytebuddy")
|
||||
relocate("org.yaml.snakeyaml", "net.momirealms.craftengine.libraries.snakeyaml")
|
||||
relocate("org.ahocorasick", "net.momirealms.craftengine.libraries.ahocorasick")
|
||||
relocate("net.jpountz", "net.momirealms.craftengine.libraries.jpountz")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,6 +229,12 @@ light-system:
|
||||
force-update-light: false
|
||||
|
||||
chunk-system:
|
||||
# 1 = NONE | Compression Speed | Decompress Speed | Compression Ratio | Memory Usage |
|
||||
# 2 = DEFLATE | Medium-Slow Medium Moderate Low |
|
||||
# 3 = GZIP | Medium-Slow Medium Moderate Low |
|
||||
# 4 = LAZ4 | Blazing-Fast Blazing-Fast Low Low |
|
||||
# 5 = ZSTD | Medium-Fast Fast High Medium |
|
||||
compression-method: 4
|
||||
# Disabling this option prevents the plugin from converting custom blocks to vanilla states when chunks are unloaded.
|
||||
# While this can improve performance, custom blocks will turn into air if the plugin is uninstalled.
|
||||
restore-vanilla-blocks-on-chunk-unload: true
|
||||
|
||||
@@ -26,4 +26,5 @@ adventure-text-minimessage=${adventure_bundle_version}
|
||||
adventure-text-serializer-gson=${adventure_bundle_version}
|
||||
adventure-text-serializer-json=${adventure_bundle_version}
|
||||
netty-codec-http=${netty_version}
|
||||
ahocorasick=${ahocorasick_version}
|
||||
ahocorasick=${ahocorasick_version}
|
||||
lz4=${lz4_version}
|
||||
@@ -212,12 +212,18 @@ public class BukkitWorldManager implements WorldManager, Listener {
|
||||
this.lastVisitedUUID = null;
|
||||
}
|
||||
this.resetWorldArray();
|
||||
|
||||
} finally {
|
||||
this.worldMapLock.writeLock().unlock();
|
||||
}
|
||||
for (Chunk chunk : ((World) world.platformWorld()).getLoadedChunks()) {
|
||||
handleChunkUnload(ceWorld, chunk);
|
||||
}
|
||||
try {
|
||||
ceWorld.worldDataStorage().close();
|
||||
} catch (IOException e) {
|
||||
CraftEngine.instance().logger().warn("Failed to close world storage", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user