Remove aliases that *should* be interpretable by the processor

This commit is contained in:
CocoTheOwner 2021-08-16 12:06:04 +02:00
parent b7c67a16d9
commit 0e0bd94251

View File

@ -285,15 +285,15 @@ public class DecIrisStudio implements DecreeExecutor {
} }
} }
@Decree(description = "Get the version of a pack", aliases = {"v", "ver"}) @Decree(description = "Get the version of a pack")
public void version( public void version(
@Param(name = "dimension", defaultValue = "overworld", description = "The dimension get the version of", aliases = "dim") @Param(name = "dimension", defaultValue = "overworld", description = "The dimension get the version of")
IrisDimension dimension IrisDimension dimension
) { ) {
sender().sendMessage(C.GREEN + "The \"" + dimension.getName() + "\" pack has version: " + dimension.getVersion()); sender().sendMessage(C.GREEN + "The \"" + dimension.getName() + "\" pack has version: " + dimension.getVersion());
} }
@Decree(description = "Convert objects in the \"convert\" folder", aliases = "conv") @Decree(description = "Convert objects in the \"convert\" folder")
public void convert() { public void convert() {
Iris.convert.check(sender()); Iris.convert.check(sender());
} }
@ -312,9 +312,9 @@ public class DecIrisStudio implements DecreeExecutor {
} }
} }
@Decree(description = "Execute a script", aliases = {"ex", "exec", "run"}, origin = DecreeOrigin.PLAYER) @Decree(description = "Execute a script", aliases = "run", origin = DecreeOrigin.PLAYER)
public void execute( public void execute(
@Param(name = "script", description = "The script to run", aliases = {"s", "scr"}) @Param(name = "script", description = "The script to run")
IrisScript script IrisScript script
) { ) {
engine().getExecution().execute(script.getLoadKey()); engine().getExecution().execute(script.getLoadKey());
@ -330,9 +330,9 @@ public class DecIrisStudio implements DecreeExecutor {
@Decree(description = "Preview noise gens (External GUI)", 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")
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", defaultValue = "12345")
long seed long seed
){ ){
if (noGUI()) return; if (noGUI()) return;
@ -349,29 +349,11 @@ public class DecIrisStudio implements DecreeExecutor {
NoiseExplorerGUI.launch(l, "Custom Generator"); NoiseExplorerGUI.launch(l, "Custom Generator");
} }
@Decree(description = "Find any biome", aliases = {"goto", "g"}, origin = DecreeOrigin.PLAYER) @Decree(description = "Find any biome or region", aliases = {"goto", "g"}, origin = DecreeOrigin.PLAYER)
public void find( public void find(
@Param(name = "biome", description = "The biome to find", aliases = "b") @Param(name = "biome", description = "The biome to find")
IrisBiome biome IrisBiome biome,
){ @Param(name = "region", description = "The region to find")
if (!IrisToolbelt.isIrisWorld(world())){
sender().sendMessage(C.RED + "You must be in an Iris world to use this command!");
return;
}
IrisPosition l = engine().lookForBiome(biome, 10000, (v) -> sender().sendMessage("Looking for " + C.BOLD + C.WHITE + biome.getName() + C.RESET + C.GRAY + ": Checked " + Form.f(v) + " Places"));
if (l == null) {
sender().sendMessage(C.RED + "Couldn't find " + biome.getName() + ".");
} else {
sender().sendMessage(C.GREEN + "Found " + biome.getName() + "!");
J.s(() -> player().teleport(l.toLocation(world())));
}
}
@Decree(description = "Find any region", aliases = {"goto", "g"}, origin = DecreeOrigin.PLAYER)
public void find(
@Param(name = "region", description = "The region to find", aliases = "r")
IrisRegion region IrisRegion region
){ ){
if (!IrisToolbelt.isIrisWorld(world())){ if (!IrisToolbelt.isIrisWorld(world())){
@ -379,17 +361,40 @@ public class DecIrisStudio implements DecreeExecutor {
return; return;
} }
IrisPosition l = engine().lookForRegion(region, 10000, (v) -> sender().sendMessage("Looking for " + C.BOLD + C.WHITE + region.getName() + C.RESET + C.GRAY + ": Checked " + Form.f(v) + " Places")); if (biome == null && region == null){
sender().sendMessage(C.RED + "You must specify a biome or region!");
return;
}
IrisPosition l = null;
if (region != null) {
l = engine().lookForRegion(region, 10000, (v) -> sender().sendMessage("Looking for the " + C.BOLD + C.WHITE + region.getName() + C.RESET + C.GRAY + " region: Checked " + Form.f(v) + " Places"));
if (l == null) {
sender().sendMessage(C.YELLOW + "Couldn't find the " + region.getName() + " region.");
} else {
sender().sendMessage(C.GREEN + "Found the " + region.getName() + " region!.");
}
}
if (l == null && biome != null) {
l = engine().lookForBiome(biome, 10000, (v) -> sender().sendMessage("Looking for the " + C.BOLD + C.WHITE + biome.getName() + C.RESET + C.GRAY + " biome: Checked " + Form.f(v) + " Places"));
if (l == null) {
sender().sendMessage(C.YELLOW + "Couldn't find the " + biome.getName() + " biome.");
} else {
sender().sendMessage(C.GREEN + "Found the " + biome.getName() + " biome!.");
}
}
if (l == null) { if (l == null) {
sender().sendMessage(C.RED + "Couldn't find " + region.getName() + "."); sender().sendMessage(C.RED + "Could not find the region and / or biome you specified.");
} else { return;
sender().sendMessage(C.GREEN + "Found " + region.getName() + "!");
J.s(() -> player().teleport(l.toLocation(world())));
} }
final IrisPosition finalL = l;
J.s(() -> player().teleport(finalL.toLocation(world())));
} }
@Decree(description = "Hotload a studio", aliases = {"hot", "h", "reload"}, origin = DecreeOrigin.PLAYER) @Decree(description = "Hotload a studio", aliases = "reload", origin = DecreeOrigin.PLAYER)
public void hotload() { public void hotload() {
if (noStudio()) return; if (noStudio()) return;
@ -452,11 +457,11 @@ public class DecIrisStudio implements DecreeExecutor {
@Decree(description = "Package a dimension into a compressed format", aliases = "package") @Decree(description = "Package a dimension into a compressed format", aliases = "package")
public void pkg( public void pkg(
@Param(name = "dimension", aliases = {"d", "dim"}, description = "The dimension pack to compress") @Param(name = "dimension", description = "The dimension pack to compress")
IrisDimension dimension, IrisDimension dimension,
@Param(name = "obfuscate", aliases = "o", description = "Whether or not to obfuscate the pack", defaultValue = "false") @Param(name = "obfuscate", description = "Whether or not to obfuscate the pack", defaultValue = "false")
boolean obfuscate, boolean obfuscate,
@Param(name = "minify", aliases = "m", description = "Whether or not to minify the pack", defaultValue = "true") @Param(name = "minify", description = "Whether or not to minify the pack", defaultValue = "true")
boolean minify boolean minify
){ ){
Iris.proj.compilePackage(sender(), dimension.getLoadKey(), obfuscate, minify); Iris.proj.compilePackage(sender(), dimension.getLoadKey(), obfuscate, minify);
@ -464,7 +469,7 @@ public class DecIrisStudio implements DecreeExecutor {
@Decree(description = "Profiles a dimension's performance", origin = DecreeOrigin.PLAYER) @Decree(description = "Profiles a dimension's performance", origin = DecreeOrigin.PLAYER)
public void profile( public void profile(
@Param(name = "dimension", aliases = {"d", "dim"}, description = "The dimension to profile") @Param(name = "dimension", description = "The dimension to profile")
IrisDimension dimension IrisDimension dimension
){ ){
File pack = dimension.getLoadFile().getParentFile().getParentFile(); File pack = dimension.getLoadFile().getParentFile().getParentFile();
@ -652,7 +657,7 @@ public class DecIrisStudio implements DecreeExecutor {
@Decree(description = "Summon an Iris Entity", origin = DecreeOrigin.PLAYER) @Decree(description = "Summon an Iris Entity", origin = DecreeOrigin.PLAYER)
public void summon( public void summon(
@Param(description = "The Iris Entity to spawn", aliases = "e", name = "entity") @Param(description = "The Iris Entity to spawn", name = "entity")
IrisEntity entity IrisEntity entity
) { ) {
if (noStudio()){ if (noStudio()){
@ -679,9 +684,9 @@ public class DecIrisStudio implements DecreeExecutor {
player().setGameMode(GameMode.SPECTATOR); player().setGameMode(GameMode.SPECTATOR);
} }
@Decree(description = "Update your dimension project", aliases = {"upd", "u"}) @Decree(description = "Update your dimension project")
public void update( public void update(
@Param(name = "dimension", aliases = {"d", "dim"}, description = "The dimension to update the workspace of") @Param(name = "dimension", description = "The dimension to update the workspace of")
IrisDimension dimension IrisDimension dimension
){ ){
if (new IrisProject(dimension.getLoadFile().getParentFile().getParentFile()).updateWorkspace()) { if (new IrisProject(dimension.getLoadFile().getParentFile().getParentFile()).updateWorkspace()) {