This commit is contained in:
Daniel Mills
2021-07-16 02:40:56 -04:00
parent b5eb094566
commit 73a4152b5d
3 changed files with 9 additions and 9 deletions
@@ -20,7 +20,7 @@ package com.volmit.iris.core.command.studio;
import com.volmit.iris.Iris; import com.volmit.iris.Iris;
import com.volmit.iris.core.IrisSettings; import com.volmit.iris.core.IrisSettings;
import com.volmit.iris.core.gui.NoiseExplorer; import com.volmit.iris.core.gui.IrisExplorer;
import com.volmit.iris.util.collection.KList; import com.volmit.iris.util.collection.KList;
import com.volmit.iris.util.plugin.Command; import com.volmit.iris.util.plugin.Command;
import com.volmit.iris.util.plugin.MortarCommand; import com.volmit.iris.util.plugin.MortarCommand;
@@ -57,7 +57,7 @@ public class CommandIrisStudioExplorer extends MortarCommand {
return true; return true;
} }
NoiseExplorer.launch(); IrisExplorer.launch();
sender.sendMessage("Opening Noise Explorer!"); sender.sendMessage("Opening Noise Explorer!");
} }
return true; return true;
@@ -21,7 +21,7 @@ package com.volmit.iris.core.command.studio;
import com.volmit.iris.Iris; import com.volmit.iris.Iris;
import com.volmit.iris.core.IrisDataManager; import com.volmit.iris.core.IrisDataManager;
import com.volmit.iris.core.IrisSettings; import com.volmit.iris.core.IrisSettings;
import com.volmit.iris.core.gui.NoiseExplorer; import com.volmit.iris.core.gui.IrisExplorer;
import com.volmit.iris.engine.object.IrisGenerator; import com.volmit.iris.engine.object.IrisGenerator;
import com.volmit.iris.util.collection.KList; import com.volmit.iris.util.collection.KList;
import com.volmit.iris.util.math.RNG; import com.volmit.iris.util.math.RNG;
@@ -70,7 +70,7 @@ public class CommandIrisStudioExplorerGenerator extends MortarCommand {
if (generator != null) { if (generator != null) {
long finalSeed = seed; long finalSeed = seed;
NoiseExplorer.launch((x, z) -> IrisExplorer.launch((x, z) ->
generator.getHeight(x, z, new RNG(finalSeed).nextParallelRNG(3245).lmax()), "Gen: " + generator.getLoadKey()); generator.getHeight(x, z, new RNG(finalSeed).nextParallelRNG(3245).lmax()), "Gen: " + generator.getLoadKey());
sender.sendMessage("Opening Noise Explorer for gen " + generator.getLoadKey() + " (" + generator.getLoader().getDataFolder().getName() + ")"); sender.sendMessage("Opening Noise Explorer for gen " + generator.getLoadKey() + " (" + generator.getLoader().getDataFolder().getName() + ")");
@@ -38,7 +38,7 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
public class NoiseExplorer extends JPanel implements MouseWheelListener { public class IrisExplorer extends JPanel implements MouseWheelListener {
private static final long serialVersionUID = 2094606939770332040L; private static final long serialVersionUID = 2094606939770332040L;
@@ -74,7 +74,7 @@ public class NoiseExplorer extends JPanel implements MouseWheelListener {
double t; double t;
double tz; double tz;
public NoiseExplorer() { public IrisExplorer() {
addMouseWheelListener(this); addMouseWheelListener(this);
addMouseMotionListener(new MouseMotionListener() { addMouseMotionListener(new MouseMotionListener() {
@Override @Override
@@ -237,7 +237,7 @@ public class NoiseExplorer extends JPanel implements MouseWheelListener {
private static void createAndShowGUI(Function2<Double, Double, Double> gen, String genName) { private static void createAndShowGUI(Function2<Double, Double, Double> gen, String genName) {
JFrame frame = new JFrame("Noise Explorer: " + genName); JFrame frame = new JFrame("Noise Explorer: " + genName);
NoiseExplorer nv = new NoiseExplorer(); IrisExplorer nv = new IrisExplorer();
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
JLayeredPane pane = new JLayeredPane(); JLayeredPane pane = new JLayeredPane();
nv.setSize(new Dimension(1440, 820)); nv.setSize(new Dimension(1440, 820));
@@ -259,7 +259,7 @@ public class NoiseExplorer extends JPanel implements MouseWheelListener {
private static void createAndShowGUI() { private static void createAndShowGUI() {
JFrame frame = new JFrame("Noise Explorer"); JFrame frame = new JFrame("Noise Explorer");
NoiseExplorer nv = new NoiseExplorer(); IrisExplorer nv = new IrisExplorer();
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
KList<String> li = new KList<>(NoiseStyle.values()).toStringList(); KList<String> li = new KList<>(NoiseStyle.values()).toStringList();
combo = new JComboBox<>(li.toArray(new String[0])); combo = new JComboBox<>(li.toArray(new String[0]));
@@ -296,7 +296,7 @@ public class NoiseExplorer extends JPanel implements MouseWheelListener {
} }
public static void launch() { public static void launch() {
EventQueue.invokeLater(NoiseExplorer::createAndShowGUI); EventQueue.invokeLater(IrisExplorer::createAndShowGUI);
} }
static class HandScrollListener extends MouseAdapter { static class HandScrollListener extends MouseAdapter {