mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-24 13:31:33 +00:00
make SeededBuilder use unboxed long
This commit is contained in:
+3
-3
@@ -219,19 +219,19 @@ public class BiomeTemplate implements AbstractableTemplate, ValidatedConfigTempl
|
||||
//pack.getTemplate().getNoiseBuilderMap().forEach((id, builder) -> tester.registerFunction(id, new BlankFunction(builder.getDimensions()))); // Register dummy functions
|
||||
|
||||
try {
|
||||
noiseEquation.apply(0L);
|
||||
noiseEquation.build(0L);
|
||||
} catch(Exception e) {
|
||||
throw new ValidationException("Invalid noise sampler: ", e);
|
||||
}
|
||||
|
||||
try {
|
||||
carvingEquation.apply(0L);
|
||||
carvingEquation.build(0L);
|
||||
} catch(Exception e) {
|
||||
throw new ValidationException("Invalid carving sampler: ", e);
|
||||
}
|
||||
|
||||
try {
|
||||
elevationEquation.apply(0L);
|
||||
elevationEquation.build(0L);
|
||||
} catch(Exception e) {
|
||||
throw new ValidationException("Invalid elevation sampler: ", e);
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,11 +19,11 @@ public class UserDefinedSeededTerraBiome implements SeededTerraBiome {
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserDefinedBiome apply(Long seed) {
|
||||
public UserDefinedBiome build(long seed) {
|
||||
synchronized(biomeMap) {
|
||||
return biomeMap.computeIfAbsent(seed,
|
||||
s -> {
|
||||
UserDefinedGenerator generator = new UserDefinedGenerator(template.getNoiseEquation().apply(seed), template.getElevationEquation().apply(seed), template.getCarvingEquation().apply(seed), template.getBiomeNoise().apply(seed), template.getElevationWeight(),
|
||||
UserDefinedGenerator generator = new UserDefinedGenerator(template.getNoiseEquation().build(seed), template.getElevationEquation().build(seed), template.getCarvingEquation().build(seed), template.getBiomeNoise().build(seed), template.getElevationWeight(),
|
||||
template.getBlendDistance(), template.getBlendStep(), template.getBlendWeight());
|
||||
return new UserDefinedBiome(template.getVanilla(), generator, template, context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user