mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-27 19:19:07 +00:00
Cleanup
This commit is contained in:
@@ -441,7 +441,7 @@ public class B {
|
||||
return isLit(mat)
|
||||
|| isStorage(mat)
|
||||
|| (mat instanceof PointedDripstone
|
||||
&& ((PointedDripstone)mat).getThickness().equals(PointedDripstone.Thickness.TIP));
|
||||
&& ((PointedDripstone) mat).getThickness().equals(PointedDripstone.Thickness.TIP));
|
||||
}
|
||||
|
||||
public static boolean isFoliage(Material d) {
|
||||
@@ -525,6 +525,6 @@ public class B {
|
||||
}
|
||||
|
||||
public static boolean isWaterLogged(BlockData b) {
|
||||
return (b instanceof Waterlogged) && ((Waterlogged)b).isWaterlogged();
|
||||
return (b instanceof Waterlogged) && ((Waterlogged) b).isWaterlogged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,13 +52,13 @@ public class DecreeNode {
|
||||
|
||||
for (Parameter i : method.getParameters()) {
|
||||
DecreeParameter p = new DecreeParameter(i);
|
||||
if (p.isRequired()){
|
||||
if (p.isRequired()) {
|
||||
required.add(p);
|
||||
} else {
|
||||
optional.add(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
required.addAll(optional);
|
||||
|
||||
return required;
|
||||
|
||||
@@ -60,8 +60,7 @@ public interface DecreeSystem extends CommandExecutor, TabCompleter {
|
||||
|
||||
@Override
|
||||
default boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
if(!sender.hasPermission("iris.all"))
|
||||
{
|
||||
if (!sender.hasPermission("iris.all")) {
|
||||
sender.sendMessage("You lack the Permission 'iris.all'");
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.volmit.iris.util.decree.DecreeSystem;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeWhichException;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.plugin.VolmitSender;
|
||||
import org.bukkit.FluidCollisionMode;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.BlockVector;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class WorldHandler implements DecreeParameterHandler<World> {
|
||||
public KList<World> getPossibilities() {
|
||||
KList<World> options = new KList<>();
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
if (!world.getName().toLowerCase().startsWith("iris/")){
|
||||
if (!world.getName().toLowerCase().startsWith("iris/")) {
|
||||
options.add(world);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,10 @@
|
||||
|
||||
package com.volmit.iris.util.mantle;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.data.cache.Cache;
|
||||
import com.volmit.iris.engine.mantle.EngineMantle;
|
||||
import com.volmit.iris.engine.mantle.MantleWriter;
|
||||
import com.volmit.iris.engine.object.basic.IrisPosition;
|
||||
import com.volmit.iris.engine.object.feature.IrisFeaturePositional;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
@@ -33,21 +31,16 @@ import com.volmit.iris.util.documentation.RegionCoordinates;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.function.Consumer4;
|
||||
import com.volmit.iris.util.math.INode;
|
||||
import com.volmit.iris.util.math.KochanekBartelsInterpolation;
|
||||
import com.volmit.iris.util.math.M;
|
||||
import com.volmit.iris.util.math.PathInterpolation;
|
||||
import com.volmit.iris.util.matter.Matter;
|
||||
import com.volmit.iris.util.matter.MatterCavern;
|
||||
import com.volmit.iris.util.parallel.BurstExecutor;
|
||||
import com.volmit.iris.util.parallel.HyperLock;
|
||||
import com.volmit.iris.util.parallel.MultiBurst;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
@@ -243,11 +243,9 @@ public class MantleChunk {
|
||||
}
|
||||
|
||||
public void deleteSlices(Class<?> c) {
|
||||
for(int i = 0; i < sections.length(); i++)
|
||||
{
|
||||
for (int i = 0; i < sections.length(); i++) {
|
||||
Matter m = sections.get(i);
|
||||
if(m != null && m.hasSlice(c))
|
||||
{
|
||||
if (m != null && m.hasSlice(c)) {
|
||||
m.deleteSlice(c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@ package com.volmit.iris.util.matter.slices;
|
||||
|
||||
import com.volmit.iris.util.matter.MatterCavern;
|
||||
import com.volmit.iris.util.matter.Sliced;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -32,10 +30,8 @@ public class CavernMatter extends RawMatter<MatterCavern> {
|
||||
public static final MatterCavern ON = new MatterCavern(true, "");
|
||||
public static final MatterCavern OFF = new MatterCavern(false, "");
|
||||
|
||||
public static MatterCavern get(String customBiome)
|
||||
{
|
||||
if(customBiome.isEmpty())
|
||||
{
|
||||
public static MatterCavern get(String customBiome) {
|
||||
if (customBiome.isEmpty()) {
|
||||
return ON;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ package com.volmit.iris.util.matter.slices;
|
||||
|
||||
import com.volmit.iris.util.matter.MatterUpdate;
|
||||
import com.volmit.iris.util.matter.Sliced;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
@@ -388,8 +388,7 @@ public class CNG {
|
||||
return noise(dim);
|
||||
}
|
||||
|
||||
public double noiseSym(double... dim)
|
||||
{
|
||||
public double noiseSym(double... dim) {
|
||||
return (noise(dim) * 2) - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Comparator;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@@ -439,7 +438,7 @@ public class VolmitSender implements CommandSender {
|
||||
String usage = "<#bbe03f>✒ <#a8e0a2><font:minecraft:uniform>";
|
||||
String onClick;
|
||||
if (i.isNode()) {
|
||||
if (i.getNode().getParameters().isEmpty()){
|
||||
if (i.getNode().getParameters().isEmpty()) {
|
||||
usage += "There are no parameters. Click to run.";
|
||||
onClick = "run_command";
|
||||
} else {
|
||||
@@ -461,7 +460,7 @@ public class VolmitSender implements CommandSender {
|
||||
|
||||
/// Params
|
||||
StringBuilder nodes = new StringBuilder();
|
||||
if (i.isNode()){
|
||||
if (i.isNode()) {
|
||||
for (DecreeParameter p : i.getNode().getParameters()) {
|
||||
|
||||
String nTitle = "<gradient:#d665f0:#a37feb>" + p.getName();
|
||||
@@ -469,19 +468,19 @@ public class VolmitSender implements CommandSender {
|
||||
String nDescription = "<#3fe05a>✎ <#6ad97d><font:minecraft:uniform>" + p.getDescription();
|
||||
String nUsage;
|
||||
String context = "";
|
||||
if (p.isRequired()){
|
||||
if (p.isRequired()) {
|
||||
nUsage = "<#db4321>⚠ <#faa796><font:minecraft:uniform>This parameter is required.";
|
||||
} else if (p.hasDefault()) {
|
||||
nUsage = "<#2181db>✔ <#78dcf0><font:minecraft:uniform>Defaults to \""+ p.getParam().defaultValue()+"\" if undefined.";
|
||||
nUsage = "<#2181db>✔ <#78dcf0><font:minecraft:uniform>Defaults to \"" + p.getParam().defaultValue() + "\" if undefined.";
|
||||
} else {
|
||||
nUsage = "<#a73abd>✔ <#78dcf0><font:minecraft:uniform>This parameter is optional.";
|
||||
}
|
||||
if (p.isContextual()){
|
||||
if (p.isContextual()) {
|
||||
context = "<#ff9900>➱ <#ffcc00><font:minecraft:uniform>The value may be derived from environment context" + newline;
|
||||
}
|
||||
String type = "<#cc00ff>✢ <#ff33cc><font:minecraft:uniform>This parameter is of type " + p.getType().getSimpleName();
|
||||
String fullTitle;
|
||||
if (p.isRequired()){
|
||||
if (p.isRequired()) {
|
||||
fullTitle = "<red>[" + nTitle + "<red>] ";
|
||||
} else {
|
||||
fullTitle = "<#4f4f4f>⊰" + nTitle + "<#4f4f4f>⊱";
|
||||
@@ -505,20 +504,20 @@ public class VolmitSender implements CommandSender {
|
||||
/// Wrapper
|
||||
String wrapper =
|
||||
"<hover:show_text:'" +
|
||||
hoverTitle + newline +
|
||||
description + newline +
|
||||
usage +
|
||||
suggestion + //Newlines for suggestions are added when they're built, to prevent blanklines.
|
||||
suggestions + // ^
|
||||
"'>" +
|
||||
"<click:" +
|
||||
onClick +
|
||||
":" +
|
||||
realText +
|
||||
"</click>" +
|
||||
"</hover>" +
|
||||
" " +
|
||||
nodes;
|
||||
hoverTitle + newline +
|
||||
description + newline +
|
||||
usage +
|
||||
suggestion + //Newlines for suggestions are added when they're built, to prevent blanklines.
|
||||
suggestions + // ^
|
||||
"'>" +
|
||||
"<click:" +
|
||||
onClick +
|
||||
":" +
|
||||
realText +
|
||||
"</click>" +
|
||||
"</hover>" +
|
||||
" " +
|
||||
nodes;
|
||||
|
||||
sendMessageRaw(wrapper);
|
||||
} else {
|
||||
|
||||
@@ -50,7 +50,8 @@ public interface Job {
|
||||
|
||||
|
||||
default void execute(VolmitSender sender) {
|
||||
execute(sender, () -> {});
|
||||
execute(sender, () -> {
|
||||
});
|
||||
}
|
||||
|
||||
default void execute(VolmitSender sender, Runnable whenComplete) {
|
||||
|
||||
Reference in New Issue
Block a user