few new options!

- Disable caves
- Basic deepslate layer
This commit is contained in:
RePixelatedMC
2024-09-25 19:19:52 +02:00
parent e21fdf46e0
commit ddf0e79a7e
5 changed files with 50 additions and 3 deletions

View File

@@ -275,9 +275,9 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener, List
n = n > 1 ? 1 : n < 0 ? 0 : n;
try {
//Color color = colorMode ? Color.getHSBColor((float) (n), 1f - (float) (n * n * n * n * n * n), 1f - (float) n) : Color.getHSBColor(0f, 0f, (float) n);
Color color = colorMode ? Color.getHSBColor((float) (n), 1f - (float) (n * n * n * n * n * n), 1f - (float) n) : Color.getHSBColor(0f, 0f, (float) n);
//Color color = colorMode ? Color.getHSBColor((float) (n), (float) (n * n * n * n * n * n), (float) n) : Color.getHSBColor(0f, 0f, (float) n);
Color color = colorMode ? Color.getHSBColor((float) n, (float) (n * n * n * n * n * n), (float) n) : Color.getHSBColor(0f, 0f, (float) n);
//Color color = colorMode ? Color.getHSBColor((float) n, (float) (n * n * n * n * n * n), (float) n) : Color.getHSBColor(0f, 0f, (float) n);
int rgb = color.getRGB();
img.setRGB(xx, z, rgb);

View File

@@ -4,6 +4,7 @@ import com.volmit.iris.Iris;
import com.volmit.iris.engine.object.*;
import com.volmit.iris.util.format.C;
import com.volmit.iris.util.format.Form;
import com.volmit.iris.util.misc.E;
import com.volmit.iris.util.nbt.io.NBTUtil;
import com.volmit.iris.util.nbt.io.NamedTag;
import com.volmit.iris.util.nbt.tag.*;
@@ -30,6 +31,10 @@ import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
public class IrisConverter {
/**
* Converts all schematics in the convert folder
* @param sender
*/
public static void convertSchematics(VolmitSender sender) {
File folder = Iris.instance.getDataFolder("convert");
@@ -132,6 +137,34 @@ public class IrisConverter {
});
}
/**
*
* @param sender
*/
public static void convertJigsaw(VolmitSender sender) {
File folder = Iris.instance.getDataFolder("convert");
FilenameFilter filter = (dir, name) -> name.endsWith(".nbt");
File[] fileList = folder.listFiles(filter);
if (fileList == null) {
sender.sendMessage("No schematic files to convert found in " + folder.getAbsolutePath());
return;
}
for (File nbt : fileList) {
try {
NamedTag tag = NBTUtil.read(nbt);
CompoundTag compound = (CompoundTag) tag.getTag();
} catch (Exception e) {
Iris.error(C.RED + "Failed to convert: " + nbt.getName());
e.printStackTrace();
}
}
}
}

View File

@@ -35,6 +35,7 @@ import org.bukkit.block.data.BlockData;
public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData> {
private static final BlockData AIR = Material.AIR.createBlockData();
private static final BlockData BEDROCK = Material.BEDROCK.createBlockData();
private static final BlockData DEEPSLATE = Material.DEEPSLATE.createBlockData();
private static final BlockData LAVA = Material.LAVA.createBlockData();
private static final BlockData GLASS = Material.GLASS.createBlockData();
private static final BlockData CAVE_AIR = Material.CAVE_AIR.createBlockData();
@@ -145,7 +146,12 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData>
if (ore != null) {
h.set(xf, i, zf, ore);
} else {
h.set(xf, i, zf, context.getRock().get(xf, zf));
// todo remove this ( TEMP )
if (getDimension().isDeepslateLayer() && i < 64) {
h.set(xf, i, zf, DEEPSLATE);
} else {
h.set(xf, i, zf, context.getRock().get(xf, zf));
}
}
}
}

View File

@@ -67,6 +67,10 @@ public class IrisCarving {
@BlockCoordinates
public void doCarving(MantleWriter writer, RNG rng, Engine engine, int x, int y, int z, int waterHint) {
if (!engine.getDimension().isDoCaves()) {
return;
}
if (caves.isNotEmpty()) {
for (IrisCavePlacer i : caves) {
i.generateCave(writer, rng, engine, x, y, z, waterHint);

View File

@@ -178,6 +178,10 @@ public class IrisDimension extends IrisRegistrant {
private KList<IrisBlockDrops> blockDrops = new KList<>();
@Desc("Should bedrock be generated or not.")
private boolean bedrock = true;
@Desc("If under 0 deepslate will be placed instead of the rockPalette")
private boolean deepslateLayer = true;
@Desc("If true caves get made")
private boolean doCaves = true;
@MinNumber(0)
@MaxNumber(1)
@Desc("The land chance. Up to 1.0 for total land or 0.0 for total sea")