mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-24 21:51:24 +00:00
few new options!
- Disable caves - Basic deepslate layer
This commit is contained in:
@@ -275,9 +275,9 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener, List
|
|||||||
n = n > 1 ? 1 : n < 0 ? 0 : n;
|
n = n > 1 ? 1 : n < 0 ? 0 : n;
|
||||||
|
|
||||||
try {
|
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);
|
//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();
|
int rgb = color.getRGB();
|
||||||
img.setRGB(xx, z, rgb);
|
img.setRGB(xx, z, rgb);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.volmit.iris.Iris;
|
|||||||
import com.volmit.iris.engine.object.*;
|
import com.volmit.iris.engine.object.*;
|
||||||
import com.volmit.iris.util.format.C;
|
import com.volmit.iris.util.format.C;
|
||||||
import com.volmit.iris.util.format.Form;
|
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.NBTUtil;
|
||||||
import com.volmit.iris.util.nbt.io.NamedTag;
|
import com.volmit.iris.util.nbt.io.NamedTag;
|
||||||
import com.volmit.iris.util.nbt.tag.*;
|
import com.volmit.iris.util.nbt.tag.*;
|
||||||
@@ -30,6 +31,10 @@ import java.util.concurrent.Executors;
|
|||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
public class IrisConverter {
|
public class IrisConverter {
|
||||||
|
/**
|
||||||
|
* Converts all schematics in the convert folder
|
||||||
|
* @param sender
|
||||||
|
*/
|
||||||
public static void convertSchematics(VolmitSender sender) {
|
public static void convertSchematics(VolmitSender sender) {
|
||||||
File folder = Iris.instance.getDataFolder("convert");
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import org.bukkit.block.data.BlockData;
|
|||||||
public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData> {
|
public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData> {
|
||||||
private static final BlockData AIR = Material.AIR.createBlockData();
|
private static final BlockData AIR = Material.AIR.createBlockData();
|
||||||
private static final BlockData BEDROCK = Material.BEDROCK.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 LAVA = Material.LAVA.createBlockData();
|
||||||
private static final BlockData GLASS = Material.GLASS.createBlockData();
|
private static final BlockData GLASS = Material.GLASS.createBlockData();
|
||||||
private static final BlockData CAVE_AIR = Material.CAVE_AIR.createBlockData();
|
private static final BlockData CAVE_AIR = Material.CAVE_AIR.createBlockData();
|
||||||
@@ -144,6 +145,10 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData>
|
|||||||
|
|
||||||
if (ore != null) {
|
if (ore != null) {
|
||||||
h.set(xf, i, zf, ore);
|
h.set(xf, i, zf, ore);
|
||||||
|
} else {
|
||||||
|
// todo remove this ( TEMP )
|
||||||
|
if (getDimension().isDeepslateLayer() && i < 64) {
|
||||||
|
h.set(xf, i, zf, DEEPSLATE);
|
||||||
} else {
|
} else {
|
||||||
h.set(xf, i, zf, context.getRock().get(xf, zf));
|
h.set(xf, i, zf, context.getRock().get(xf, zf));
|
||||||
}
|
}
|
||||||
@@ -152,3 +157,4 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ public class IrisCarving {
|
|||||||
|
|
||||||
@BlockCoordinates
|
@BlockCoordinates
|
||||||
public void doCarving(MantleWriter writer, RNG rng, Engine engine, int x, int y, int z, int waterHint) {
|
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()) {
|
if (caves.isNotEmpty()) {
|
||||||
for (IrisCavePlacer i : caves) {
|
for (IrisCavePlacer i : caves) {
|
||||||
i.generateCave(writer, rng, engine, x, y, z, waterHint);
|
i.generateCave(writer, rng, engine, x, y, z, waterHint);
|
||||||
|
|||||||
@@ -178,6 +178,10 @@ public class IrisDimension extends IrisRegistrant {
|
|||||||
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
||||||
@Desc("Should bedrock be generated or not.")
|
@Desc("Should bedrock be generated or not.")
|
||||||
private boolean bedrock = true;
|
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)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@Desc("The land chance. Up to 1.0 for total land or 0.0 for total sea")
|
@Desc("The land chance. Up to 1.0 for total land or 0.0 for total sea")
|
||||||
|
|||||||
Reference in New Issue
Block a user