mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-20 03:04:08 +00:00
Small patch (Forgot to launch) + simplify + compact + docs + ir s map
This commit is contained in:
parent
5c0c680f56
commit
3b6d3116bd
@ -21,6 +21,7 @@ package com.volmit.iris.core.decrees;
|
|||||||
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.NoiseExplorerGUI;
|
import com.volmit.iris.core.gui.NoiseExplorerGUI;
|
||||||
|
import com.volmit.iris.core.gui.VisionGUI;
|
||||||
import com.volmit.iris.engine.object.basic.IrisPosition;
|
import com.volmit.iris.engine.object.basic.IrisPosition;
|
||||||
import com.volmit.iris.engine.object.biome.IrisBiome;
|
import com.volmit.iris.engine.object.biome.IrisBiome;
|
||||||
import com.volmit.iris.engine.object.common.IrisScript;
|
import com.volmit.iris.engine.object.common.IrisScript;
|
||||||
@ -88,9 +89,7 @@ public class DecIrisStudio implements DecreeExecutor {
|
|||||||
|
|
||||||
@Decree(description = "Beatify a pack - must be in studio!", aliases = {"beauty", "prettify"})
|
@Decree(description = "Beatify a pack - must be in studio!", aliases = {"beauty", "prettify"})
|
||||||
public void beautify() {
|
public void beautify() {
|
||||||
if (noStudio()){
|
if (noStudio()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
File folder = Iris.proj.getActiveProject().getPath();
|
File folder = Iris.proj.getActiveProject().getPath();
|
||||||
success("Cleaned " + Form.f(JSONCleaner.clean(sender(), folder)) + " JSON Files");
|
success("Cleaned " + Form.f(JSONCleaner.clean(sender(), folder)) + " JSON Files");
|
||||||
}
|
}
|
||||||
@ -104,9 +103,7 @@ public class DecIrisStudio implements DecreeExecutor {
|
|||||||
@Decree(description = "Edit the biome you're currently in", aliases = {"ebiome", "eb"}, origin = DecreeOrigin.PLAYER)
|
@Decree(description = "Edit the biome you're currently in", aliases = {"ebiome", "eb"}, origin = DecreeOrigin.PLAYER)
|
||||||
public void editbiome() {
|
public void editbiome() {
|
||||||
|
|
||||||
if (noStudio()){
|
if (noStudio()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File f = engine().getBiome(
|
File f = engine().getBiome(
|
||||||
@ -128,27 +125,21 @@ public class DecIrisStudio implements DecreeExecutor {
|
|||||||
engine().getExecution().execute(script);
|
engine().getExecution().execute(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Decree(description = "Open the noise explorer (must have a local server!)", aliases = "nmap")
|
@Decree(description = "Open the noise explorer (External GUI)", aliases = "nmap")
|
||||||
public void noise() {
|
public void noise() {
|
||||||
if (!IrisSettings.get().isUseServerLaunchedGuis()) {
|
if (noGUI()) return;
|
||||||
error("To use Iris noise GUIs, please enable serverLaunchedGUIs in the settings");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
success("Opening Noise Explorer!");
|
success("Opening Noise Explorer!");
|
||||||
NoiseExplorerGUI.launch();
|
NoiseExplorerGUI.launch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Decree(description = "Preview created noise generators", aliases = {"generator", "gen"})
|
@Decree(description = "Preview noise gens (External GUI)", aliases = {"generator", "gen"})
|
||||||
public void explore(
|
public void explore(
|
||||||
@Param(name = "generator", description = "The generator to explore", aliases = {"gen", "g"})
|
@Param(name = "generator", description = "The generator to explore", aliases = {"gen", "g"})
|
||||||
IrisGenerator generator,
|
IrisGenerator generator,
|
||||||
@Param(name = "seed", description = "The seed to generate with", aliases = "s", defaultValue = "12345")
|
@Param(name = "seed", description = "The seed to generate with", aliases = "s", defaultValue = "12345")
|
||||||
long seed) {
|
long seed) {
|
||||||
if (!IrisSettings.get().isUseServerLaunchedGuis()) {
|
if (noGUI()) return;
|
||||||
error("To use Iris noise GUIs, please enable serverLaunchedGUIs in the settings");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
success("Opening Noise Explorer!");
|
success("Opening Noise Explorer!");
|
||||||
|
|
||||||
Supplier<Function2<Double, Double, Double>> l = () -> {
|
Supplier<Function2<Double, Double, Double>> l = () -> {
|
||||||
@ -159,6 +150,7 @@ public class DecIrisStudio implements DecreeExecutor {
|
|||||||
|
|
||||||
return (x, z) -> generator.getHeight(x, z, new RNG(seed).nextParallelRNG(3245).lmax());
|
return (x, z) -> generator.getHeight(x, z, new RNG(seed).nextParallelRNG(3245).lmax());
|
||||||
};
|
};
|
||||||
|
NoiseExplorerGUI.launch(l, "Custom Generator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Decree(description = "Find any biome", aliases = {"goto", "g"}, origin = DecreeOrigin.PLAYER)
|
@Decree(description = "Find any biome", aliases = {"goto", "g"}, origin = DecreeOrigin.PLAYER)
|
||||||
@ -197,9 +189,7 @@ public class DecIrisStudio implements DecreeExecutor {
|
|||||||
|
|
||||||
@Decree(description = "Hotload a studio", aliases = {"hot", "h", "reload"}, origin = DecreeOrigin.PLAYER)
|
@Decree(description = "Hotload a studio", aliases = {"hot", "h", "reload"}, origin = DecreeOrigin.PLAYER)
|
||||||
public void hotload() {
|
public void hotload() {
|
||||||
if (noStudio()){
|
if (noStudio()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
access().hotload();
|
access().hotload();
|
||||||
}
|
}
|
||||||
@ -207,13 +197,34 @@ public class DecIrisStudio implements DecreeExecutor {
|
|||||||
@Decree(description = "Show loot if a chest were right here", origin = DecreeOrigin.PLAYER)
|
@Decree(description = "Show loot if a chest were right here", origin = DecreeOrigin.PLAYER)
|
||||||
public void loot()
|
public void loot()
|
||||||
{
|
{
|
||||||
if (noStudio()){
|
if (noStudio()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
KList<IrisLootTable> tables = engine().getLootTables(RNG.r, player().getLocation().getBlock());
|
KList<IrisLootTable> tables = engine().getLootTables(RNG.r, player().getLocation().getBlock());
|
||||||
Inventory inv = Bukkit.createInventory(null, 27 * 2);
|
Inventory inv = Bukkit.createInventory(null, 27 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Decree(description = "Render a world map (External GUI)", aliases = "render")
|
||||||
|
public void map()
|
||||||
|
{
|
||||||
|
if (noStudio()) return;
|
||||||
|
|
||||||
|
if (noGUI()) return;
|
||||||
|
|
||||||
|
VisionGUI.launch(engine(), 0);
|
||||||
|
success("Opening map!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if server GUIs are not enabled
|
||||||
|
*/
|
||||||
|
private boolean noGUI() {
|
||||||
|
if (!IrisSettings.get().isUseServerLaunchedGuis()){
|
||||||
|
error("You must have server launched GUIs enabled in the settings!");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user