mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 01:06:21 +00:00
Use XoRoShiRo128PlusPlusRandom instead of XoRoShiRo128PlusRandom
This commit is contained in:
@@ -3,7 +3,7 @@ package com.dfsek.terra.carving;
|
||||
import com.dfsek.terra.TerraWorld;
|
||||
import com.dfsek.terra.biome.UserDefinedBiome;
|
||||
import com.dfsek.terra.config.base.ConfigPack;
|
||||
import it.unimi.dsi.util.XoRoShiRo128PlusRandom;
|
||||
import it.unimi.dsi.util.XoRoShiRo128PlusPlusRandom;
|
||||
import org.apache.commons.math3.util.FastMath;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.util.Vector;
|
||||
@@ -41,7 +41,7 @@ public class UserDefinedCarver extends Carver {
|
||||
|
||||
@Override
|
||||
public Worm getWorm(long l, Vector vector) {
|
||||
Random r = new XoRoShiRo128PlusRandom(l + hash);
|
||||
Random r = new XoRoShiRo128PlusPlusRandom(l + hash);
|
||||
return new UserDefinedWorm(length.get(r) / 2, r, vector, radius.getMax(), topCut, bottomCut);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class UserDefinedCarver extends Carver {
|
||||
@Override
|
||||
public boolean isChunkCarved(World w, int chunkX, int chunkZ, Random random) {
|
||||
ConfigPack c = TerraWorld.getWorld(w).getConfig();
|
||||
return new XoRoShiRo128PlusRandom(random.nextLong() + hash).nextInt(100) < c.getBiome((UserDefinedBiome) TerraWorld.getWorld(w).getGrid().getBiome(chunkX << 4, chunkZ << 4, GenerationPhase.POPULATE)).getCarverChance(this);
|
||||
return new XoRoShiRo128PlusPlusRandom(random.nextLong() + hash).nextInt(100) < c.getBiome((UserDefinedBiome) TerraWorld.getWorld(w).getGrid().getBiome(chunkX << 4, chunkZ << 4, GenerationPhase.POPULATE)).getCarverChance(this);
|
||||
}
|
||||
|
||||
private class UserDefinedWorm extends Worm {
|
||||
|
||||
Reference in New Issue
Block a user