Additional fluid fix, mountain cut fix, removed redundant config options

This commit is contained in:
paulevsGitch 2021-10-25 16:06:42 +03:00
parent 74188554f5
commit 0cb8a94be3
4 changed files with 9 additions and 9 deletions

View file

@ -30,7 +30,7 @@ public class BlockFixer {
public static void fixBlocks(LevelAccessor level, BlockPos start, BlockPos end) {
final Registry<DimensionType> registry = level.registryAccess().registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY);
final ResourceLocation dimKey = registry.getKey(level.dimensionType());
if (dimKey!=null && "world_blender".equals(dimKey.getNamespace())) {
if (dimKey != null && "world_blender".equals(dimKey.getNamespace())) {
return;
}
final Set<BlockPos> doubleCheck = Sets.newConcurrentHashSet();
@ -75,7 +75,10 @@ public class BlockFixer {
}
for (Direction dir : BlocksHelper.HORIZONTAL) {
if (level.isEmptyBlock(POS.relative(dir))) {
try {
level.getLiquidTicks().scheduleTick(POS, state.getFluidState().getType(), 0);
}
catch (Exception e) {}
break;
}
}

View file

@ -15,7 +15,6 @@ public class GeneratorOptions {
private static boolean changeChorusPlant;
private static boolean removeChorusFromVanillaBiomes;
private static boolean newGenerator;
private static boolean noRingVoid;
private static boolean generateCentralIsland;
private static boolean generateObsidianPlatform;
private static int endCityFailChance;
@ -46,7 +45,6 @@ public class GeneratorOptions {
true
);
newGenerator = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "useNewGenerator", true);
noRingVoid = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "noRingVoid", false);
generateCentralIsland = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "generateCentralIsland", true);
endCityFailChance = Configs.GENERATOR_CONFIG.getInt("customGenerator", "endCityFailChance", 5);
generateObsidianPlatform = Configs.GENERATOR_CONFIG.getBooleanRoot("generateObsidianPlatform", true);
@ -126,10 +124,6 @@ public class GeneratorOptions {
return removeChorusFromVanillaBiomes;
}
public static boolean noRingVoid() {
return noRingVoid;
}
public static boolean useNewGenerator() {
return newGenerator;
}

View file

@ -68,7 +68,7 @@ public class IslandLayer {
for (int poz = -1; poz < 2; poz++) {
int pz = poz + iz;
long pz2 = pz;
if (GeneratorOptions.noRingVoid() || px2 * px2 + pz2 * pz2 > options.centerDist) {
if (px2 * px2 + pz2 * pz2 > options.centerDist) {
RANDOM.setSeed(getSeed(px, pz));
double posX = (px + RANDOM.nextFloat()) * options.distance;
double posY = MHelper.randRange(options.minY, options.maxY, RANDOM);

View file

@ -73,6 +73,9 @@ public class TerrainGenerator {
dist += noise2.eval(px * 0.05, py * 0.05, pz * 0.05) * 0.01 + 0.01;
dist += noise1.eval(px * 0.1, py * 0.1, pz * 0.1) * 0.005 + 0.005;
}
if (py > 100) {
dist = (float) Mth.lerp((py - 100) / 27F, dist, -1);
}
buffer[y] = dist;
}