diff --git a/src/main/java/com/volmit/iris/core/commands/CommandFind.java b/src/main/java/com/volmit/iris/core/commands/CommandFind.java index 45380aee2..fd1b146d3 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandFind.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandFind.java @@ -33,7 +33,7 @@ import com.volmit.iris.util.format.C; public class CommandFind implements DecreeExecutor { @Decree(description = "Find a biome") public void biome( - @Param(description = "The biome to look for") + @Param(description = "The biome to look for") IrisBiome biome ) { Engine e = engine(); @@ -48,7 +48,7 @@ public class CommandFind implements DecreeExecutor { @Decree(description = "Find a region") public void region( - @Param(description = "The region to look for") + @Param(description = "The region to look for") IrisRegion region ) { Engine e = engine(); @@ -63,7 +63,7 @@ public class CommandFind implements DecreeExecutor { @Decree(description = "Find a structure") public void structure( - @Param(description = "The structure to look for") + @Param(description = "The structure to look for") IrisJigsawStructure structure ) { Engine e = engine(); @@ -78,7 +78,7 @@ public class CommandFind implements DecreeExecutor { @Decree(description = "Find an object") public void object( - @Param(description = "The object to look for", customHandler = ObjectHandler.class) + @Param(description = "The object to look for", customHandler = ObjectHandler.class) String object ) { Engine e = engine(); diff --git a/src/main/java/com/volmit/iris/core/commands/CommandIris.java b/src/main/java/com/volmit/iris/core/commands/CommandIris.java index 9b46bccd7..fff7e4384 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandIris.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandIris.java @@ -60,11 +60,11 @@ public class CommandIris implements DecreeExecutor { @Decree(description = "Create a new world", aliases = {"+", "c"}) public void create( - @Param(aliases = "world-name", description = "The name of the world to create") + @Param(aliases = "world-name", description = "The name of the world to create") String name, - @Param(aliases = "dimension", description = "The dimension type to create the world with", defaultValue = "default") + @Param(aliases = "dimension", description = "The dimension type to create the world with", defaultValue = "default") IrisDimension type, - @Param(description = "The seed to generate the world with", defaultValue = "1337") + @Param(description = "The seed to generate the world with", defaultValue = "1337") long seed ) { if(name.equals("iris")) { @@ -80,12 +80,12 @@ public class CommandIris implements DecreeExecutor { try { IrisToolbelt.createWorld() - .dimension(type.getLoadKey()) - .name(name) - .seed(seed) - .sender(sender()) - .studio(false) - .create(); + .dimension(type.getLoadKey()) + .name(name) + .seed(seed) + .sender(sender()) + .studio(false) + .create(); } catch(Throwable e) { sender().sendMessage(C.RED + "Exception raised during creation. See the console for more details."); Iris.error("Exception raised during world creation: " + e.getMessage()); @@ -103,24 +103,24 @@ public class CommandIris implements DecreeExecutor { @Param(description = "Whether to also remove the folder (if set to false, just does not load the world)", defaultValue = "true") boolean delete ) { - if (!IrisToolbelt.isIrisWorld(world)) { + if(!IrisToolbelt.isIrisWorld(world)) { sender().sendMessage(C.RED + "This is not an Iris world. Iris worlds: " + String.join(", ", Bukkit.getServer().getWorlds().stream().filter(IrisToolbelt::isIrisWorld).map(World::getName).toList())); return; } sender().sendMessage(C.GREEN + "Removing world: " + world.getName()); try { - if (IrisToolbelt.removeWorld(world)) { + if(IrisToolbelt.removeWorld(world)) { sender().sendMessage(C.GREEN + "Successfully removed " + world.getName() + " from bukkit.yml"); } else { sender().sendMessage(C.YELLOW + "Looks like the world was already removed from bukkit.yml"); } - } catch (IOException e) { + } catch(IOException e) { sender().sendMessage(C.RED + "Failed to save bukkit.yml because of " + e.getMessage()); e.printStackTrace(); } IrisToolbelt.evacuate(world, "Deleting world"); Bukkit.unloadWorld(world, false); - if (delete && world.getWorldFolder().delete()) { + if(delete && world.getWorldFolder().delete()) { sender().sendMessage(C.GREEN + "Successfully removed world folder"); } else { sender().sendMessage(C.RED + "Failed to remove world folder"); @@ -146,11 +146,11 @@ public class CommandIris implements DecreeExecutor { @Decree(description = "Set aura spins") public void aura( - @Param(description = "The h color value", defaultValue = "-20") + @Param(description = "The h color value", defaultValue = "-20") int h, - @Param(description = "The s color value", defaultValue = "7") + @Param(description = "The s color value", defaultValue = "7") int s, - @Param(description = "The b color value", defaultValue = "8") + @Param(description = "The b color value", defaultValue = "8") int b ) { IrisSettings.get().getGeneral().setSpinh(h); @@ -162,11 +162,11 @@ public class CommandIris implements DecreeExecutor { @Decree(description = "Bitwise calculations") public void bitwise( - @Param(description = "The first value to run calculations on") + @Param(description = "The first value to run calculations on") int value1, - @Param(description = "The operator: | & ^ ≺≺ ≻≻ %") + @Param(description = "The operator: | & ^ ≺≺ ≻≻ %") String operator, - @Param(description = "The second value to run calculations on") + @Param(description = "The second value to run calculations on") int value2 ) { Integer v = null; @@ -187,7 +187,7 @@ public class CommandIris implements DecreeExecutor { @Decree(description = "Toggle debug") public void debug( - @Param(name = "on", description = "Whether or not debug should be on", defaultValue = "other") + @Param(name = "on", description = "Whether or not debug should be on", defaultValue = "other") Boolean on ) { boolean to = on == null ? !IrisSettings.get().getGeneral().isDebug() : on; @@ -198,13 +198,13 @@ public class CommandIris implements DecreeExecutor { @Decree(description = "Download a project.", aliases = "dl") public void download( - @Param(name = "pack", description = "The pack to download", defaultValue = "overworld", aliases = "project") + @Param(name = "pack", description = "The pack to download", defaultValue = "overworld", aliases = "project") String pack, - @Param(name = "branch", description = "The branch to download from", defaultValue = "main") + @Param(name = "branch", description = "The branch to download from", defaultValue = "main") String branch, - @Param(name = "trim", description = "Whether or not to download a trimmed version (do not enable when editing)", defaultValue = "false") + @Param(name = "trim", description = "Whether or not to download a trimmed version (do not enable when editing)", defaultValue = "false") boolean trim, - @Param(name = "overwrite", description = "Whether or not to overwrite the pack with the downloaded one", aliases = "force", defaultValue = "false") + @Param(name = "overwrite", description = "Whether or not to overwrite the pack with the downloaded one", aliases = "force", defaultValue = "false") boolean overwrite ) { sender().sendMessage(C.GREEN + "Downloading pack: " + pack + "/" + branch + (trim ? " trimmed" : "") + (overwrite ? " overwriting" : "")); @@ -235,7 +235,7 @@ public class CommandIris implements DecreeExecutor { @Decree(name = "regen", description = "Regenerate nearby chunks.", aliases = "rg", sync = true, origin = DecreeOrigin.PLAYER) public void regen( - @Param(name = "radius", description = "The radius of nearby cunks", defaultValue = "5") + @Param(name = "radius", description = "The radius of nearby cunks", defaultValue = "5") int radius ) { if(IrisToolbelt.isIrisWorld(player().getWorld())) { @@ -306,26 +306,26 @@ public class CommandIris implements DecreeExecutor { @Decree(description = "Update the pack of a world (UNSAFE!)", name = "^world", aliases = "update-world") public void updateWorld( - @Param(description = "The world to update", contextual = true) + @Param(description = "The world to update", contextual = true) World world, - @Param(description = "The pack to install into the world", contextual = true, aliases = "dimension") + @Param(description = "The pack to install into the world", contextual = true, aliases = "dimension") IrisDimension pack, - @Param(description = "Make sure to make a backup & read the warnings first!", defaultValue = "false", aliases = "c") + @Param(description = "Make sure to make a backup & read the warnings first!", defaultValue = "false", aliases = "c") boolean confirm, - @Param(description = "Should Iris download the pack again for you", defaultValue = "false", name = "fresh-download", aliases = {"fresh", "new"}) + @Param(description = "Should Iris download the pack again for you", defaultValue = "false", name = "fresh-download", aliases = {"fresh", "new"}) boolean freshDownload ) { if(!confirm) { - sender().sendMessage(new String[] { - C.RED + "You should always make a backup before using this", - C.YELLOW + "Issues caused by this can be, but are not limited to:", - C.YELLOW + " - Broken chunks (cut-offs) between old and new chunks (before & after the update)", - C.YELLOW + " - Regenerated chunks that do not fit in with the old chunks", - C.YELLOW + " - Structures not spawning again when regenerating", - C.YELLOW + " - Caves not lining up", - C.YELLOW + " - Terrain layers not lining up", - C.RED + "Now that you are aware of the risks, and have made a back-up:", - C.RED + "/iris ^world confirm=true" + sender().sendMessage(new String[]{ + C.RED + "You should always make a backup before using this", + C.YELLOW + "Issues caused by this can be, but are not limited to:", + C.YELLOW + " - Broken chunks (cut-offs) between old and new chunks (before & after the update)", + C.YELLOW + " - Regenerated chunks that do not fit in with the old chunks", + C.YELLOW + " - Structures not spawning again when regenerating", + C.YELLOW + " - Caves not lining up", + C.YELLOW + " - Terrain layers not lining up", + C.RED + "Now that you are aware of the risks, and have made a back-up:", + C.RED + "/iris ^world confirm=true" }); return; } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandJigsaw.java b/src/main/java/com/volmit/iris/core/commands/CommandJigsaw.java index 81e08ab90..22f4547ef 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandJigsaw.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandJigsaw.java @@ -42,7 +42,7 @@ import java.io.File; public class CommandJigsaw implements DecreeExecutor { @Decree(description = "Edit a jigsaw piece") public void edit( - @Param(description = "The jigsaw piece to edit") + @Param(description = "The jigsaw piece to edit") IrisJigsawPiece piece ) { File dest = piece.getLoadFile(); @@ -51,7 +51,7 @@ public class CommandJigsaw implements DecreeExecutor { @Decree(description = "Place a jigsaw structure") public void place( - @Param(description = "The jigsaw structure to place") + @Param(description = "The jigsaw structure to place") IrisJigsawStructure structure ) { PrecisionStopwatch p = PrecisionStopwatch.start(); @@ -62,11 +62,11 @@ public class CommandJigsaw implements DecreeExecutor { @Decree(description = "Create a jigsaw piece") public void create( - @Param(description = "The name of the jigsaw piece") + @Param(description = "The name of the jigsaw piece") String piece, - @Param(description = "The project to add the jigsaw piece to") + @Param(description = "The project to add the jigsaw piece to") String project, - @Param(description = "The object to use for this piece", customHandler = ObjectHandler.class) + @Param(description = "The object to use for this piece", customHandler = ObjectHandler.class) String object ) { IrisObject o = IrisData.loadAnyObject(object); diff --git a/src/main/java/com/volmit/iris/core/commands/CommandObject.java b/src/main/java/com/volmit/iris/core/commands/CommandObject.java index e3d7f25a1..219c4c16f 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandObject.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandObject.java @@ -54,7 +54,7 @@ import java.util.stream.Collectors; public class CommandObject implements DecreeExecutor { private static final Set skipBlocks = Set.of(Material.GRASS, Material.SNOW, Material.VINE, Material.TORCH, Material.DEAD_BUSH, - Material.POPPY, Material.DANDELION); + Material.POPPY, Material.DANDELION); public static IObjectPlacer createPlacer(World world, Map futureBlockChanges) { @@ -132,7 +132,7 @@ public class CommandObject implements DecreeExecutor { @Decree(description = "Check the composition of an object") public void analyze( - @Param(description = "The object to analyze", customHandler = ObjectHandler.class) + @Param(description = "The object to analyze", customHandler = ObjectHandler.class) String object ) { IrisObject o = IrisData.loadAnyObject(object); @@ -167,7 +167,7 @@ public class CommandObject implements DecreeExecutor { } List sortedMatsList = amounts.keySet().stream().map(BlockData::getMaterial) - .sorted().collect(Collectors.toList()); + .sorted().collect(Collectors.toList()); Set sortedMats = new TreeSet<>(Comparator.comparingInt(materials::get).reversed()); sortedMats.addAll(sortedMatsList); sender().sendMessage("== Blocks in object =="); @@ -183,8 +183,8 @@ public class CommandObject implements DecreeExecutor { String string = " - " + mat.toString() + "*" + amount; if(data.getAsString(true).contains("[")) { string = string + " --> [" + data.getAsString(true).split("\\[")[1] - .replaceAll("true", ChatColor.GREEN + "true" + ChatColor.GRAY) - .replaceAll("false", ChatColor.RED + "false" + ChatColor.GRAY) + "*" + dataAmount; + .replaceAll("true", ChatColor.GREEN + "true" + ChatColor.GRAY) + .replaceAll("false", ChatColor.RED + "false" + ChatColor.GRAY) + "*" + dataAmount; } sender().sendMessage(string); @@ -206,7 +206,7 @@ public class CommandObject implements DecreeExecutor { @Decree(description = "Contract a selection based on your looking direction", aliases = "-") public void contract( - @Param(description = "The amount to inset by", defaultValue = "1") + @Param(description = "The amount to inset by", defaultValue = "1") int amount ) { if(!WandSVC.isHoldingWand(player())) { @@ -231,7 +231,7 @@ public class CommandObject implements DecreeExecutor { @Decree(description = "Set point 1 to look", aliases = "p1") public void position1( - @Param(description = "Whether to use your current position, or where you look", defaultValue = "true") + @Param(description = "Whether to use your current position, or where you look", defaultValue = "true") boolean here ) { if(!WandSVC.isHoldingWand(player())) { @@ -254,7 +254,7 @@ public class CommandObject implements DecreeExecutor { @Decree(description = "Set point 2 to look", aliases = "p2") public void position2( - @Param(description = "Whether to use your current position, or where you look", defaultValue = "true") + @Param(description = "Whether to use your current position, or where you look", defaultValue = "true") boolean here ) { if(!WandSVC.isHoldingWand(player())) { @@ -277,13 +277,13 @@ public class CommandObject implements DecreeExecutor { @Decree(description = "Paste an object", sync = true) public void paste( - @Param(description = "The object to paste", customHandler = ObjectHandler.class) + @Param(description = "The object to paste", customHandler = ObjectHandler.class) String object, - @Param(description = "Whether or not to edit the object (need to hold wand)", defaultValue = "false") + @Param(description = "Whether or not to edit the object (need to hold wand)", defaultValue = "false") boolean edit, - @Param(description = "The amount of degrees to rotate by", defaultValue = "0") + @Param(description = "The amount of degrees to rotate by", defaultValue = "0") int rotate, - @Param(description = "The factor by which to scale the object placement", defaultValue = "1") + @Param(description = "The factor by which to scale the object placement", defaultValue = "1") double scale // , // @Param(description = "The scale interpolator to use", defaultValue = "none") @@ -306,8 +306,7 @@ public class CommandObject implements DecreeExecutor { Map futureChanges = new HashMap<>(); - if(scale != 1) - { + if(scale != 1) { o = o.scaled(scale, IrisObjectPlacementScaleInterpolator.TRICUBIC); } @@ -317,7 +316,7 @@ public class CommandObject implements DecreeExecutor { if(edit) { ItemStack newWand = WandSVC.createWand(block.clone().subtract(o.getCenter()).add(o.getW() - 1, - o.getH() + o.getCenter().clone().getY() - 1, o.getD() - 1), block.clone().subtract(o.getCenter().clone().setY(0))); + o.getH() + o.getCenter().clone().getY() - 1, o.getD() - 1), block.clone().subtract(o.getCenter().clone().setY(0))); if(WandSVC.isWand(wand)) { wand = newWand; player().getInventory().setItemInMainHand(wand); @@ -339,11 +338,11 @@ public class CommandObject implements DecreeExecutor { @Decree(description = "Save an object") public void save( - @Param(description = "The dimension to store the object in", contextual = true) + @Param(description = "The dimension to store the object in", contextual = true) IrisDimension dimension, - @Param(description = "The file to store it in, can use / for subfolders") + @Param(description = "The file to store it in, can use / for subfolders") String name, - @Param(description = "Overwrite existing object files", defaultValue = "false", aliases = "force") + @Param(description = "Overwrite existing object files", defaultValue = "false", aliases = "force") boolean overwrite ) { IrisObject o = WandSVC.createSchematic(player()); @@ -372,7 +371,7 @@ public class CommandObject implements DecreeExecutor { @Decree(description = "Shift a selection in your looking direction", aliases = "-") public void shift( - @Param(description = "The amount to shift by", defaultValue = "1") + @Param(description = "The amount to shift by", defaultValue = "1") int amount ) { if(!WandSVC.isHoldingWand(player())) { @@ -396,7 +395,7 @@ public class CommandObject implements DecreeExecutor { @Decree(description = "Undo a number of pastes", aliases = "-") public void undo( - @Param(description = "The amount of pastes to undo", defaultValue = "1") + @Param(description = "The amount of pastes to undo", defaultValue = "1") int amount ) { ObjectSVC service = Iris.service(ObjectSVC.class); @@ -414,8 +413,7 @@ public class CommandObject implements DecreeExecutor { Cuboid locs = WorldEditLink.getSelection(sender().player()); - if(locs == null) - { + if(locs == null) { sender().sendMessage(C.RED + "You don't have a WorldEdit selection in this world."); return; } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandPregen.java b/src/main/java/com/volmit/iris/core/commands/CommandPregen.java index 6d48640ae..e08e7a507 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandPregen.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandPregen.java @@ -34,11 +34,11 @@ import org.bukkit.util.Vector; public class CommandPregen implements DecreeExecutor { @Decree(description = "Pregenerate a world") public void start( - @Param(description = "The radius of the pregen in blocks", aliases = "size") + @Param(description = "The radius of the pregen in blocks", aliases = "size") int radius, - @Param(description = "The world to pregen", contextual = true) + @Param(description = "The world to pregen", contextual = true) World world, - @Param(aliases = "middle", description = "The center location of the pregen. Use \"me\" for your current location", defaultValue = "0,0") + @Param(aliases = "middle", description = "The center location of the pregen. Use \"me\" for your current location", defaultValue = "0,0") Vector center ) { try { @@ -49,11 +49,11 @@ public class CommandPregen implements DecreeExecutor { radius = Math.max(radius, 1024); int w = (radius >> 9 + 1) * 2; IrisToolbelt.pregenerate(PregenTask - .builder() - .center(new Position2(center)) - .width(w) - .height(w) - .build(), world); + .builder() + .center(new Position2(center)) + .width(w) + .height(w) + .build(), world); String msg = C.GREEN + "Pregen started in " + C.GOLD + world.getName() + C.GREEN + " of " + C.GOLD + (radius * 2) + C.GREEN + " by " + C.GOLD + (radius * 2) + C.GREEN + " blocks from " + C.GOLD + center.getX() + "," + center.getZ(); sender().sendMessage(msg); Iris.info(msg); diff --git a/src/main/java/com/volmit/iris/core/commands/CommandStudio.java b/src/main/java/com/volmit/iris/core/commands/CommandStudio.java index f5f1df1f5..d5fddfd75 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandStudio.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandStudio.java @@ -71,23 +71,22 @@ import java.util.function.Supplier; @Decree(name = "studio", aliases = {"std", "s"}, description = "Studio Commands", studio = true) public class CommandStudio implements DecreeExecutor { + private CommandFind find; + private CommandEdit edit; + public static String hrf(Duration duration) { return duration.toString().substring(2).replaceAll("(\\d[HMS])(?!$)", "$1 ").toLowerCase(); } - private CommandFind find; - private CommandEdit edit; - - @Decree(description = "Download a project.", aliases = "dl") public void download( - @Param(name = "pack", description = "The pack to download", defaultValue = "overworld", aliases = "project") + @Param(name = "pack", description = "The pack to download", defaultValue = "overworld", aliases = "project") String pack, - @Param(name = "branch", description = "The branch to download from", defaultValue = "master") + @Param(name = "branch", description = "The branch to download from", defaultValue = "master") String branch, - @Param(name = "trim", description = "Whether or not to download a trimmed version (do not enable when editing)", defaultValue = "false") + @Param(name = "trim", description = "Whether or not to download a trimmed version (do not enable when editing)", defaultValue = "false") boolean trim, - @Param(name = "overwrite", description = "Whether or not to overwrite the pack with the downloaded one", aliases = "force", defaultValue = "false") + @Param(name = "overwrite", description = "Whether or not to overwrite the pack with the downloaded one", aliases = "force", defaultValue = "false") boolean overwrite ) { new CommandIris().download(pack, branch, trim, overwrite); @@ -95,9 +94,9 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Open a new studio world", aliases = "o", sync = true) public void open( - @Param(defaultValue = "default", description = "The dimension to open a studio for", aliases = "dim") + @Param(defaultValue = "default", description = "The dimension to open a studio for", aliases = "dim") IrisDimension dimension, - @Param(defaultValue = "1337", description = "The seed to generate the studio with", aliases = "s") + @Param(defaultValue = "1337", description = "The seed to generate the studio with", aliases = "s") long seed) { sender().sendMessage(C.GREEN + "Opening studio for the \"" + dimension.getName() + "\" pack (seed: " + seed + ")"); Iris.service(StudioSVC.class).open(sender(), seed, dimension.getLoadKey()); @@ -105,7 +104,7 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Open VSCode for a dimension", aliases = {"vsc", "edit"}) public void vscode( - @Param(defaultValue = "default", description = "The dimension to open VSCode for", aliases = "dim") + @Param(defaultValue = "default", description = "The dimension to open VSCode for", aliases = "dim") IrisDimension dimension ) { sender().sendMessage(C.GREEN + "Opening VSCode for the \"" + dimension.getName() + "\" pack"); @@ -125,9 +124,9 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Create a new studio project", aliases = "+", sync = true) public void create( - @Param(description = "The name of this new Iris Project.") + @Param(description = "The name of this new Iris Project.") String name, - @Param(description = "Copy the contents of an existing project in your packs folder and use it as a template in this new project.", contextual = true) + @Param(description = "Copy the contents of an existing project in your packs folder and use it as a template in this new project.", contextual = true) IrisDimension template) { if(template != null) { Iris.service(StudioSVC.class).create(sender(), name, template.getLoadKey()); @@ -138,7 +137,7 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Get the version of a pack") public void version( - @Param(defaultValue = "default", description = "The dimension get the version of", aliases = "dim", contextual = true) + @Param(defaultValue = "default", description = "The dimension get the version of", aliases = "dim", contextual = true) IrisDimension dimension ) { sender().sendMessage(C.GREEN + "The \"" + dimension.getName() + "\" pack has version: " + dimension.getVersion()); @@ -152,7 +151,7 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Execute a script", aliases = "run", origin = DecreeOrigin.PLAYER) public void execute( - @Param(description = "The script to run") + @Param(description = "The script to run") IrisScript script ) { engine().getExecution().execute(script.getLoadKey()); @@ -177,9 +176,9 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Preview noise gens (External GUI)", aliases = {"generator", "gen"}) public void explore( - @Param(description = "The generator to explore", contextual = true) + @Param(description = "The generator to explore", contextual = true) IrisGenerator generator, - @Param(description = "The seed to generate with", defaultValue = "12345") + @Param(description = "The seed to generate with", defaultValue = "12345") long seed ) { if(noGUI()) return; @@ -208,9 +207,9 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Show loot if a chest were right here", origin = DecreeOrigin.PLAYER, sync = true) public void loot( - @Param(description = "Fast insertion of items in virtual inventory (may cause performance drop)", defaultValue = "false") + @Param(description = "Fast insertion of items in virtual inventory (may cause performance drop)", defaultValue = "false") boolean fast, - @Param(description = "Whether or not to append to the inventory currently open (if false, clears opened inventory)", defaultValue = "true") + @Param(description = "Whether or not to append to the inventory currently open (if false, clears opened inventory)", defaultValue = "true") boolean add ) { if(noStudio()) return; @@ -251,7 +250,7 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Render a world map (External GUI)", aliases = "render") public void map( - @Param(name = "world", description = "The world to open the generator for", contextual = true) + @Param(name = "world", description = "The world to open the generator for", contextual = true) World world ) { if(noGUI()) return; @@ -267,11 +266,11 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Package a dimension into a compressed format", aliases = "package") public void pkg( - @Param(name = "dimension", description = "The dimension pack to compress", contextual = true, defaultValue = "default") + @Param(name = "dimension", description = "The dimension pack to compress", contextual = true, defaultValue = "default") IrisDimension dimension, - @Param(name = "obfuscate", 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, - @Param(name = "minify", 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 ) { Iris.service(StudioSVC.class).compilePackage(sender(), dimension.getLoadKey(), obfuscate, minify); @@ -279,7 +278,7 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Profiles the performance of a dimension", origin = DecreeOrigin.PLAYER) public void profile( - @Param(description = "The dimension to profile", contextual = true, defaultValue = "default") + @Param(description = "The dimension to profile", contextual = true, defaultValue = "default") IrisDimension dimension ) { File pack = dimension.getLoadFile().getParentFile().getParentFile(); @@ -467,9 +466,9 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Summon an Iris Entity", origin = DecreeOrigin.PLAYER) public void summon( - @Param(description = "The Iris Entity to spawn") + @Param(description = "The Iris Entity to spawn") IrisEntity entity, - @Param(description = "The location at which to spawn the entity", defaultValue = "self") + @Param(description = "The location at which to spawn the entity", defaultValue = "self") Vector location ) { if(!sender().isPlayer()) { @@ -500,7 +499,7 @@ public class CommandStudio implements DecreeExecutor { @Decree(description = "Update your dimension projects VSCode workspace") public void update( - @Param(description = "The dimension to update the workspace of", contextual = true, defaultValue = "default") + @Param(description = "The dimension to update the workspace of", contextual = true, defaultValue = "default") IrisDimension dimension ) { sender().sendMessage(C.GOLD + "Updating Code Workspace for " + dimension.getName() + "..."); @@ -666,7 +665,7 @@ public class CommandStudio implements DecreeExecutor { String n3 = nn3; objects.computeIfAbsent(n1, (k1) -> new KMap<>()) - .computeIfAbsent(n2, (k) -> new KList<>()).addIfMissing(n3); + .computeIfAbsent(n2, (k) -> new KList<>()).addIfMissing(n3); } } } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandWhat.java b/src/main/java/com/volmit/iris/core/commands/CommandWhat.java index 4b06f8c76..d59568776 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandWhat.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandWhat.java @@ -138,10 +138,10 @@ public class CommandWhat implements DecreeExecutor { for(int xxx = c.getX() - 4; xxx <= c.getX() + 4; xxx++) { for(int zzz = c.getZ() - 4; zzz <= c.getZ() + 4; zzz++) { IrisToolbelt.access(c.getWorld()).getEngine().getMantle().findMarkers(xxx, zzz, new MatterMarker(marker)) - .convert((i) -> i.toLocation(c.getWorld())).forEach((i) -> { - J.s(() -> BlockSignal.of(i.getBlock(), 100)); - v.incrementAndGet(); - }); + .convert((i) -> i.toLocation(c.getWorld())).forEach((i) -> { + J.s(() -> BlockSignal.of(i.getBlock(), 100)); + v.incrementAndGet(); + }); } } diff --git a/src/main/java/com/volmit/iris/engine/framework/Engine.java b/src/main/java/com/volmit/iris/engine/framework/Engine.java index b527b904d..f2db7517f 100644 --- a/src/main/java/com/volmit/iris/engine/framework/Engine.java +++ b/src/main/java/com/volmit/iris/engine/framework/Engine.java @@ -473,7 +473,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat if(i == null) continue; b++; - items.addAll(i.getLoot(debug, items.isEmpty(), rng, slot, x, y, z, b + b, mgf + b)); + items.addAll(i.getLoot(debug, rng, slot, x, y, z)); } if(PaperLib.isPaper() && getWorld().hasRealWorld()) { diff --git a/src/main/java/com/volmit/iris/engine/object/IrisEntity.java b/src/main/java/com/volmit/iris/engine/object/IrisEntity.java index 4dc771ad1..99f272719 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisEntity.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisEntity.java @@ -257,7 +257,7 @@ public class IrisEntity extends IrisRegistrant { for(String fi : getLoot().getTables()) { IrisLootTable i = gen.getData().getLootLoader().load(fi); - items.addAll(i.getLoot(gen.isStudio(), false, rng.nextParallelRNG(345911), InventorySlotType.STORAGE, finalAt.getBlockX(), finalAt.getBlockY(), finalAt.getBlockZ(), 8, 4)); + items.addAll(i.getLoot(gen.isStudio(), rng.nextParallelRNG(345911), InventorySlotType.STORAGE, finalAt.getBlockX(), finalAt.getBlockY(), finalAt.getBlockZ())); } return items; diff --git a/src/main/java/com/volmit/iris/engine/object/IrisLootTable.java b/src/main/java/com/volmit/iris/engine/object/IrisLootTable.java index 3e18957f8..6f6a02360 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisLootTable.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisLootTable.java @@ -63,7 +63,7 @@ public class IrisLootTable extends IrisRegistrant { @ArrayType(min = 1, type = IrisLoot.class) private KList loot = new KList<>(); - public KList getLoot(boolean debug, boolean doSomething, RNG rng, InventorySlotType slot, int x, int y, int z, int gg, int ffs) { + public KList getLoot(boolean debug, RNG rng, InventorySlotType slot, int x, int y, int z) { KList lootf = new KList<>(); int m = 0;