Merge pull request #599 from CocoTheOwner/Fixes

aliases, startup NPE, pick option when console
This commit is contained in:
Dan 2021-09-09 08:22:05 -04:00 committed by GitHub
commit e3adbbbd0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 26 deletions

View File

@ -32,7 +32,7 @@ def main = 'com.volmit.iris.Iris'
registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins', name)
registerCustomOutputTask('Psycho', 'D://Dan/MinecraftDevelopment/server/plugins', name)
registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/server/plugins', name)
registerCustomOutputTask('Coco', 'C:/Users/sjoer/Documents/Development/MCServer/plugins', name)
registerCustomOutputTask('Coco', 'C://Users/sjoer/Desktop/MCSM/plugins', name)
registerCustomOutputTask('Strange', 'D://Servers/1.17 Test Server/plugins', name)
// ==============================================================

View File

@ -695,7 +695,7 @@ public class Iris extends VolmitPlugin implements Listener {
IrisDimension dim = data.getDimensionLoader().load(j.getName().split("\\Q.\\E")[0]);
if (dim == null) {
Iris.error("Failed to load " + j.getPath());
Iris.error("Failed to load " + j.getPath() + " ");
continue;
}

View File

@ -53,7 +53,7 @@ public class CommandIris implements DecreeExecutor {
private CommandJigsaw jigsaw;
private CommandWhat what;
@Decree(description = "Create a new world", aliases = "+")
@Decree(description = "Create a new world", aliases = {"+", "c"})
public void create(
@Param(aliases = "world-name", description = "The name of the world to create")
String name,
@ -191,21 +191,19 @@ public class CommandIris implements DecreeExecutor {
PlatformChunkGenerator plat = IrisToolbelt.access(player().getWorld());
Engine engine = plat.getEngine();
try {
int vd = radius;
int rg = 0;
Chunk cx = player().getLocation().getChunk();
KList<Runnable> js = new KList<>();
BurstExecutor b = MultiBurst.burst.burst();
b.setMulticore(false);
int rad = engine.getMantle().getRealRadius();
for (int i = -(vd + rad); i <= vd + rad; i++) {
for (int j = -(vd + rad); j <= vd + rad; j++) {
for (int i = -(radius + rad); i <= radius + rad; i++) {
for (int j = -(radius + rad); j <= radius + rad; j++) {
engine.getMantle().getMantle().deleteChunk(i + cx.getX(), j + cx.getZ());
}
}
for (int i = -vd; i <= vd; i++) {
for (int j = -vd; j <= vd; j++) {
for (int i = -radius; i <= radius; i++) {
for (int j = -radius; j <= radius; j++) {
int finalJ = j;
int finalI = i;
b.queue(() -> plat.injectChunkReplacement(player().getWorld(), finalI + cx.getX(), finalJ + cx.getZ(), (f) -> {

View File

@ -191,7 +191,7 @@ public class CommandObject implements DecreeExecutor {
}
}
@Decree(description = "Get a powder that reveals objects", studio = true)
@Decree(description = "Get a powder that reveals objects", studio = true, aliases = "d")
public void dust() {
player().getInventory().addItem(WandSVC.createDust());
sender().playSound(Sound.AMBIENT_SOUL_SAND_VALLEY_ADDITIONS, 1f, 1.5f);

View File

@ -158,8 +158,14 @@ public class ResourceLoader<T extends IrisRegistrant> {
}
KSet<String> m = new KSet<>();
KList<File> files = getFolders();
for (File i : getFolders()) {
if (files == null) {
possibleKeys = new String[0];
return possibleKeys;
}
for (File i : files) {
for (File j : matchAllFiles(i, (f) -> f.getName().endsWith(".json"))) {
m.add(i.toURI().relativize(j.toURI()).getPath().replaceAll("\\Q.json\\E", ""));
}

View File

@ -134,7 +134,7 @@ public class IrisEngine implements Engine {
context = new IrisContext(this);
cleaning = new AtomicBoolean(false);
context.touch();
Iris.info("Initializing Engine: " + target.getWorld().name() + "/" + target.getDimension().getLoadKey() + " (" + 256 + " height) Seed: " + getSeedManager().toString());
Iris.info("Initializing Engine: " + target.getWorld().name() + "/" + target.getDimension().getLoadKey() + " (" + 256 + " height) Seed: " + getSeedManager().getSeed());
getData().setEngine(this);
minHeight = 0;
failing = false;

View File

@ -460,7 +460,7 @@ public class VirtualDecreeCommand {
value = update;
}
if (i.isContextual() && value == null) {
if (sender.isPlayer() && i.isContextual() && value == null) {
DecreeContextHandler<?> ch = DecreeContextHandler.contextHandlers.get(i.getType());
if (ch != null) {

View File

@ -543,30 +543,26 @@ public class VolmitSender implements CommandSender {
String nHoverTitle = p.getNames().convert((ff) -> "<#d665f0>" + ff).toString(", ");
String nDescription = "<#3fe05a>✎ <#6ad97d><font:minecraft:uniform>" + p.getDescription();
String nUsage;
String context = "";
if (p.isRequired()) {
String fullTitle;
if (p.isContextual() && isPlayer()) {
fullTitle = "<#ffcc00>[" + nTitle + "<#ffcc00>] ";
nUsage = "<#ff9900>➱ <#ffcc00><font:minecraft:uniform>The value may be derived from environment context.";
} else if (p.isRequired()) {
fullTitle = "<red>[" + nTitle + "<red>] ";
nUsage = "<#db4321>⚠ <#faa796><font:minecraft:uniform>This parameter is required.";
} else if (p.hasDefault()) {
fullTitle = "<#4f4f4f>⊰" + nTitle + "<#4f4f4f>⊱";
nUsage = "<#2181db>✔ <#78dcf0><font:minecraft:uniform>Defaults to \"" + p.getParam().defaultValue() + "\" if undefined.";
} else {
fullTitle = "<#4f4f4f>⊰" + nTitle + "<#4f4f4f>⊱";
nUsage = "<#a73abd>✔ <#78dcf0><font:minecraft:uniform>This parameter is optional.";
}
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()) {
fullTitle = "<red>[" + nTitle + "<red>] ";
} else {
fullTitle = "<#4f4f4f>⊰" + nTitle + "<#4f4f4f>⊱";
}
String type = "<#cc00ff>✢ <#ff33cc><font:minecraft:uniform>This parameter is of type " + p.getType().getSimpleName() + ".";
nodes
.append("<hover:show_text:'")
.append(nHoverTitle).append(newline)
.append(nDescription).append(newline)
.append(context)
.append(nUsage).append(newline)
.append(type)
.append("'>")