[Fix] Use of non-ThreadSafe Random source (quiqueck/BetterEnd#15)
This commit is contained in:
parent
a6218a1da3
commit
e70823a587
2 changed files with 4 additions and 4 deletions
|
@ -9,8 +9,8 @@ import net.minecraft.util.KeyDispatchDataCodec;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
import net.minecraft.util.valueproviders.ConstantFloat;
|
import net.minecraft.util.valueproviders.ConstantFloat;
|
||||||
import net.minecraft.util.valueproviders.FloatProvider;
|
import net.minecraft.util.valueproviders.FloatProvider;
|
||||||
import net.minecraft.world.level.levelgen.LegacyRandomSource;
|
|
||||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||||
|
import net.minecraft.world.level.levelgen.ThreadSafeLegacyRandomSource;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public class ThresholdCondition extends SurfaceNoiseCondition {
|
||||||
Context(long seed) {
|
Context(long seed) {
|
||||||
this.seed = seed;
|
this.seed = seed;
|
||||||
this.noise = new OpenSimplexNoise(seed);
|
this.noise = new OpenSimplexNoise(seed);
|
||||||
this.random = new LegacyRandomSource(seed * 2);
|
this.random = new ThreadSafeLegacyRandomSource(seed * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.util.KeyDispatchDataCodec;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
import net.minecraft.util.valueproviders.ConstantFloat;
|
import net.minecraft.util.valueproviders.ConstantFloat;
|
||||||
import net.minecraft.util.valueproviders.FloatProvider;
|
import net.minecraft.util.valueproviders.FloatProvider;
|
||||||
import net.minecraft.world.level.levelgen.LegacyRandomSource;
|
|
||||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||||
|
import net.minecraft.world.level.levelgen.ThreadSafeLegacyRandomSource;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ public class VolumeThresholdCondition extends VolumeNoiseCondition {
|
||||||
Context(long seed) {
|
Context(long seed) {
|
||||||
this.seed = seed;
|
this.seed = seed;
|
||||||
this.noise = new OpenSimplexNoise(seed);
|
this.noise = new OpenSimplexNoise(seed);
|
||||||
this.random = new LegacyRandomSource(seed * 3 + 1);
|
this.random = new ThreadSafeLegacyRandomSource(seed * 3 + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue