This commit is contained in:
dfsek
2021-01-09 02:58:02 -07:00
parent 141b4f86ae
commit 9310114c0e
5 changed files with 10 additions and 4 deletions
@@ -37,7 +37,7 @@ public class CarverCache {
public List<Worm.WormPoint> getPoints(int chunkX, int chunkZ, UserDefinedCarver carver) {
synchronized(carvers) {
return carvers.computeIfAbsent((((long) chunkX) << 32) | (chunkZ & 0xffffffffL), key -> {
return carvers.computeIfAbsent(MathUtil.squash(chunkX, chunkZ), key -> {
TerraBiomeGrid grid = main.getWorld(w).getGrid();
if(carver.isChunkCarved(w, chunkX, chunkZ, new FastRandom(MathUtil.getCarverChunkSeed(chunkX, chunkZ, w.getSeed() + carver.hashCode())))) {
long seed = MathUtil.getCarverChunkSeed(chunkX, chunkZ, w.getSeed());