mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Cleanup & Add bedrock option
This commit is contained in:
parent
2b8e189966
commit
c72559c31a
@ -1,7 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.gen.v2.TestGen;
|
||||
import com.volmit.iris.util.Command;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
@ -59,11 +58,11 @@ public class CommandIris extends MortarCommand
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
if(args.length == 1 && args[0].equalsIgnoreCase("test!"))
|
||||
{
|
||||
TestGen.gen(sender.player());
|
||||
return true;
|
||||
}
|
||||
// if(args.length == 1 && args[0].equalsIgnoreCase("test!"))
|
||||
// {
|
||||
// TestGen.gen(sender.player());
|
||||
// return true;
|
||||
// }
|
||||
|
||||
sender.sendMessage("Iris v" + Iris.instance.getDescription().getVersion() + " by Volmit Software");
|
||||
printHelp(sender);
|
||||
|
@ -170,7 +170,7 @@ public abstract class TopographicTerrainProvider extends ParallelTerrainProvider
|
||||
boolean underwater = k > height && k <= fluidHeight;
|
||||
|
||||
// Bedrock
|
||||
if(bedrock)
|
||||
if(bedrock && getDimension().isBedrock())
|
||||
{
|
||||
if(biomeMap != null)
|
||||
{
|
||||
|
@ -1,15 +1,11 @@
|
||||
package com.volmit.iris.gen.v2;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
import com.volmit.iris.gen.v2.scaffold.Hunk;
|
||||
import com.volmit.iris.gen.v2.scaffold.layer.ProceduralStream;
|
||||
import com.volmit.iris.manager.IrisDataManager;
|
||||
import com.volmit.iris.object.IrisDimension;
|
||||
import com.volmit.iris.object.NoiseStyle;
|
||||
import com.volmit.iris.util.RNG;
|
||||
|
||||
public class IrisTerrainGenerator
|
||||
{
|
||||
@ -32,20 +28,9 @@ public class IrisTerrainGenerator
|
||||
complex.flash(seed, dimension, data);
|
||||
}
|
||||
|
||||
public ProceduralStream<Double> height = NoiseStyle.CELLULAR
|
||||
.stream(69)
|
||||
.fit(1, 69)
|
||||
.interpolate().bistarcast9(4).into().bilinear(4)
|
||||
;
|
||||
|
||||
public ProceduralStream<BlockData> rock = NoiseStyle.STATIC
|
||||
.stream(88)
|
||||
.select(Material.STONE, Material.ANDESITE)
|
||||
.convertCached((mat) -> mat.createBlockData());
|
||||
|
||||
public void generate(int x, int z, Hunk<BlockData> blocks, Hunk<Biome> biomes)
|
||||
{
|
||||
RNG rng = new RNG((((long) x) << 32) | (z & 0xffffffffL));
|
||||
// RNG rng = new RNG((((long) x) << 32) | (z & 0xffffffffL));
|
||||
complex.getHeightStream().fill2D(blocks, x * 16, z * 16, complex.getTerrainStream());
|
||||
}
|
||||
}
|
||||
|
@ -3,10 +3,8 @@ package com.volmit.iris.gen.v2;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
|
||||
@ -22,7 +20,6 @@ public class TestGen
|
||||
p.teleport(new WorldCreator("t/" + UUID.randomUUID().toString()).generator(new ChunkGenerator()
|
||||
{
|
||||
IrisTerrainGenerator tg = new IrisTerrainGenerator(1337, Iris.globaldata.getDimensionLoader().load("overworld"), Iris.globaldata);
|
||||
BlockData st = Material.STONE.createBlockData();
|
||||
|
||||
public boolean isParallelCapable()
|
||||
{
|
||||
@ -35,6 +32,7 @@ public class TestGen
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
ChunkData c = createChunkData(world);
|
||||
tg.generate(x, z, Hunk.view(c), null);
|
||||
|
||||
Iris.info("Generated " + x + " " + z + " in " + Form.duration(p.getMilliseconds(), 2));
|
||||
return c;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class CNG
|
||||
|
||||
public ProceduralStream<Double> stream(double min, double max)
|
||||
{
|
||||
return new FittedStream(stream(), min, max);
|
||||
return new FittedStream<Double>(stream(), min, max);
|
||||
}
|
||||
|
||||
public static CNG signature(RNG rng)
|
||||
|
@ -93,6 +93,10 @@ public class IrisDimension extends IrisRegistrant
|
||||
@Desc("Define custom block drops for this dimension")
|
||||
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Should bedrock be generated or not.")
|
||||
private boolean bedrock = true;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@DontObfuscate
|
||||
@ -166,7 +170,7 @@ public class IrisDimension extends IrisRegistrant
|
||||
@DontObfuscate
|
||||
@Desc("If defined, If air is defined below the area, this fluid will always place")
|
||||
private IrisCaveFluid forceFluid = new IrisCaveFluid();
|
||||
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Generate decorations or not")
|
||||
private boolean decorate = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user