mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 14:00:14 +00:00
improve cache configs
This commit is contained in:
1 parent
18819ae53d
commit
5ff47bad18
4 files changed
+22
-13
No files matched your search
@@ -29,7 +29,7 @@ public class CarverCache {
|
||||
}
|
||||
|
||||
public List<Worm.WormPoint> getPoints(int chunkX, int chunkZ, UserDefinedCarver carver) {
|
||||
if(carvers.size() > main.getTerraConfig().getCacheSize() * 2) carvers.clear();
|
||||
if(carvers.size() > main.getTerraConfig().getCarverCacheSize()) carvers.clear();
|
||||
return carvers.computeIfAbsent((((long) chunkX) << 32) | (chunkZ & 0xffffffffL), key -> {
|
||||
TerraBiomeGrid grid = main.getWorld(w).getGrid();
|
||||
if(carver.isChunkCarved(w, chunkX, chunkZ, new FastRandom(MathUtil.getCarverChunkSeed(chunkX, chunkZ, w.getSeed() + carver.hashCode())))) {
|
||||
|
||||
Reference in new issue
Block a user