diff --git a/core/src/main/java/com/volmit/iris/core/gui/NoiseExplorerGUI.java b/core/src/main/java/com/volmit/iris/core/gui/NoiseExplorerGUI.java index e4be6dea9..3c83c8ec1 100644 --- a/core/src/main/java/com/volmit/iris/core/gui/NoiseExplorerGUI.java +++ b/core/src/main/java/com/volmit/iris/core/gui/NoiseExplorerGUI.java @@ -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); diff --git a/core/src/main/java/com/volmit/iris/core/tools/IrisConverter.java b/core/src/main/java/com/volmit/iris/core/tools/IrisConverter.java index f58cc5c69..f1dcc7884 100644 --- a/core/src/main/java/com/volmit/iris/core/tools/IrisConverter.java +++ b/core/src/main/java/com/volmit/iris/core/tools/IrisConverter.java @@ -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(); + } + + } + + + } + } diff --git a/core/src/main/java/com/volmit/iris/engine/actuator/IrisTerrainNormalActuator.java b/core/src/main/java/com/volmit/iris/engine/actuator/IrisTerrainNormalActuator.java index 7d602021e..67ba08dfb 100644 --- a/core/src/main/java/com/volmit/iris/engine/actuator/IrisTerrainNormalActuator.java +++ b/core/src/main/java/com/volmit/iris/engine/actuator/IrisTerrainNormalActuator.java @@ -35,6 +35,7 @@ import org.bukkit.block.data.BlockData; public class IrisTerrainNormalActuator extends EngineAssignedActuator { 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 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)); + } } } } diff --git a/core/src/main/java/com/volmit/iris/engine/object/IrisCarving.java b/core/src/main/java/com/volmit/iris/engine/object/IrisCarving.java index bf7efa6af..0ac54088f 100644 --- a/core/src/main/java/com/volmit/iris/engine/object/IrisCarving.java +++ b/core/src/main/java/com/volmit/iris/engine/object/IrisCarving.java @@ -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); diff --git a/core/src/main/java/com/volmit/iris/engine/object/IrisDimension.java b/core/src/main/java/com/volmit/iris/engine/object/IrisDimension.java index fae6ee23b..846429bd8 100644 --- a/core/src/main/java/com/volmit/iris/engine/object/IrisDimension.java +++ b/core/src/main/java/com/volmit/iris/engine/object/IrisDimension.java @@ -178,6 +178,10 @@ public class IrisDimension extends IrisRegistrant { private KList 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")