This commit is contained in:
Brian Neumann-Fopiano
2026-07-22 14:56:50 -05:00
parent f6f06c1ab9
commit 9e1e202f15
135 changed files with 34492 additions and 1795 deletions
+1
View File
@@ -218,6 +218,7 @@ tasks.named('compileJava', JavaCompile).configure {
tasks.named('test', Test).configure {
jvmArgs('--add-modules', 'jdk.incubator.vector')
classpath += files('src/main/resources')
}
configurations.matching { it.name.startsWith('slim') }.all { }
@@ -236,6 +236,7 @@ public class IrisSettings {
@Data
public static class IrisSettingsGeneral {
public String language = "en_US";
public boolean commandSounds = true;
public boolean debug = false;
public boolean dumpMantleOnError = false;
@@ -60,6 +60,9 @@ import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
public class ServerConfigurator {
public static void configure() {
IrisSettings.IrisSettingsAutoconfiguration s = IrisSettings.get().getAutoConfiguration();
@@ -284,8 +287,8 @@ public class ServerConfigurator {
for (Player i : Bukkit.getOnlinePlayers()) {
if (i.isOp() || i.hasPermission("iris.all")) {
VolmitSender sender = new VolmitSender(i, BukkitPlatform.volmitPlugin().getTag("WARNING"));
sender.sendMessage("There are some Iris Packs that have custom biomes in them");
sender.sendMessage("You need to restart your server to use these packs.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.SERVER_CONFIGURATOR_THERE_ARE_SOME_IRIS_PACKS_THAT_HAVE_CUSTOM_BIOMES_THEM));
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.SERVER_CONFIGURATOR_YOU_NEED_RESTART_YOUR_SERVER_USE_THESE_PACKS));
}
}
@@ -20,6 +20,8 @@ package art.arcane.iris.core.edit;
import art.arcane.iris.platform.bukkit.BukkitPlatform;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.iris.core.nms.INMS;
import art.arcane.iris.core.tools.IrisToolbelt;
import art.arcane.iris.engine.framework.Engine;
@@ -31,6 +33,7 @@ import art.arcane.volmlib.util.collection.KList;
import art.arcane.volmlib.util.math.BlockPosition;
import art.arcane.volmlib.util.math.M;
import art.arcane.volmlib.util.math.RNG;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.iris.util.common.plugin.VolmitSender;
import art.arcane.iris.util.common.scheduling.J;
import lombok.Data;
@@ -130,7 +133,10 @@ public class DustRevealer {
if (a != null) {
world.playSound(block.getLocation(), Sound.ITEM_LODESTONE_COMPASS_LOCK, 1f, 0.1f);
sender.sendMessage("Found object " + a);
sender.sendMessage(IrisLanguage.text(
RuntimeUiMessages.DUST_FOUND_OBJECT,
MessageArgument.untrusted("object", a)
));
J.a(() -> {
new DustRevealer(access, world, new BlockPosition(block.getX(), block.getY(), block.getZ()), a, new KList<>());
});
@@ -154,67 +160,131 @@ public class DustRevealer {
IrisBiome caveBiome = safe(() -> engine.getCaveOrMantleBiome(x, relativeY, z));
IrisRegion region = safe(() -> engine.getRegion(x, z));
KList<String> lines = new KList<>();
lines.add("Iris Dust @ " + x + ", " + y + ", " + z);
lines.add("Block: " + block.getType().name());
KList<DustLine> lines = new KList<>();
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_HEADER,
MessageArgument.trusted("x", x),
MessageArgument.trusted("y", y),
MessageArgument.trusted("z", z)
), false));
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_BLOCK,
MessageArgument.untrusted("block", block.getType().name())
), false));
if (offset > 0) {
lines.add("Position: +" + offset + " ABOVE surface (surface Y=" + surfaceY + ")");
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_POSITION_ABOVE,
MessageArgument.trusted("offset", offset),
MessageArgument.trusted("surfaceY", surfaceY)
), true));
} else if (offset < 0) {
lines.add("Position: " + (-offset) + " below surface (surface Y=" + surfaceY + ")");
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_POSITION_BELOW,
MessageArgument.trusted("offset", -offset),
MessageArgument.trusted("surfaceY", surfaceY)
), true));
} else {
lines.add("Position: at surface (Y=" + surfaceY + ")");
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_POSITION_AT,
MessageArgument.trusted("surfaceY", surfaceY)
), true));
}
String placedBy;
if (offset > 0) {
placedBy = objectKey != null ? "object/stilt '" + objectKey + "' (above surface)" : "decoration/object/stilt (above surface)";
placedBy = objectKey != null
? IrisLanguage.text(
RuntimeUiMessages.DUST_PLACED_BY_OBJECT_ABOVE,
MessageArgument.untrusted("object", objectKey)
)
: IrisLanguage.text(RuntimeUiMessages.DUST_PLACED_BY_DECORATION_ABOVE);
} else if (objectKey != null) {
placedBy = "buried object '" + objectKey + "'";
placedBy = IrisLanguage.text(
RuntimeUiMessages.DUST_PLACED_BY_BURIED_OBJECT,
MessageArgument.untrusted("object", objectKey)
);
} else {
placedBy = "terrain layer (depth " + Math.max(0, surfaceRelative - relativeY) + " below surface)";
placedBy = IrisLanguage.text(
RuntimeUiMessages.DUST_PLACED_BY_TERRAIN,
MessageArgument.trusted("depth", Math.max(0, surfaceRelative - relativeY))
);
}
lines.add("Placed by: " + placedBy);
lines.add("Object @block: " + (objectKey == null ? "none" : objectKey));
lines.add(new DustLine(placedBy, true));
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_OBJECT_AT_BLOCK,
MessageArgument.untrusted(
"object",
objectKey == null ? IrisLanguage.text(RuntimeUiMessages.DUST_NONE) : objectKey
)
), false));
if (objectKey == null) {
String columnObject = findColumnObject(engine, x, relativeY, z, minHeight);
lines.add("Column object: " + (columnObject == null
? "none within 64 (decorator or terrain, NOT an object stilt)"
: columnObject + " -> this block is likely that object's stilt"));
lines.add(new DustLine(IrisLanguage.text(
columnObject == null
? RuntimeUiMessages.DUST_COLUMN_OBJECT_NONE
: RuntimeUiMessages.DUST_COLUMN_OBJECT,
MessageArgument.trusted(
columnObject == null ? "detail" : "object",
columnObject == null ? IrisLanguage.text(RuntimeUiMessages.DUST_COLUMN_NONE) : columnObject
)
), false));
}
if (surfaceBiome != null) {
lines.add("Surface biome: " + surfaceBiome.getLoadKey() + " (" + biomeKey(surfaceBiome.getDerivative()) + ")");
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_SURFACE_BIOME_DETAIL,
MessageArgument.untrusted("biome", surfaceBiome.getLoadKey()),
MessageArgument.untrusted("derivative", biomeKey(surfaceBiome.getDerivative()))
), false));
}
if (biomeHere != null && (surfaceBiome == null || !biomeHere.getLoadKey().equals(surfaceBiome.getLoadKey()))) {
lines.add("Biome @Y: " + biomeHere.getLoadKey());
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_BIOME_AT_Y,
MessageArgument.untrusted("biome", biomeHere.getLoadKey())
), false));
}
if (caveBiome != null && (surfaceBiome == null || !caveBiome.getLoadKey().equals(surfaceBiome.getLoadKey()))) {
lines.add("Cave/Mantle biome: " + caveBiome.getLoadKey());
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_CAVE_BIOME,
MessageArgument.untrusted("biome", caveBiome.getLoadKey())
), false));
}
try {
lines.add("Server biome: " + INMS.get().getTrueBiomeBaseKey(block.getLocation())
+ " (ID: " + INMS.get().getTrueBiomeBaseId(INMS.get().getTrueBiomeBase(block.getLocation())) + ")");
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_SERVER_BIOME,
MessageArgument.untrusted("biome", INMS.get().getTrueBiomeBaseKey(block.getLocation())),
MessageArgument.trusted("id", INMS.get().getTrueBiomeBaseId(INMS.get().getTrueBiomeBase(block.getLocation())))
), false));
} catch (Throwable e) {
IrisLogging.reportError(e);
}
if (region != null) {
lines.add("Region: " + region.getLoadKey() + " (" + region.getName() + ")");
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_REGION,
MessageArgument.untrusted("region", region.getLoadKey()),
MessageArgument.untrusted("name", region.getName())
), false));
}
Set<String> objects = safe(() -> engine.getObjectsAt(x >> 4, z >> 4));
if (objects != null && !objects.isEmpty()) {
lines.add("Objects in chunk: " + objects);
lines.add(new DustLine(IrisLanguage.text(
RuntimeUiMessages.DUST_OBJECTS_IN_CHUNK,
MessageArgument.untrusted("objects", objects)
), false));
}
sender.sendMessage(C.IRIS + "--- " + lines.get(0) + " ---");
StringBuilder payload = new StringBuilder();
sender.sendMessage(C.IRIS + lines.get(0).text());
payload.append(lines.get(0).text());
for (int i = 1; i < lines.size(); i++) {
String line = lines.get(i);
String color = (line.startsWith("Position:") || line.startsWith("Placed by:")) ? C.YELLOW.toString() : C.WHITE.toString();
sender.sendMessage(color + line);
DustLine line = lines.get(i);
sender.sendMessage((line.emphasis() ? C.YELLOW : C.WHITE) + line.text());
payload.append('\n').append(line.text());
}
sendCopyButton(sender, String.join("\n", lines));
sendCopyButton(sender, payload.toString());
}
private static String findColumnObject(Engine engine, int x, int relativeY, int z, int minHeight) {
@@ -223,7 +293,11 @@ public class DustRevealer {
try {
String up = engine.getObjectPlacementKey(x, relativeY + dy, z);
if (up != null) {
return up + " @Y=" + (relativeY + dy + minHeight) + " (above)";
return IrisLanguage.text(
RuntimeUiMessages.DUST_COLUMN_ABOVE,
MessageArgument.untrusted("object", up),
MessageArgument.trusted("y", relativeY + dy + minHeight)
);
}
} catch (Throwable ignored) {
}
@@ -232,7 +306,11 @@ public class DustRevealer {
try {
String down = engine.getObjectPlacementKey(x, relativeY - dy, z);
if (down != null) {
return down + " @Y=" + (relativeY - dy + minHeight) + " (below)";
return IrisLanguage.text(
RuntimeUiMessages.DUST_COLUMN_BELOW,
MessageArgument.untrusted("object", down),
MessageArgument.trusted("y", relativeY - dy + minHeight)
);
}
} catch (Throwable ignored) {
}
@@ -243,7 +321,7 @@ public class DustRevealer {
private static String biomeKey(Biome biome) {
if (biome == null) {
return "none";
return IrisLanguage.text(RuntimeUiMessages.DUST_NONE);
}
try {
return biome.getKey().getKey();
@@ -266,10 +344,10 @@ public class DustRevealer {
return;
}
try {
Component button = Component.text("[Click to copy these stats]")
Component button = Component.text(IrisLanguage.text(RuntimeUiMessages.DUST_COPY_BUTTON))
.color(NamedTextColor.GREEN)
.clickEvent(ClickEvent.copyToClipboard(payload))
.hoverEvent(HoverEvent.showText(Component.text("Copy block stats to clipboard")));
.hoverEvent(HoverEvent.showText(Component.text(IrisLanguage.text(RuntimeUiMessages.DUST_COPY_HOVER))));
sender.sendComponent(button);
} catch (Throwable e) {
IrisLogging.reportError(e);
@@ -293,4 +371,7 @@ public class DustRevealer {
private boolean isValidTry(BlockPosition b) {
return !hits.contains(b);
}
private record DustLine(String text, boolean emphasis) {
}
}
@@ -18,6 +18,8 @@
package art.arcane.iris.core.gui;
import art.arcane.iris.core.localization.DesktopUiMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.core.loader.IrisData;
import art.arcane.iris.engine.framework.Engine;
@@ -27,6 +29,7 @@ import art.arcane.volmlib.util.function.Function2;
import art.arcane.volmlib.util.math.M;
import art.arcane.volmlib.util.math.RNG;
import art.arcane.volmlib.util.math.RollingSequence;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.iris.util.project.noise.CNG;
import art.arcane.iris.util.common.parallel.BurstExecutor;
import art.arcane.iris.util.common.parallel.MultiBurst;
@@ -89,10 +92,12 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
private static final int SIDEBAR_WIDTH = 240;
private static final int[] HSB_LUT = new int[256];
private static final String[] CATEGORY_ORDER = {
"Pack Generators", "Simplex", "Perlin", "Cellular", "Iris", "Clover",
"Hexagon", "Vascular", "Globe", "Cubic", "Fractal", "Static",
"Nowhere", "Sierpinski", "Utility", "Other"
private static final NoiseCategory[] CATEGORY_ORDER = {
NoiseCategory.PACK_GENERATORS, NoiseCategory.SIMPLEX, NoiseCategory.PERLIN,
NoiseCategory.CELLULAR, NoiseCategory.IRIS, NoiseCategory.CLOVER, NoiseCategory.HEXAGON,
NoiseCategory.VASCULAR, NoiseCategory.GLOBE, NoiseCategory.CUBIC, NoiseCategory.FRACTAL,
NoiseCategory.STATIC, NoiseCategory.NOWHERE, NoiseCategory.SIERPINSKI, NoiseCategory.UTILITY,
NoiseCategory.OTHER
};
static {
@@ -151,7 +156,7 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
Engine engine = GuiHost.get().findActiveEngine();
EventQueue.invokeLater(() -> {
NoiseExplorerGUI nv = new NoiseExplorerGUI();
buildFrame("Noise Explorer", nv, engine, null, null);
buildFrame(IrisLanguage.plain(DesktopUiMessages.NOISE_TITLE), nv, engine, null, null);
});
}
@@ -162,7 +167,7 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
nv.loader = gen;
nv.generator = gen.get();
nv.currentName = genName;
buildFrame("Noise Explorer: " + genName, nv, engine, gen, genName);
buildFrame(IrisLanguage.plain(DesktopUiMessages.NOISE_TITLE_GENERATOR, MessageArgument.untrusted("generator", genName)), nv, engine, gen, genName);
});
}
@@ -206,7 +211,7 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
BorderFactory.createMatteBorder(0, 0, 1, 0, SEPARATOR),
BorderFactory.createEmptyBorder(8, 10, 8, 10)
));
search.putClientProperty("JTextField.placeholderText", "Search...");
search.putClientProperty("JTextField.placeholderText", IrisLanguage.plain(DesktopUiMessages.NOISE_SEARCH));
LinkedHashMap<String, List<ListItem>> categories = buildCategoryMap(nv, engine, customGen, customName);
DefaultListModel<ListItem> model = new DefaultListModel<>();
@@ -277,12 +282,12 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
nv.loader = customGen;
nv.currentName = customName;
}));
categories.put("Custom", custom);
categories.put(IrisLanguage.plain(DesktopUiMessages.NOISE_CATEGORY_CUSTOM), custom);
}
Map<String, List<NoiseStyle>> styleGroups = new LinkedHashMap<>();
Map<NoiseCategory, List<NoiseStyle>> styleGroups = new LinkedHashMap<>();
for (NoiseStyle style : NoiseStyle.values()) {
String cat = categorize(style);
NoiseCategory cat = categorize(style);
styleGroups.computeIfAbsent(cat, k -> new ArrayList<>()).add(style);
}
@@ -305,12 +310,12 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
}
} catch (Throwable ignored) {}
if (!genItems.isEmpty()) {
categories.put("Pack Generators", genItems);
categories.put(categoryLabel(NoiseCategory.PACK_GENERATORS), genItems);
}
}
for (String cat : CATEGORY_ORDER) {
if ("Pack Generators".equals(cat)) continue;
for (NoiseCategory cat : CATEGORY_ORDER) {
if (cat == NoiseCategory.PACK_GENERATORS) continue;
List<NoiseStyle> styles = styleGroups.get(cat);
if (styles != null && !styles.isEmpty()) {
List<ListItem> items = new ArrayList<>();
@@ -322,12 +327,13 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
nv.currentName = style.name();
}));
}
categories.put(cat, items);
categories.put(categoryLabel(cat), items);
}
}
for (Map.Entry<String, List<NoiseStyle>> entry : styleGroups.entrySet()) {
if (!categories.containsKey(entry.getKey())) {
for (Map.Entry<NoiseCategory, List<NoiseStyle>> entry : styleGroups.entrySet()) {
String category = categoryLabel(entry.getKey());
if (!categories.containsKey(category)) {
List<ListItem> items = new ArrayList<>();
for (NoiseStyle style : entry.getValue()) {
items.add(new ListItem(formatName(style.name()), style.name(), false, () -> {
@@ -337,30 +343,51 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
nv.currentName = style.name();
}));
}
categories.put(entry.getKey(), items);
categories.put(category, items);
}
}
return categories;
}
private static String categorize(NoiseStyle style) {
private static NoiseCategory categorize(NoiseStyle style) {
String n = style.name();
if (n.startsWith("STATIC")) return "Static";
if (n.startsWith("IRIS")) return "Iris";
if (n.startsWith("CLOVER")) return "Clover";
if (n.startsWith("VASCULAR")) return "Vascular";
if (n.equals("FLAT")) return "Utility";
if (n.startsWith("CELLULAR")) return "Cellular";
if (n.startsWith("HEX") || n.equals("HEXAGON")) return "Hexagon";
if (n.startsWith("SIERPINSKI")) return "Sierpinski";
if (n.startsWith("NOWHERE")) return "Nowhere";
if (n.startsWith("GLOB")) return "Globe";
if (n.startsWith("PERLIN")) return "Perlin";
if (n.startsWith("CUBIC") || (n.startsWith("FRACTAL") && n.contains("CUBIC"))) return "Cubic";
if (n.contains("SIMPLEX") && !n.startsWith("FRACTAL")) return "Simplex";
if (n.startsWith("FRACTAL")) return "Fractal";
return "Other";
if (n.startsWith("STATIC")) return NoiseCategory.STATIC;
if (n.startsWith("IRIS")) return NoiseCategory.IRIS;
if (n.startsWith("CLOVER")) return NoiseCategory.CLOVER;
if (n.startsWith("VASCULAR")) return NoiseCategory.VASCULAR;
if (n.equals("FLAT")) return NoiseCategory.UTILITY;
if (n.startsWith("CELLULAR")) return NoiseCategory.CELLULAR;
if (n.startsWith("HEX") || n.equals("HEXAGON")) return NoiseCategory.HEXAGON;
if (n.startsWith("SIERPINSKI")) return NoiseCategory.SIERPINSKI;
if (n.startsWith("NOWHERE")) return NoiseCategory.NOWHERE;
if (n.startsWith("GLOB")) return NoiseCategory.GLOBE;
if (n.startsWith("PERLIN")) return NoiseCategory.PERLIN;
if (n.startsWith("CUBIC") || (n.startsWith("FRACTAL") && n.contains("CUBIC"))) return NoiseCategory.CUBIC;
if (n.contains("SIMPLEX") && !n.startsWith("FRACTAL")) return NoiseCategory.SIMPLEX;
if (n.startsWith("FRACTAL")) return NoiseCategory.FRACTAL;
return NoiseCategory.OTHER;
}
private static String categoryLabel(NoiseCategory category) {
return IrisLanguage.plain(switch (category) {
case PACK_GENERATORS -> DesktopUiMessages.NOISE_CATEGORY_PACK_GENERATORS;
case SIMPLEX -> DesktopUiMessages.NOISE_CATEGORY_SIMPLEX;
case PERLIN -> DesktopUiMessages.NOISE_CATEGORY_PERLIN;
case CELLULAR -> DesktopUiMessages.NOISE_CATEGORY_CELLULAR;
case IRIS -> DesktopUiMessages.NOISE_CATEGORY_IRIS;
case CLOVER -> DesktopUiMessages.NOISE_CATEGORY_CLOVER;
case HEXAGON -> DesktopUiMessages.NOISE_CATEGORY_HEXAGON;
case VASCULAR -> DesktopUiMessages.NOISE_CATEGORY_VASCULAR;
case GLOBE -> DesktopUiMessages.NOISE_CATEGORY_GLOBE;
case CUBIC -> DesktopUiMessages.NOISE_CATEGORY_CUBIC;
case FRACTAL -> DesktopUiMessages.NOISE_CATEGORY_FRACTAL;
case STATIC -> DesktopUiMessages.NOISE_CATEGORY_STATIC;
case NOWHERE -> DesktopUiMessages.NOISE_CATEGORY_NOWHERE;
case SIERPINSKI -> DesktopUiMessages.NOISE_CATEGORY_SIERPINSKI;
case UTILITY -> DesktopUiMessages.NOISE_CATEGORY_UTILITY;
case OTHER -> DesktopUiMessages.NOISE_CATEGORY_OTHER;
});
}
private static String formatName(String enumName) {
@@ -500,8 +527,15 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
int fps = frameMs > 0 ? (int) (1000.0 / frameMs) : 0;
String status = String.format(" %s | X: %.1f Z: %.1f | Zoom: %.4f | Value: %.4f | %d FPS",
currentName, worldX, worldZ, animScale, noiseVal, fps);
String status = IrisLanguage.plain(
DesktopUiMessages.NOISE_STATUS,
MessageArgument.untrusted("name", currentName),
MessageArgument.trusted("x", String.format("%.1f", worldX)),
MessageArgument.trusted("z", String.format("%.1f", worldZ)),
MessageArgument.trusted("zoom", String.format("%.4f", animScale)),
MessageArgument.trusted("value", String.format("%.4f", noiseVal)),
MessageArgument.trusted("fps", fps)
);
g.drawString(status, 8, y + 18);
int barW = 60;
@@ -554,4 +588,23 @@ public class NoiseExplorerGUI extends JPanel implements MouseWheelListener {
return this;
}
}
private enum NoiseCategory {
PACK_GENERATORS,
SIMPLEX,
PERLIN,
CELLULAR,
IRIS,
CLOVER,
HEXAGON,
VASCULAR,
GLOBE,
CUBIC,
FRACTAL,
STATIC,
NOWHERE,
SIERPINSKI,
UTILITY,
OTHER
}
}
@@ -18,6 +18,8 @@
package art.arcane.iris.core.gui;
import art.arcane.iris.core.localization.DesktopUiMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.core.IrisSettings;
import art.arcane.volmlib.util.collection.KList;
@@ -118,13 +120,13 @@ public final class PregenRenderer extends JPanel implements KeyListener {
int hh = 20;
if (source.paused()) {
g.drawString("PAUSED", 20, hh += h);
g.drawString("Press P to Resume", 20, hh += h);
g.drawString(IrisLanguage.plain(DesktopUiMessages.PREGEN_PAUSED), 20, hh += h);
g.drawString(IrisLanguage.plain(DesktopUiMessages.PREGEN_RESUME_HINT), 20, hh += h);
} else {
for (String i : prog) {
g.drawString(i, 20, hh += h);
}
g.drawString("Press P to Pause", 20, hh += h);
g.drawString(IrisLanguage.plain(DesktopUiMessages.PREGEN_PAUSE_HINT), 20, hh += h);
}
J.sleep(IrisSettings.get().getGui().isMaximumPregenGuiFPS() ? 4 : 250);
@@ -18,6 +18,8 @@
package art.arcane.iris.core.gui;
import art.arcane.iris.core.localization.DesktopUiMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.spi.IrisServices;
import art.arcane.iris.spi.protocol.IrisMessage;
@@ -33,6 +35,7 @@ import art.arcane.volmlib.util.format.Form;
import art.arcane.volmlib.util.format.MemoryMonitor;
import art.arcane.volmlib.util.function.Consumer2;
import art.arcane.volmlib.util.mantle.runtime.Mantle;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.volmlib.util.math.Position2;
import art.arcane.volmlib.util.scheduling.ChronoLatch;
import art.arcane.iris.util.common.scheduling.J;
@@ -77,7 +80,7 @@ public class PregeneratorJob implements PregenListener, PregenRenderSource {
private volatile long lastTotalChunks = 0L;
private volatile long lastEta = 0L;
private volatile long lastElapsed = 0L;
private volatile String lastMethod = "Void";
private volatile String lastMethod = IrisLanguage.plain(DesktopUiMessages.PREGEN_METHOD_PENDING);
public PregeneratorJob(PregenTask task, PregeneratorMethod method, Engine engine) {
instance.updateAndGet(old -> {
@@ -90,7 +93,7 @@ public class PregeneratorJob implements PregenListener, PregenRenderSource {
this.engine = engine;
monitor = new MemoryMonitor(50);
saving = false;
info = new String[]{"Initializing..."};
info = new String[]{IrisLanguage.plain(DesktopUiMessages.PREGEN_INITIALIZING)};
this.task = task;
this.pregenerator = new IrisPregenerator(task, method, this);
max = new Position2(Integer.MIN_VALUE, Integer.MIN_VALUE);
@@ -320,7 +323,7 @@ public class PregeneratorJob implements PregenListener, PregenRenderSource {
public void open() {
J.a(() -> {
try {
renderer = PregenRenderer.open("Pregen View", this, PregeneratorJob::pauseResume);
renderer = PregenRenderer.open(IrisLanguage.plain(DesktopUiMessages.PREGEN_TITLE), this, PregeneratorJob::pauseResume);
drawFunction = renderer.drawFunction();
} catch (Throwable ignored) {
IrisLogging.error("Error opening pregen gui");
@@ -339,12 +342,31 @@ public class PregeneratorJob implements PregenListener, PregenRenderSource {
lastMethod = method;
info = new String[]{
(paused() ? "PAUSED" : (saving ? "Saving... " : "Generating")) + " " + Form.f(generated) + " of " + Form.f(totalChunks) + " (" + Form.pc(percent, 0) + " Complete)",
"Speed: " + (cached ? "Cached " : "") + Form.f(chunksPerSecond, 0) + " Chunks/s, " + Form.f(regionsPerMinute, 1) + " Regions/m, " + Form.f(chunksPerMinute, 0) + " Chunks/m",
Form.duration(eta, 2) + " Remaining " + " (" + Form.duration(elapsed, 2) + " Elapsed)",
"Generation Method: " + method,
"Memory: " + Form.memSize(monitor.getUsedBytes(), 2) + " (" + Form.pc(monitor.getUsagePercent(), 0) + ") Pressure: " + Form.memSize(monitor.getPressure(), 0) + "/s",
IrisLanguage.plain(
paused() ? DesktopUiMessages.PREGEN_PROGRESS_PAUSED
: saving ? DesktopUiMessages.PREGEN_PROGRESS_SAVING : DesktopUiMessages.PREGEN_PROGRESS_GENERATING,
MessageArgument.trusted("generated", Form.f(generated)),
MessageArgument.trusted("total", Form.f(totalChunks)),
MessageArgument.trusted("percent", Form.pc(percent, 0))
),
IrisLanguage.plain(
cached ? DesktopUiMessages.PREGEN_SPEED_CACHED : DesktopUiMessages.PREGEN_SPEED,
MessageArgument.trusted("chunksPerSecond", Form.f(chunksPerSecond, 0)),
MessageArgument.trusted("regionsPerMinute", Form.f(regionsPerMinute, 1)),
MessageArgument.trusted("chunksPerMinute", Form.f(chunksPerMinute, 0))
),
IrisLanguage.plain(
DesktopUiMessages.PREGEN_TIME,
MessageArgument.trusted("remaining", Form.duration(eta, 2)),
MessageArgument.trusted("elapsed", Form.duration(elapsed, 2))
),
IrisLanguage.plain(DesktopUiMessages.PREGEN_METHOD, MessageArgument.untrusted("method", String.valueOf(method))),
IrisLanguage.plain(
DesktopUiMessages.PREGEN_MEMORY,
MessageArgument.trusted("used", Form.memSize(monitor.getUsedBytes(), 2)),
MessageArgument.trusted("usage", Form.pc(monitor.getUsagePercent(), 0)),
MessageArgument.trusted("pressure", Form.memSize(monitor.getPressure(), 0))
)
};
for (Consumer<Double> i : onProgress) {
@@ -18,6 +18,8 @@
package art.arcane.iris.core.gui;
import art.arcane.iris.core.localization.DesktopUiMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.engine.framework.render.IrisRenderer;
import art.arcane.iris.engine.framework.render.RenderType;
import art.arcane.iris.engine.framework.Engine;
@@ -32,6 +34,7 @@ import art.arcane.volmlib.util.format.Form;
import art.arcane.volmlib.util.math.BlockPosition;
import art.arcane.volmlib.util.math.M;
import art.arcane.volmlib.util.math.RollingSequence;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.volmlib.util.scheduling.ChronoLatch;
import art.arcane.iris.util.common.scheduling.J;
import art.arcane.volmlib.util.scheduling.O;
@@ -68,7 +71,6 @@ import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -188,7 +190,7 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
}
private static void createAndShowGUI(Engine r) {
JFrame frame = new JFrame("Iris Vision");
JFrame frame = new JFrame(IrisLanguage.plain(DesktopUiMessages.VISION_TITLE));
VisionGUI nv = new VisionGUI(frame);
nv.engine = r;
nv.overlay = GuiHost.get().overlayFor(r);
@@ -208,7 +210,7 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
toolbar.setBackground(new Color(22, 22, 28));
toolbar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(45, 45, 55)));
JLabel modeLabel = new JLabel("View:");
JLabel modeLabel = new JLabel(IrisLanguage.plain(DesktopUiMessages.VISION_VIEW));
modeLabel.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 11));
modeLabel.setForeground(TEXT_SECONDARY);
modeLabel.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 2));
@@ -232,15 +234,15 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
toolbar.add(createToolbarSeparator());
JToggleButton gridBtn = createToolbarToggle("Grid", nv.grid);
JToggleButton gridBtn = createToolbarToggle(IrisLanguage.plain(DesktopUiMessages.VISION_GRID), nv.grid);
gridBtn.addActionListener(e -> { nv.toggleGrid(); gridBtn.setSelected(nv.grid); });
toolbar.add(gridBtn);
JToggleButton followBtn = createToolbarToggle("Follow", nv.follow);
JToggleButton followBtn = createToolbarToggle(IrisLanguage.plain(DesktopUiMessages.VISION_FOLLOW), nv.follow);
followBtn.addActionListener(e -> { nv.toggleFollow(); followBtn.setSelected(nv.follow); });
toolbar.add(followBtn);
JToggleButton qualityBtn = createToolbarToggle("LQ", nv.lowtile);
JToggleButton qualityBtn = createToolbarToggle(IrisLanguage.plain(DesktopUiMessages.VISION_LOW_QUALITY_SHORT), nv.lowtile);
qualityBtn.addActionListener(e -> { nv.toggleQuality(); qualityBtn.setSelected(nv.lowtile); });
toolbar.add(qualityBtn);
@@ -336,9 +338,9 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
if (e.getKeyCode() == KeyEvent.VK_ALT) alt = false;
if (e.getKeyCode() == KeyEvent.VK_F) { toggleFollow(); return; }
if (e.getKeyCode() == KeyEvent.VK_R) { dump(); notify("Refreshing"); return; }
if (e.getKeyCode() == KeyEvent.VK_R) { dump(); notify(IrisLanguage.plain(DesktopUiMessages.VISION_REFRESHING)); return; }
if (e.getKeyCode() == KeyEvent.VK_P) { toggleQuality(); return; }
if (e.getKeyCode() == KeyEvent.VK_E) { eco = !eco; dump(); notify((eco ? "30" : "60") + " FPS"); return; }
if (e.getKeyCode() == KeyEvent.VK_E) { eco = !eco; dump(); notify(IrisLanguage.plain(DesktopUiMessages.VISION_FPS, MessageArgument.trusted("fps", eco ? 30 : 60))); return; }
if (e.getKeyCode() == KeyEvent.VK_G) { toggleGrid(); return; }
if (e.getKeyCode() == KeyEvent.VK_EQUALS) {
@@ -356,7 +358,7 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
if (e.getKeyCode() == KeyEvent.VK_BACK_SLASH) {
mscale = 1D;
dump();
notify("Zoom Reset");
notify(IrisLanguage.plain(DesktopUiMessages.VISION_ZOOM_RESET));
return;
}
@@ -378,7 +380,18 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
}
private static String modeName(RenderType type) {
return Form.capitalizeWords(type.name().toLowerCase().replaceAll("\\Q_\\E", " "));
return IrisLanguage.plain(switch (type) {
case BIOME -> DesktopUiMessages.VISION_MODE_BIOME;
case BIOME_LAND -> DesktopUiMessages.VISION_MODE_BIOME_LAND;
case BIOME_SEA -> DesktopUiMessages.VISION_MODE_BIOME_SEA;
case REGION -> DesktopUiMessages.VISION_MODE_REGION;
case CAVE_LAND -> DesktopUiMessages.VISION_MODE_CAVE_LAND;
case HEIGHT -> DesktopUiMessages.VISION_MODE_HEIGHT;
case OBJECT_LOAD -> DesktopUiMessages.VISION_MODE_OBJECT_LOAD;
case DECORATOR_LOAD -> DesktopUiMessages.VISION_MODE_DECORATOR_LOAD;
case CONTINENT -> DesktopUiMessages.VISION_MODE_CONTINENT;
case LAYER_LOAD -> DesktopUiMessages.VISION_MODE_LAYER_LOAD;
});
}
void setRenderType(RenderType type) {
@@ -389,25 +402,25 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
void toggleGrid() {
grid = !grid;
notify("Grid " + (grid ? "On" : "Off"));
notify(IrisLanguage.plain(grid ? DesktopUiMessages.VISION_GRID_ENABLED : DesktopUiMessages.VISION_GRID_DISABLED));
}
void toggleFollow() {
follow = !follow;
if (followMarker != null && follow) {
notify("Following " + followMarker.label());
notify(IrisLanguage.plain(DesktopUiMessages.VISION_FOLLOWING, MessageArgument.untrusted("player", followMarker.label())));
} else if (follow) {
notify("No player in world");
notify(IrisLanguage.plain(DesktopUiMessages.VISION_NO_PLAYER));
follow = false;
} else {
notify("Follow disabled");
notify(IrisLanguage.plain(DesktopUiMessages.VISION_FOLLOW_DISABLED));
}
}
void toggleQuality() {
lowtile = !lowtile;
dump();
notify((lowtile ? "Low" : "High") + " Quality");
notify(IrisLanguage.plain(lowtile ? DesktopUiMessages.VISION_LOW_QUALITY : DesktopUiMessages.VISION_HIGH_QUALITY));
}
private void syncModeButtons() {
@@ -638,13 +651,21 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
double wz = getWorldZ(h / 2.0);
int fps = frameMs > 0 ? (int) (1000.0 / frameMs) : 0;
String left = String.format(" %s | %.1f bpp | %s x %s blocks",
modeName(currentType), mscale,
Form.f((int) (mscale * w)), Form.f((int) (mscale * h)));
String left = IrisLanguage.plain(
DesktopUiMessages.VISION_STATUS_LEFT,
MessageArgument.trusted("mode", modeName(currentType)),
MessageArgument.trusted("bpp", Form.f(mscale, 1)),
MessageArgument.trusted("width", Form.f((int) (mscale * w))),
MessageArgument.trusted("height", Form.f((int) (mscale * h)))
);
g.drawString(left, 8, y + 17);
String right = String.format("X: %s Z: %s | %d FPS ",
Form.f((int) wx), Form.f((int) wz), fps);
String right = IrisLanguage.plain(
DesktopUiMessages.VISION_STATUS_RIGHT,
MessageArgument.trusted("x", Form.f((int) wx)),
MessageArgument.trusted("z", Form.f((int) wz)),
MessageArgument.trusted("fps", fps)
);
int rw = g.getFontMetrics().stringWidth(right);
g.drawString(right, w - rw - 8, y + 17);
@@ -690,9 +711,18 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
KList<String> k = new KList<>();
k.add(nearest.label());
k.add("Pos: " + (int) nearest.worldX() + ", " + (int) nearest.worldY() + ", " + (int) nearest.worldZ());
k.add(IrisLanguage.plain(
DesktopUiMessages.VISION_ENTITY_POSITION,
MessageArgument.trusted("x", (int) nearest.worldX()),
MessageArgument.trusted("y", (int) nearest.worldY()),
MessageArgument.trusted("z", (int) nearest.worldZ())
));
if (nearest.maxHealth() > 0) {
k.add("HP: " + Form.f(nearest.health(), 1) + " / " + Form.f(nearest.maxHealth(), 1));
k.add(IrisLanguage.plain(
DesktopUiMessages.VISION_ENTITY_HEALTH,
MessageArgument.trusted("health", Form.f(nearest.health(), 1)),
MessageArgument.trusted("maximum", Form.f(nearest.maxHealth(), 1))
));
}
drawCard(w - CARD_PAD, CARD_PAD, 1, 0, g, k);
}
@@ -737,37 +767,37 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
KList<String> l = new KList<>();
l.add(biome.getName());
l.add(region.getName());
l.add("Block " + (int) getWorldX(hx) + ", " + (int) getWorldZ(hz));
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_BLOCK_POSITION, MessageArgument.trusted("x", (int) getWorldX(hx)), MessageArgument.trusted("z", (int) getWorldZ(hz))));
if (detailed) {
l.add("Chunk " + ((int) getWorldX(hx) >> 4) + ", " + ((int) getWorldZ(hz) >> 4));
l.add("Region " + (((int) getWorldX(hx) >> 4) >> 5) + ", " + (((int) getWorldZ(hz) >> 4) >> 5));
l.add("Key: " + biome.getLoadKey());
l.add("File: " + biome.getLoadFile());
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_CHUNK_POSITION, MessageArgument.trusted("x", (int) getWorldX(hx) >> 4), MessageArgument.trusted("z", (int) getWorldZ(hz) >> 4)));
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_REGION_POSITION, MessageArgument.trusted("x", (int) getWorldX(hx) >> 9), MessageArgument.trusted("z", (int) getWorldZ(hz) >> 9)));
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_BIOME_KEY, MessageArgument.untrusted("key", biome.getLoadKey())));
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_BIOME_FILE, MessageArgument.untrusted("file", String.valueOf(biome.getLoadFile()))));
}
drawCard((float) hx + 16, (float) hz, 0, 0, g, l);
}
private void renderOverlayDebug(Graphics2D g) {
KList<String> l = new KList<>();
l.add("Velocity: " + (int) velocity);
l.add("Tiles: " + positions.size() + " HD / " + fastpositions.size() + " LQ");
l.add("Workers: " + working.size() + " HD / " + workingfast.size() + " LQ");
l.add("Center: " + Form.f((int) getWorldX(getWidth() / 2.0)) + ", " + Form.f((int) getWorldZ(getHeight() / 2.0)));
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_VELOCITY, MessageArgument.trusted("velocity", (int) velocity)));
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_TILES, MessageArgument.trusted("high", positions.size()), MessageArgument.trusted("low", fastpositions.size())));
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_WORKERS, MessageArgument.trusted("high", working.size()), MessageArgument.trusted("low", workingfast.size())));
l.add(IrisLanguage.plain(DesktopUiMessages.VISION_CENTER, MessageArgument.trusted("x", Form.f((int) getWorldX(getWidth() / 2.0))), MessageArgument.trusted("z", Form.f((int) getWorldZ(getHeight() / 2.0)))));
drawCard(CARD_PAD, h - STATUS_HEIGHT - CARD_PAD, 0, 1, g, l);
}
private void renderOverlayHelp(Graphics2D g) {
KList<String> keys = new KList<>();
KList<String> descs = new KList<>();
keys.add("/"); descs.add("Toggle help");
keys.add("R"); descs.add("Refresh tiles");
keys.add("F"); descs.add("Follow player");
keys.add("+/-"); descs.add("Zoom in/out");
keys.add("\\"); descs.add("Reset zoom");
keys.add("M"); descs.add("Cycle render mode");
keys.add("P"); descs.add("Toggle tile quality");
keys.add("E"); descs.add("Toggle 30/60 FPS");
keys.add("G"); descs.add("Toggle grid");
keys.add("/"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_TOGGLE));
keys.add("R"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_REFRESH));
keys.add("F"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_FOLLOW));
keys.add("+/-"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_ZOOM));
keys.add("\\"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_RESET_ZOOM));
keys.add("M"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_CYCLE_MODE));
keys.add("P"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_QUALITY));
keys.add("E"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_FPS));
keys.add("G"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_GRID));
int ff = 0;
for (RenderType i : RenderType.values()) {
@@ -776,9 +806,9 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
descs.add(modeName(i));
}
keys.add("Shift"); descs.add("Detailed biome info");
keys.add("Ctrl+Click"); descs.add("Teleport to cursor");
keys.add("Alt+Click"); descs.add("Open biome in editor");
keys.add("Shift"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_BIOME));
keys.add("Ctrl+Click"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_TELEPORT));
keys.add("Alt+Click"); descs.add(IrisLanguage.plain(DesktopUiMessages.VISION_HELP_EDITOR));
int maxKeyW = 0;
g.setFont(FONT_HELP_KEY);
@@ -907,18 +937,18 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
}
String opened = overlay.openInEditor(getWorldX(hx), getWorldZ(hz), currentType);
if (opened != null) {
notify("Opened " + opened);
notify(IrisLanguage.plain(DesktopUiMessages.VISION_OPENED, MessageArgument.untrusted("target", opened)));
}
}
private void teleport() {
if (overlay == null) {
notify("No player in world");
notify(IrisLanguage.plain(DesktopUiMessages.VISION_NO_PLAYER));
return;
}
int xx = (int) getWorldX(hx);
int zz = (int) getWorldZ(hz);
overlay.teleport(xx, zz);
notify("Teleporting to " + xx + ", " + zz);
notify(IrisLanguage.plain(DesktopUiMessages.VISION_TELEPORTING, MessageArgument.trusted("x", xx), MessageArgument.trusted("z", zz)));
}
}
@@ -30,7 +30,7 @@ public final class PaperLibBootstrap {
}
PaperLib.setCustomEnvironment(new ModernPaperEnvironment());
IrisLogging.info("PaperLib version detection failed for MC " + bukkitVersion + "; forced modern Paper environment");
IrisLogging.debug("Installed forced-modern Paper environment for MC " + bukkitVersion + "; bundled PaperLib predates the two-digit version scheme");
}
static boolean isModernVersionScheme(String bukkitVersion) {
@@ -0,0 +1,365 @@
package art.arcane.iris.core.localization;
import art.arcane.iris.util.common.format.C;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
public final class BukkitCommandMessages {
public static final TextKey COMMAND_DATAPACK_STARTING_DATAPACK_INGEST = TextKey.of(
"iris.bukkit.commanddatapack.starting_datapack_ingest",
C.GRAY + "Starting datapack ingest..."
);
public static final TextKey COMMAND_DATAPACK_CONFIGURED_DATAPACK_IMPORTS = TextKey.of(
"iris.bukkit.commanddatapack.configured_datapack_imports",
C.GREEN + "Configured datapack imports: " + C.WHITE + "{value}"
);
public static final TextKey COMMAND_DATAPACK_MESSAGE = TextKey.of(
"iris.bukkit.commanddatapack.message",
C.GRAY + " - " + C.WHITE + "{url}"
);
public static final TextKey COMMAND_DATAPACK_INSTALLED_DATAPACKS = TextKey.of(
"iris.bukkit.commanddatapack.installed_datapacks",
C.GREEN + "Installed datapacks: " + C.WHITE + "{value}"
);
public static final TextKey COMMAND_DATAPACK_MESSAGE_2 = TextKey.of(
"iris.bukkit.commanddatapack.message_2",
C.GRAY + " - " + C.WHITE + "{value}" + C.GRAY + " " + "{value2}"
);
public static final TextKey COMMAND_DATAPACK_ADD_MODRINTH_URLS_DIMENSION_S_DATAPACKIMPORTS_LIST_THEN_RUN_IRIS = TextKey.of(
"iris.bukkit.commanddatapack.add_modrinth_urls_dimension_s_datapackimports_list_then_run_iris",
C.YELLOW + "Add Modrinth URLs to a dimension's 'datapackImports' list, then run /iris datapack ingest."
);
public static final TextKey COMMAND_DEVELOPER_GENHASH_STARTED_CHUNKS = TextKey.of(
"iris.bukkit.commanddeveloper.genhash_started_chunks",
C.GREEN + "genhash started: " + "{value}" + " chunks..."
);
public static final TextKey COMMAND_DEVELOPER_GENHASH_FAILED_AT_CHUNK = TextKey.of(
"iris.bukkit.commanddeveloper.genhash_failed_at_chunk",
C.RED + "genhash failed at chunk " + "{rx}" + "," + "{rz}" + ": " + "{value}"
);
public static final TextKey COMMAND_DEVELOPER_GENHASH_GLOBAL_CHUNKS_SOLID = TextKey.of(
"iris.bukkit.commanddeveloper.genhash_global_chunks_solid",
C.GREEN + "genhash global=" + C.GOLD + "{value}" + C.GREEN + " chunks=" + "{value2}" + " solid=" + "{solidBlocks}" + " in " + "{value3}"
);
public static final TextKey COMMAND_FIND_NOT_IRIS_WORLD = TextKey.of(
"iris.bukkit.commandfind.not_iris_world",
C.GOLD + "Not in an Iris World!"
);
public static final TextKey COMMAND_FIND_UNKNOWN_STRUCTURE = TextKey.of(
"iris.bukkit.commandfind.unknown_structure",
C.RED + "Unknown structure: " + "{structureKey}"
);
public static final TextKey COMMAND_FIND_RUN_THIS_GAME_TELEPORT_STRUCTURE = TextKey.of(
"iris.bukkit.commandfind.run_this_game_teleport_structure",
C.GOLD + "Run this in-game to teleport to a structure."
);
public static final TextKey COMMAND_FIND_LOCATING = TextKey.of(
"iris.bukkit.commandfind.locating",
C.GRAY + "Locating " + "{structureKey}" + "..."
);
public static final TextKey COMMAND_FIND_RUN_THIS_GAME_TELEPORT_STRUCTURE_2 = TextKey.of(
"iris.bukkit.commandfind.run_this_game_teleport_structure_2",
C.GOLD + "Run this in-game to teleport to a structure."
);
public static final TextKey COMMAND_FIND_LOCATING_2 = TextKey.of(
"iris.bukkit.commandfind.locating_2",
C.GRAY + "Locating " + "{structure}" + "..."
);
public static final TextKey COMMAND_FIND_TELEPORTED = TextKey.of(
"iris.bukkit.commandfind.teleported",
C.GREEN + "Teleported to " + "{structure}" + " @ " + "{value}" + ", " + "{y}" + ", " + "{value2}"
);
public static final TextKey COMMAND_IRIS_SUCCESSFULLY_REMOVED_WORLD_FOLDER = TextKey.of(
"iris.bukkit.commandiris.successfully_removed_world_folder",
C.GREEN + "Successfully removed world folder"
);
public static final TextKey COMMAND_IRIS_SUCCESSFULLY_REMOVED_WORLD_FOLDER_2 = TextKey.of(
"iris.bukkit.commandiris.successfully_removed_world_folder_2",
C.GREEN + "Successfully removed world folder"
);
public static final TextKey COMMAND_IRIS_FAILED_REMOVE_WORLD_FOLDER = TextKey.of(
"iris.bukkit.commandiris.failed_remove_world_folder",
C.RED + "Failed to remove world folder"
);
public static final TextKey COMMAND_OBJECT_NO_PACKS_WITH_OBJECTS_WERE_FOUND_ON_THIS_SERVER = TextKey.of(
"iris.bukkit.commandobject.no_packs_with_objects_were_found_on_this_server",
C.RED + "No packs with objects were found on this server."
);
public static final TextKey COMMAND_OBJECT_NO_OBJECTS_PLACE_ACROSS_SELECTED_PACK_S = TextKey.of(
"iris.bukkit.commandobject.no_objects_place_across_selected_pack_s",
C.RED + "No objects to place across the selected pack(s)."
);
public static final TextKey COMMAND_OBJECT_OPENING_OBJECT_STUDIO_OBJECTS = TextKey.of(
"iris.bukkit.commandobject.opening_object_studio_objects",
C.GREEN + "Opening Object Studio for " + "{scope}" + " (" + "{totalObjects}" + " objects)"
);
public static final TextKey COMMAND_OBJECT_FAILED_OPEN_OBJECT_STUDIO = TextKey.of(
"iris.bukkit.commandobject.failed_open_object_studio",
C.RED + "Failed to open object studio: " + "{value}"
);
public static final TextKey COMMAND_PACK_YOU_MUST_SPECIFY_PACK_NAME = TextKey.of(
"iris.bukkit.commandpack.you_must_specify_pack_name",
C.RED + "You must specify a pack name."
);
public static final TextKey COMMAND_PACK_PACK_NOT_FOUND_UNDER_PACKS = TextKey.of(
"iris.bukkit.commandpack.pack_not_found_under_packs",
C.RED + "Pack '" + "{pack}" + "' not found under packs/."
);
public static final TextKey COMMAND_PACK_MESSAGE = TextKey.of(
"iris.bukkit.commandpack.message",
C.GRAY + " - " + "{label}" + ": " + "{value}"
);
public static final TextKey COMMAND_PACK_MORE = TextKey.of(
"iris.bukkit.commandpack.more",
C.GRAY + " ... and " + "{value}" + " more."
);
public static final TextKey COMMAND_STRUCTURE_VERIFYING_STRUCTURES_FROM_WITHIN_CHUNKS = TextKey.of(
"iris.bukkit.commandstructure.verifying_structures_from_within_chunks",
C.GREEN + "Verifying structures in " + C.WHITE + "{value}" + C.GREEN + " from " + "{value2}" + "," + "{value3}" + " within " + "{searchRadius}" + " chunks..."
);
public static final TextKey COMMAND_STUDIO_IMPORTING_VANILLA_CONTENT_INTO = TextKey.of(
"iris.bukkit.commandstudio.importing_vanilla_content_into",
C.GREEN + "Importing vanilla content into " + C.WHITE + "{value}" + C.GREEN + "..."
);
public static final TextKey COMMAND_STUDIO_IMPORTVANILLA_COMPLETE_OBJECTS_STRUCTURES_WRITTEN_FAILED = TextKey.of(
"iris.bukkit.commandstudio.importvanilla_complete_objects_structures_written_failed",
C.GREEN + "importvanilla complete: " + C.WHITE + "{imported}" + C.GREEN + " objects/structures written, " + C.WHITE + "{failed}" + C.GREEN + " failed."
);
public static final TextKey COMMAND_STUDIO_TREES_OBJECTS_ARE_UNDER_OBJECTS_VANILLA_REFERENCE_THEM_FROM_BIOME = TextKey.of(
"iris.bukkit.commandstudio.trees_objects_are_under_objects_vanilla_reference_them_from_biome",
C.GRAY + "Trees/objects are under objects/vanilla/...; reference them from biome object placements."
);
public static final TextKey COMMAND_STUDIO_NO_OPEN_STUDIO_PROJECTS = TextKey.of(
"iris.bukkit.commandstudio.no_open_studio_projects",
C.RED + "No open studio projects."
);
public static final TextKey COMMAND_STUDIO_CLOSING_STUDIO = TextKey.of(
"iris.bukkit.commandstudio.closing_studio",
C.YELLOW + "Closing studio..."
);
public static final TextKey COMMAND_STUDIO_STUDIO_CLOSE_FAILED = TextKey.of(
"iris.bukkit.commandstudio.studio_close_failed",
C.RED + "Studio close failed: " + "{value}"
);
public static final TextKey COMMAND_STUDIO_STUDIO_CLOSE_FAILED_2 = TextKey.of(
"iris.bukkit.commandstudio.studio_close_failed_2",
C.RED + "Studio close failed: " + "{value}"
);
public static final TextKey COMMAND_STUDIO_STUDIO_CLOSED_REMAINING_WORLD_FAMILY_CLEANUP_WAS_QUEUED_STARTUP_FALLBACK = TextKey.of(
"iris.bukkit.commandstudio.studio_closed_remaining_world_family_cleanup_was_queued_startup_fallback",
C.YELLOW + "Studio closed. Remaining world-family cleanup was queued for startup fallback."
);
public static final TextKey COMMAND_STUDIO_STUDIO_CLOSED = TextKey.of(
"iris.bukkit.commandstudio.studio_closed",
C.GREEN + "Studio closed."
);
public static final TextKey COMMAND_STUDIO_YOU_MUST_BE_STUDIO_WORLD_TOGGLE_DEBUG_SCOREBOARD = TextKey.of(
"iris.bukkit.commandstudio.you_must_be_studio_world_toggle_debug_scoreboard",
C.RED + "You must be in a Studio world to toggle the debug scoreboard."
);
public static final TextKey COMMAND_STUDIO_STUDIO_DEBUG_SCOREBOARD = TextKey.of(
"iris.bukkit.commandstudio.studio_debug_scoreboard",
"{value}" + "Studio debug scoreboard " + "{value2}"
);
public static final TextKey COMMAND_STUDIO_COULD_NOT_UPDATE_STUDIO_DEBUG_SCOREBOARD_RIGHT_NOW = TextKey.of(
"iris.bukkit.commandstudio.could_not_update_studio_debug_scoreboard_right_now",
C.RED + "Could not update the Studio debug scoreboard right now."
);
public static final TextKey COMMAND_STUDIO_OPENED_INVENTORY = TextKey.of(
"iris.bukkit.commandstudio.opened_inventory",
C.GREEN + "Opened inventory!"
);
public static final TextKey COMMAND_STUDIO_GENERATING_DATA = TextKey.of(
"iris.bukkit.commandstudio.generating_data",
C.GRAY + "Generating data..."
);
public static final TextKey COMMAND_STUDIO_DONE = TextKey.of(
"iris.bukkit.commandstudio.done",
C.GREEN + "Done!"
);
public static final TextKey COMMAND_STUDIO_MESSAGE = TextKey.of(
"iris.bukkit.commandstudio.message",
C.GREEN + "{k}" + ": " + "{value}" + " / " + "{value2}" + "%"
);
public static final TextKey COMMAND_S_V_C_YOU_LACK_PERMISSION = TextKey.of(
"iris.bukkit.commandsvc.you_lack_permission",
"You lack the Permission '" + "{ROOTPERMISSION}" + "'"
);
public static final TextKey IRIS_ENGINE_STATUS_MESSAGE = TextKey.of(
"iris.bukkit.irisenginestatus.message",
C.DARK_PURPLE + "-------------------------"
);
public static final TextKey IRIS_ENGINE_STATUS_STATUS = TextKey.of(
"iris.bukkit.irisenginestatus.status",
C.DARK_PURPLE + "Status:"
);
public static final TextKey IRIS_ENGINE_STATUS_SERVICE = TextKey.of(
"iris.bukkit.irisenginestatus.service",
C.DARK_PURPLE + "- Service: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_METRICS = TextKey.of(
"iris.bukkit.irisenginestatus.metrics",
C.DARK_PURPLE + "- Metrics: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_MAINTENANCE_PERIOD = TextKey.of(
"iris.bukkit.irisenginestatus.maintenance_period",
C.DARK_PURPLE + "- Maintenance Period: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_WORKER_PARALLELISM = TextKey.of(
"iris.bukkit.irisenginestatus.worker_parallelism",
C.DARK_PURPLE + "- Worker Parallelism: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_ACTIVE_WORLD_TASKS = TextKey.of(
"iris.bukkit.irisenginestatus.active_world_tasks",
C.DARK_PURPLE + "- Active World Tasks: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_TECTONIC_PLATES = TextKey.of(
"iris.bukkit.irisenginestatus.tectonic_plates",
C.DARK_PURPLE + "Tectonic Plates:"
);
public static final TextKey IRIS_ENGINE_STATUS_CONFIGURED_RETENTION = TextKey.of(
"iris.bukkit.irisenginestatus.configured_retention",
C.DARK_PURPLE + "- Configured Retention: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_HEAP_USAGE = TextKey.of(
"iris.bukkit.irisenginestatus.heap_usage",
C.DARK_PURPLE + "- Heap Usage: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_RESIDENT = TextKey.of(
"iris.bukkit.irisenginestatus.resident",
C.DARK_PURPLE + "- Resident: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_QUEUED = TextKey.of(
"iris.bukkit.irisenginestatus.queued",
C.DARK_PURPLE + "- Queued: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_AVERAGE_IDLE_DURATION = TextKey.of(
"iris.bukkit.irisenginestatus.average_idle_duration",
C.DARK_PURPLE + "- Average Idle Duration: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_MAX_IDLE_DURATION = TextKey.of(
"iris.bukkit.irisenginestatus.max_idle_duration",
C.DARK_PURPLE + "- Max Idle Duration: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_MIN_IDLE_DURATION = TextKey.of(
"iris.bukkit.irisenginestatus.min_idle_duration",
C.DARK_PURPLE + "- Min Idle Duration: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_CACHES = TextKey.of(
"iris.bukkit.irisenginestatus.caches",
C.DARK_PURPLE + "Caches:"
);
public static final TextKey IRIS_ENGINE_STATUS_RESOURCE = TextKey.of(
"iris.bukkit.irisenginestatus.resource",
C.DARK_PURPLE + "- Resource: " + C.LIGHT_PURPLE + "{value}" + " (" + "{value2}" + ")"
);
public static final TextKey IRIS_ENGINE_STATUS_2D_STREAM = TextKey.of(
"iris.bukkit.irisenginestatus.2d_stream",
C.DARK_PURPLE + "- 2D Stream: " + C.LIGHT_PURPLE + "{value}" + " (" + "{value2}" + ")"
);
public static final TextKey IRIS_ENGINE_STATUS_3D_STREAM = TextKey.of(
"iris.bukkit.irisenginestatus.3d_stream",
C.DARK_PURPLE + "- 3D Stream: " + C.LIGHT_PURPLE + "{value}" + " (" + "{value2}" + ")"
);
public static final TextKey IRIS_ENGINE_STATUS_OTHER = TextKey.of(
"iris.bukkit.irisenginestatus.other",
C.DARK_PURPLE + "- Other: " + C.LIGHT_PURPLE + "{value}" + " (" + "{value2}" + ")"
);
public static final TextKey IRIS_ENGINE_STATUS_OTHER_2 = TextKey.of(
"iris.bukkit.irisenginestatus.other_2",
C.DARK_PURPLE + "Other:"
);
public static final TextKey IRIS_ENGINE_STATUS_IRIS_WORLDS = TextKey.of(
"iris.bukkit.irisenginestatus.iris_worlds",
C.DARK_PURPLE + "- Iris Worlds: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_LOADED_CHUNKS = TextKey.of(
"iris.bukkit.irisenginestatus.loaded_chunks",
C.DARK_PURPLE + "- Loaded Chunks: " + C.LIGHT_PURPLE + "{value}"
);
public static final TextKey IRIS_ENGINE_STATUS_MESSAGE_2 = TextKey.of(
"iris.bukkit.irisenginestatus.message_2",
C.DARK_PURPLE + "-------------------------"
);
private static final List<MessageKey> KEYS = List.of(
COMMAND_DATAPACK_STARTING_DATAPACK_INGEST,
COMMAND_DATAPACK_CONFIGURED_DATAPACK_IMPORTS,
COMMAND_DATAPACK_MESSAGE,
COMMAND_DATAPACK_INSTALLED_DATAPACKS,
COMMAND_DATAPACK_MESSAGE_2,
COMMAND_DATAPACK_ADD_MODRINTH_URLS_DIMENSION_S_DATAPACKIMPORTS_LIST_THEN_RUN_IRIS,
COMMAND_DEVELOPER_GENHASH_STARTED_CHUNKS,
COMMAND_DEVELOPER_GENHASH_FAILED_AT_CHUNK,
COMMAND_DEVELOPER_GENHASH_GLOBAL_CHUNKS_SOLID,
COMMAND_FIND_NOT_IRIS_WORLD,
COMMAND_FIND_UNKNOWN_STRUCTURE,
COMMAND_FIND_RUN_THIS_GAME_TELEPORT_STRUCTURE,
COMMAND_FIND_LOCATING,
COMMAND_FIND_RUN_THIS_GAME_TELEPORT_STRUCTURE_2,
COMMAND_FIND_LOCATING_2,
COMMAND_FIND_TELEPORTED,
COMMAND_IRIS_SUCCESSFULLY_REMOVED_WORLD_FOLDER,
COMMAND_IRIS_SUCCESSFULLY_REMOVED_WORLD_FOLDER_2,
COMMAND_IRIS_FAILED_REMOVE_WORLD_FOLDER,
COMMAND_OBJECT_NO_PACKS_WITH_OBJECTS_WERE_FOUND_ON_THIS_SERVER,
COMMAND_OBJECT_NO_OBJECTS_PLACE_ACROSS_SELECTED_PACK_S,
COMMAND_OBJECT_OPENING_OBJECT_STUDIO_OBJECTS,
COMMAND_OBJECT_FAILED_OPEN_OBJECT_STUDIO,
COMMAND_PACK_YOU_MUST_SPECIFY_PACK_NAME,
COMMAND_PACK_PACK_NOT_FOUND_UNDER_PACKS,
COMMAND_PACK_MESSAGE,
COMMAND_PACK_MORE,
COMMAND_STRUCTURE_VERIFYING_STRUCTURES_FROM_WITHIN_CHUNKS,
COMMAND_STUDIO_IMPORTING_VANILLA_CONTENT_INTO,
COMMAND_STUDIO_IMPORTVANILLA_COMPLETE_OBJECTS_STRUCTURES_WRITTEN_FAILED,
COMMAND_STUDIO_TREES_OBJECTS_ARE_UNDER_OBJECTS_VANILLA_REFERENCE_THEM_FROM_BIOME,
COMMAND_STUDIO_NO_OPEN_STUDIO_PROJECTS,
COMMAND_STUDIO_CLOSING_STUDIO,
COMMAND_STUDIO_STUDIO_CLOSE_FAILED,
COMMAND_STUDIO_STUDIO_CLOSE_FAILED_2,
COMMAND_STUDIO_STUDIO_CLOSED_REMAINING_WORLD_FAMILY_CLEANUP_WAS_QUEUED_STARTUP_FALLBACK,
COMMAND_STUDIO_STUDIO_CLOSED,
COMMAND_STUDIO_YOU_MUST_BE_STUDIO_WORLD_TOGGLE_DEBUG_SCOREBOARD,
COMMAND_STUDIO_STUDIO_DEBUG_SCOREBOARD,
COMMAND_STUDIO_COULD_NOT_UPDATE_STUDIO_DEBUG_SCOREBOARD_RIGHT_NOW,
COMMAND_STUDIO_OPENED_INVENTORY,
COMMAND_STUDIO_GENERATING_DATA,
COMMAND_STUDIO_DONE,
COMMAND_STUDIO_MESSAGE,
COMMAND_S_V_C_YOU_LACK_PERMISSION,
IRIS_ENGINE_STATUS_MESSAGE,
IRIS_ENGINE_STATUS_STATUS,
IRIS_ENGINE_STATUS_SERVICE,
IRIS_ENGINE_STATUS_METRICS,
IRIS_ENGINE_STATUS_MAINTENANCE_PERIOD,
IRIS_ENGINE_STATUS_WORKER_PARALLELISM,
IRIS_ENGINE_STATUS_ACTIVE_WORLD_TASKS,
IRIS_ENGINE_STATUS_TECTONIC_PLATES,
IRIS_ENGINE_STATUS_CONFIGURED_RETENTION,
IRIS_ENGINE_STATUS_HEAP_USAGE,
IRIS_ENGINE_STATUS_RESIDENT,
IRIS_ENGINE_STATUS_QUEUED,
IRIS_ENGINE_STATUS_AVERAGE_IDLE_DURATION,
IRIS_ENGINE_STATUS_MAX_IDLE_DURATION,
IRIS_ENGINE_STATUS_MIN_IDLE_DURATION,
IRIS_ENGINE_STATUS_CACHES,
IRIS_ENGINE_STATUS_RESOURCE,
IRIS_ENGINE_STATUS_2D_STREAM,
IRIS_ENGINE_STATUS_3D_STREAM,
IRIS_ENGINE_STATUS_OTHER,
IRIS_ENGINE_STATUS_OTHER_2,
IRIS_ENGINE_STATUS_IRIS_WORLDS,
IRIS_ENGINE_STATUS_LOADED_CHUNKS,
IRIS_ENGINE_STATUS_MESSAGE_2
);
private BukkitCommandMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -0,0 +1,795 @@
package art.arcane.iris.core.localization;
import art.arcane.iris.util.common.format.C;
import art.arcane.volmlib.util.localization.LinesKey;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.PluralKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
import java.util.Map;
public final class BukkitRuntimeMessages {
public static final TextKey COMMAND_PACK_PACKS_FOLDER_NOT_FOUND = TextKey.of(
"iris.bukkit.runtime.commandpack.packs_folder_not_found",
C.RED + "packs/ folder not found."
);
public static final TextKey COMMAND_PACK_NO_PACKS_VALIDATE = TextKey.of(
"iris.bukkit.runtime.commandpack.no_packs_validate",
C.YELLOW + "No packs to validate."
);
public static final TextKey COMMAND_PACK_VALIDATION_COMPLETE_BROKEN_PACKS = TextKey.of(
"iris.bukkit.runtime.commandpack.validation_complete_broken_packs",
C.GREEN + "Validation complete. Broken packs: " + "{broken}" + "/" + "{value}"
);
public static final TextKey COMMAND_PACK_PACK_NOT_FOUND_UNDER_PACKS = TextKey.of(
"iris.bukkit.runtime.commandpack.pack_not_found_under_packs",
C.RED + "Pack '" + "{pack}" + "' not found under packs/."
);
public static final TextKey COMMAND_PACK_NO_CLEANUP_CANDIDATES_FOUND_PACK = TextKey.of(
"iris.bukkit.runtime.commandpack.no_cleanup_candidates_found_pack",
C.GREEN + "No cleanup candidates found for pack '" + "{pack}" + "'."
);
public static final TextKey COMMAND_PACK_QUARANTINED_CLEANUP_CANDIDATE_S_UNDER = TextKey.of(
"iris.bukkit.runtime.commandpack.quarantined_cleanup_candidate_s_under",
C.GREEN + "Quarantined " + "{size}" + " cleanup candidate(s) under " + "{quarantinePath}" + "."
);
public static final TextKey COMMAND_PACK_CLEANUP_MODE_MUST_BE_PREVIEW_APPLY = TextKey.of(
"iris.bukkit.runtime.commandpack.cleanup_mode_must_be_preview_apply",
C.RED + "Cleanup mode must be preview or apply."
);
public static final TextKey COMMAND_PACK_NO_CLEANUP_CANDIDATES_FOUND_PACK_2 = TextKey.of(
"iris.bukkit.runtime.commandpack.no_cleanup_candidates_found_pack_2",
C.GREEN + "No cleanup candidates found for pack '" + "{pack}" + "'."
);
public static final TextKey COMMAND_PACK_CLEANUP_PREVIEW_PACK_CANDIDATE_S_NO_FILES_WERE_CHANGED = TextKey.of(
"iris.bukkit.runtime.commandpack.cleanup_preview_pack_candidate_s_no_files_were_changed",
C.YELLOW + "Cleanup preview for pack '" + "{pack}" + "': " + "{size}" + " candidate(s). No files were changed."
);
public static final TextKey COMMAND_PACK_RUN_IRIS_PACK_CLEANUP_MODE_APPLY_QUARANTINE_THESE_CANDIDATES_AFTER_FRESH_SCAN = TextKey.of(
"iris.bukkit.runtime.commandpack.run_iris_pack_cleanup_mode_apply_quarantine_these_candidates_after_fresh_scan",
C.GRAY + "Run /iris pack cleanup " + "{pack}" + " mode=apply to quarantine these candidates after a fresh scan."
);
public static final TextKey COMMAND_PACK_RESTORE_REFUSED_BECAUSE_DESTINATION_S_ALREADY_EXIST = TextKey.of(
"iris.bukkit.runtime.commandpack.restore_refused_because_destination_s_already_exist",
C.RED + "Restore refused because " + "{size}" + " destination(s) already exist."
);
public static final TextKey COMMAND_PACK_NOTHING_RESTORE_PACK = TextKey.of(
"iris.bukkit.runtime.commandpack.nothing_restore_pack",
C.YELLOW + "Nothing to restore for pack '" + "{pack}" + "'."
);
public static final TextKey COMMAND_PACK_RESTORED_FILE_S_FROM = TextKey.of(
"iris.bukkit.runtime.commandpack.restored_file_s_from",
C.GREEN + "Restored " + "{size}" + " file(s) from " + "{dumpPath}" + "."
);
public static final TextKey COMMAND_PACK_RESTORE_MODE_MUST_BE_PREVIEW_APPLY = TextKey.of(
"iris.bukkit.runtime.commandpack.restore_mode_must_be_preview_apply",
C.RED + "Restore mode must be preview or apply."
);
public static final TextKey COMMAND_PACK_NOTHING_RESTORE_PACK_2 = TextKey.of(
"iris.bukkit.runtime.commandpack.nothing_restore_pack_2",
C.YELLOW + "Nothing to restore for pack '" + "{pack}" + "'."
);
public static final TextKey COMMAND_PACK_RESTORE_PREVIEW_FILE_S_NO_FILES_WERE_CHANGED = TextKey.of(
"iris.bukkit.runtime.commandpack.restore_preview_file_s_no_files_were_changed",
C.YELLOW + "Restore preview for " + "{dumpPath}" + ": " + "{size}" + " file(s). No files were changed."
);
public static final TextKey COMMAND_PACK_RESTORE_IS_BLOCKED_BY_EXISTING_DESTINATION_S = TextKey.of(
"iris.bukkit.runtime.commandpack.restore_is_blocked_by_existing_destination_s",
C.RED + "Restore is blocked by " + "{size}" + " existing destination(s)."
);
public static final TextKey COMMAND_PACK_RUN_IRIS_PACK_RESTORE_MODE_APPLY_RESTORE_AFTER_FRESH_CONFLICT_CHECK = TextKey.of(
"iris.bukkit.runtime.commandpack.run_iris_pack_restore_mode_apply_restore_after_fresh_conflict_check",
C.GRAY + "Run /iris pack restore " + "{pack}" + " mode=apply to restore after a fresh conflict check."
);
public static final TextKey COMMAND_PACK_NO_VALIDATION_RESULTS_RECORDED_RUN_IRIS_PACK_VALIDATE_FIRST = TextKey.of(
"iris.bukkit.runtime.commandpack.no_validation_results_recorded_run_iris_pack_validate_first",
C.YELLOW + "No validation results recorded. Run /iris pack validate first."
);
public static final TextKey COMMAND_PACK_STATUS_OK = TextKey.of(
"iris.bukkit.runtime.commandpack.status.ok",
C.GREEN + "OK" + C.RESET + " {pack}" + C.GRAY + " (blocking={blocking}, warnings={warnings})"
);
public static final TextKey COMMAND_PACK_STATUS_BROKEN = TextKey.of(
"iris.bukkit.runtime.commandpack.status.broken",
C.RED + "BROKEN" + C.RESET + " {pack}" + C.GRAY + " (blocking={blocking}, warnings={warnings})"
);
public static final TextKey COMMAND_PACK_CLEANUP_FAILED = TextKey.of(
"iris.bukkit.runtime.commandpack.cleanup_failed",
C.RED + "Cleanup failed: {error}"
);
public static final TextKey COMMAND_PACK_RESTORE_FAILED = TextKey.of(
"iris.bukkit.runtime.commandpack.restore_failed",
C.RED + "Restore failed: {error}"
);
public static final TextKey COMMAND_PACK_PATH_STILL_QUARANTINED = TextKey.of(
"iris.bukkit.runtime.commandpack.path.still_quarantined",
"still quarantined"
);
public static final TextKey COMMAND_PACK_PATH_QUARANTINED = TextKey.of(
"iris.bukkit.runtime.commandpack.path.quarantined",
"quarantined"
);
public static final TextKey COMMAND_PACK_PATH_CANDIDATE = TextKey.of(
"iris.bukkit.runtime.commandpack.path.candidate",
"candidate"
);
public static final TextKey COMMAND_PACK_PATH_CONFLICT = TextKey.of(
"iris.bukkit.runtime.commandpack.path.conflict",
"conflict"
);
public static final TextKey COMMAND_PACK_PATH_RESTORED = TextKey.of(
"iris.bukkit.runtime.commandpack.path.restored",
"restored"
);
public static final TextKey COMMAND_PACK_PATH_FILE = TextKey.of(
"iris.bukkit.runtime.commandpack.path.file",
"file"
);
public static final TextKey COMMAND_PACK_NO_VALIDATION_RESULT_RUN_IRIS_PACK_VALIDATE = TextKey.of(
"iris.bukkit.runtime.commandpack.no_validation_result_run_iris_pack_validate",
C.YELLOW + "No validation result for '" + "{pack}" + "'. Run /iris pack validate " + "{pack2}" + "."
);
public static final TextKey COMMAND_PACK_VALIDATION_FAILED = TextKey.of(
"iris.bukkit.runtime.commandpack.validation_failed",
C.RED + "Validation of '" + "{name}" + "' failed: " + "{error}"
);
public static final TextKey COMMAND_PACK_PACK_IS_LOADABLE_WARNINGS = TextKey.of(
"iris.bukkit.runtime.commandpack.pack_is_loadable_warnings",
C.GREEN + "Pack '" + "{packName}" + "' is loadable." + C.GRAY + " (warnings=" + "{size}" + ")"
);
public static final TextKey COMMAND_PACK_PACK_IS_BROKEN = TextKey.of(
"iris.bukkit.runtime.commandpack.pack_is_broken",
C.RED + "Pack '" + "{packName}" + "' is BROKEN:"
);
public static final TextKey COMMAND_PACK_MESSAGE = TextKey.of(
"iris.bukkit.runtime.commandpack.message",
C.RED + " - " + "{reason}"
);
public static final TextKey COMMAND_PACK_MESSAGE_2 = TextKey.of(
"iris.bukkit.runtime.commandpack.message_2",
C.YELLOW + " ! " + "{value}"
);
public static final PluralKey COMMAND_PACK_MORE_WARNING_S = PluralKey.of(
"iris.bukkit.runtime.commandpack.more_warning_s",
"count",
Map.of(
"one", C.GRAY + " ... and {count} more warning.",
"other", C.GRAY + " ... and {count} more warnings."
)
);
public static final LinesKey COMMAND_DEVELOPER_UPDATE_WORLD_WARNING = LinesKey.of(
"iris.bukkit.runtime.commanddeveloper.update_world_warning",
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 developer update-world {world} {pack} confirm=true"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_IMPORTING_VANILLA_DATAPACK_STRUCTURES_MODE_INCLUDENONJIGSAW = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.importing_vanilla_datapack_structures_mode_includenonjigsaw",
C.GREEN + "Importing " + C.WHITE + "{total}" + C.GREEN + " vanilla & datapack structures (mode=" + "{mode}" + ", includeNonJigsaw=" + "{includeNonJigsaw}" + ")..."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_invalid_key",
C.RED + "[fail] " + "{keyString}" + ": invalid key"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_JIGSAW = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.jigsaw",
C.GRAY + "[jigsaw] " + "{keyString}" + " -> " + "{name}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_SINGLE = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.single",
C.GRAY + "[single] " + "{keyString}" + " -> " + "{name}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_SKIP_NO_SINGLE_TEMPLATE_NBT_VANILLA_BUILDS_THIS_CODE_FROM_SEPARATE_PIECE = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.skip_no_single_template_nbt_vanilla_builds_this_code_from_separate_piece",
C.YELLOW + "[skip] " + "{keyString}" + ": no single-template NBT - vanilla builds this in code or from separate piece templates (imported via the templates pass); nothing to import as one structure."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail",
C.RED + "[fail] " + "{keyString}" + ": " + "{message}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_2 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_2",
C.RED + "[fail] " + "{keyString}" + ": " + "{message}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_3 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_3",
C.RED + "[fail] " + "{keyString}" + ": " + "{error}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_BULK_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED_TOTAL = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.bulk_import_complete_imported_skipped_failed_total",
C.GREEN + "Bulk import complete: " + C.WHITE + "{imported}" + C.GREEN + " imported, " + C.WHITE + "{skipped}" + C.GREEN + " skipped, " + C.WHITE + "{failed}" + C.GREEN + " failed (" + C.WHITE + "{total}" + C.GREEN + " total)."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_BUILDING_SINGLE_TEMPLATE_STRUCTURES_FROM_IMPORTED_PIECES_ONE_VARIANT_PLACED_PER_GENERATION = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.building_single_template_structures_from_imported_pieces_one_variant_placed_per_generation",
C.GREEN + "Building single-template structures from imported pieces (one variant placed per generation)..."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_GROUP_VARIANTS = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.group_variants",
C.GRAY + "[group] " + "{value}" + " -> " + "{value2}" + " (" + "{blocks}" + " variants)"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_SKIP = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.skip",
C.YELLOW + "[skip] " + "{value}" + ": " + "{message}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_4 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_4",
C.RED + "[fail] " + "{value}" + ": " + "{error}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_SINGLE_TEMPLATE_STRUCTURES_BUILT_SKIPPED_FAILED = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.single_template_structures_built_skipped_failed",
C.GREEN + "Single-template structures: " + C.WHITE + "{imported}" + C.GREEN + " built, " + C.WHITE + "{skipped}" + C.GREEN + " skipped, " + C.WHITE + "{failed}" + C.GREEN + " failed."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAILED_ENUMERATE_STRUCTURE_TEMPLATES_VIA_SERVER_RESOURCEMANAGER = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.failed_enumerate_structure_templates_via_server_resourcemanager",
C.RED + "Failed to enumerate structure templates via the server ResourceManager: " + "{e}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_NO_STRUCTURE_TEMPLATES_WERE_FOUND_UNDER_STRUCTURE_RESOURCE_PATH = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.no_structure_templates_were_found_under_structure_resource_path",
C.YELLOW + "No structure templates were found under the 'structure' resource path."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_IMPORTING_STRUCTURE_TEMPLATES_MODE = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.importing_structure_templates_mode",
C.GREEN + "Importing " + C.WHITE + "{total}" + C.GREEN + " structure templates (mode=" + "{mode}" + ")..."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY_2 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_invalid_key_2",
C.RED + "[fail] " + "{keyString}" + ": invalid key"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_5 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_5",
C.RED + "[fail] " + "{keyString}" + ": " + "{message}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_6 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_6",
C.RED + "[fail] " + "{keyString}" + ": " + "{error}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_IMPORTED_SKIPPED_FAILED = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.imported_skipped_failed",
C.GRAY + "..." + "{processed}" + "/" + "{total}" + " (" + "{imported}" + " imported, " + "{skipped}" + " skipped, " + "{failed}" + " failed)"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_TEMPLATE_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED_TOTAL = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.template_import_complete_imported_skipped_failed_total",
C.GREEN + "Template import complete: " + C.WHITE + "{imported}" + C.GREEN + " imported, " + C.WHITE + "{skipped}" + C.GREEN + " skipped, " + C.WHITE + "{failed}" + C.GREEN + " failed (" + C.WHITE + "{total}" + C.GREEN + " total)."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_NO_DATAPACK_NON_MINECRAFT_STRUCTURES_ARE_REGISTERED_INGEST_DATAPACK_RESTART_FIRST_THEN = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.no_datapack_non_minecraft_structures_are_registered_ingest_datapack_restart_first_then",
C.YELLOW + "No datapack (non-minecraft) structures are registered. Ingest a datapack and restart first, then run this again."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_IMPORTING_DATAPACK_STRUCTURES_MODE = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.importing_datapack_structures_mode",
C.GREEN + "Importing " + C.WHITE + "{total}" + C.GREEN + " datapack structures (mode=" + "{mode}" + ")..."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY_3 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_invalid_key_3",
C.RED + "[fail] " + "{keyString}" + ": invalid key"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_JIGSAW_2 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.jigsaw_2",
C.GRAY + "[jigsaw] " + "{keyString}" + " -> " + "{name}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_SINGLE_2 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.single_2",
C.GRAY + "[single] " + "{keyString}" + " -> " + "{name}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_7 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_7",
C.RED + "[fail] " + "{keyString}" + ": " + "{message}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_8 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_8",
C.RED + "[fail] " + "{keyString}" + ": " + "{message}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_9 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_9",
C.RED + "[fail] " + "{keyString}" + ": " + "{error}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_IMPORTING_DATAPACK_STRUCTURE_TEMPLATES = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.importing_datapack_structure_templates",
C.GREEN + "Importing " + C.WHITE + "{size}" + C.GREEN + " datapack structure templates..."
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_10 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_10",
C.RED + "[fail] " + "{keyString}" + ": " + "{message}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_FAIL_11 = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.fail_11",
C.RED + "[fail] " + "{keyString}" + ": " + "{error}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_COULD_NOT_ENUMERATE_DATAPACK_TEMPLATES_VIA_SERVER_RESOURCEMANAGER = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.could_not_enumerate_datapack_templates_via_server_resourcemanager",
C.YELLOW + "Could not enumerate datapack templates via the server ResourceManager: " + "{error}"
);
public static final TextKey BULK_STRUCTURE_IMPORTER_DATAPACK_STRUCTURE_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED = TextKey.of(
"iris.bukkit.runtime.bulkstructureimporter.datapack_structure_import_complete_imported_skipped_failed",
C.GREEN + "Datapack structure import complete: " + C.WHITE + "{imported}" + C.GREEN + " imported, " + C.WHITE + "{skipped}" + C.GREEN + " skipped, " + C.WHITE + "{failed}" + C.GREEN + " failed."
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_STRUCTURE_CAPTURE_IS_NOT_SUPPORTED_BY_ACTIVE_NMS_BINDING_SKIPPING_CAPTURE_PASS = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.structure_capture_is_not_supported_by_active_nms_binding_skipping_capture_pass",
C.YELLOW + "Structure capture is not supported by the active NMS binding; skipping the capture pass."
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_NO_CODE_GENERATED_STRUCTURES_LEFT_CAPTURE_EVERYTHING_IS_ALREADY_IMPORTED_AS_STRUCTURE = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.no_code_generated_structures_left_capture_everything_is_already_imported_as_structure",
C.GRAY + "No code-generated structures left to capture (everything is already imported as a structure)."
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_CAPTURING_CODE_GENERATED_STRUCTURES_NO_NBT_TEMPLATE_INTO_SCRATCH_WORLD_SKIPPING_ANY = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.capturing_code_generated_structures_no_nbt_template_into_scratch_world_skipping_any",
C.GREEN + "Capturing " + C.WHITE + "{total}" + C.GREEN + " code-generated structures (no NBT template) into a scratch world (skipping any wider/taller than " + "{MAXSPAN}" + " blocks)..."
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_SKIP_DID_NOT_PLACE_CAPTURABLE_STRUCTURE_HERE_TOO_LARGE_WRONG_DIMENSION_NO = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.skip_did_not_place_capturable_structure_here_too_large_wrong_dimension_no",
C.YELLOW + "[skip] " + "{key}" + ": did not place a capturable structure here (too large, wrong dimension, or no valid placement in a flat world). Stays vanilla-generated."
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_FAIL = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.fail",
C.RED + "[fail] " + "{key}" + ": " + "{message}"
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_CAPTURE_OBJECTS_IOB_X_X = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.capture_objects_iob_x_x",
C.GRAY + "[capture] " + "{key}" + " -> objects/" + "{name}" + ".iob (" + "{w}" + "x" + "{h}" + "x" + "{d}" + ")"
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_FAIL_2 = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.fail_2",
C.RED + "[fail] " + "{key}" + ": " + "{error}"
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_CAPTURED_SKIPPED_FAILED = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.captured_skipped_failed",
C.GRAY + "..." + "{processed}" + "/" + "{total}" + " (" + "{imported}" + " captured, " + "{skipped}" + " skipped, " + "{failed}" + " failed)"
);
public static final TextKey STRUCTURE_CAPTURE_IMPORTER_STRUCTURE_CAPTURE_COMPLETE_CAPTURED_SKIPPED_FAILED_TOTAL = TextKey.of(
"iris.bukkit.runtime.structurecaptureimporter.structure_capture_complete_captured_skipped_failed_total",
C.GREEN + "Structure capture complete: " + C.WHITE + "{imported}" + C.GREEN + " captured, " + C.WHITE + "{skipped}" + C.GREEN + " skipped, " + C.WHITE + "{failed}" + C.GREEN + " failed (" + C.WHITE + "{total}" + C.GREEN + " total)."
);
public static final TextKey FEATURE_IMPORTER_NO_VANILLA_TREE_OBJECT_FEATURES_ARE_EXPOSED_BY_ACTIVE_NMS_BINDING_IMPORTING = TextKey.of(
"iris.bukkit.runtime.featureimporter.no_vanilla_tree_object_features_are_exposed_by_active_nms_binding_importing",
C.YELLOW + "No vanilla tree/object features are exposed by the active NMS binding (importing structures only)."
);
public static final TextKey FEATURE_IMPORTER_IMPORTING_VANILLA_TREE_OBJECT_FEATURES_VARIANTS_EACH_INTO_SCRATCH_WORLD = TextKey.of(
"iris.bukkit.runtime.featureimporter.importing_vanilla_tree_object_features_variants_each_into_scratch_world",
C.GREEN + "Importing " + C.WHITE + "{total}" + C.GREEN + " vanilla tree/object features (" + C.WHITE + "{wantVariants}" + C.GREEN + " variants each) into a scratch world..."
);
public static final TextKey FEATURE_IMPORTER_OBJ_OBJECTS_VANILLA = TextKey.of(
"iris.bukkit.runtime.featureimporter.obj_objects_vanilla",
C.GRAY + "[obj] " + "{key}" + " -> objects/vanilla/" + "{group}" + "/" + "{safeName}" + " (" + "{written}" + ")"
);
public static final TextKey FEATURE_IMPORTER_SKIP_FEATURE_PLACED_NOTHING_AFTER_RETRIES = TextKey.of(
"iris.bukkit.runtime.featureimporter.skip_feature_placed_nothing_after_retries",
C.YELLOW + "[skip] " + "{key}" + ": feature placed nothing after retries."
);
public static final TextKey FEATURE_IMPORTER_FAIL = TextKey.of(
"iris.bukkit.runtime.featureimporter.fail",
C.RED + "[fail] " + "{key}" + ": " + "{error}"
);
public static final TextKey FEATURE_IMPORTER_IMPORTED_SKIPPED_FAILED = TextKey.of(
"iris.bukkit.runtime.featureimporter.imported_skipped_failed",
C.GRAY + "..." + "{processed}" + "/" + "{total}" + " (" + "{imported}" + " imported, " + "{skipped}" + " skipped, " + "{failed}" + " failed)"
);
public static final TextKey FEATURE_IMPORTER_FEATURE_IMPORT_COMPLETE_FEATURES_WRITTEN_SKIPPED_FAILED_TOTAL = TextKey.of(
"iris.bukkit.runtime.featureimporter.feature_import_complete_features_written_skipped_failed_total",
C.GREEN + "Feature import complete: " + C.WHITE + "{imported}" + C.GREEN + " features written, " + C.WHITE + "{skipped}" + C.GREEN + " skipped, " + C.WHITE + "{failed}" + C.GREEN + " failed (" + C.WHITE + "{total}" + C.GREEN + " total)."
);
public static final TextKey FEATURE_IMPORTER_COULD_NOT_CREATE_SCRATCH_WORLD_FEATURE_IMPORT_SKIPPING_TREE_OBJECT_PASS = TextKey.of(
"iris.bukkit.runtime.featureimporter.could_not_create_scratch_world_feature_import_skipping_tree_object_pass",
C.RED + "Could not create the scratch world for feature import (" + "{error}" + "); skipping the tree/object pass."
);
public static final TextKey IRIS_CONVERTER_NO_SCHEMATIC_FILES_CONVERT_FOUND = TextKey.of(
"iris.bukkit.runtime.irisconverter.no_schematic_files_convert_found",
"No schematic files to convert found in " + "{path}"
);
public static final TextKey IRIS_CONVERTER_CONVERTED = TextKey.of(
"iris.bukkit.runtime.irisconverter.converted",
C.IRIS + "Converted " + "{name}" + " -> " + "{value}" + " in " + "{value2}"
);
public static final TextKey IRIS_CONVERTER_CONVERTED_2 = TextKey.of(
"iris.bukkit.runtime.irisconverter.converted_2",
C.IRIS + "Converted " + "{name}" + " -> " + "{value}"
);
public static final TextKey IRIS_CONVERTER_FAILED_SAVE = TextKey.of(
"iris.bukkit.runtime.irisconverter.failed_save",
C.RED + "Failed to save: " + "{name}"
);
public static final TextKey IRIS_CONVERTER_FAILED_CONVERT = TextKey.of(
"iris.bukkit.runtime.irisconverter.failed_convert",
C.RED + "Failed to convert: " + "{name}"
);
public static final TextKey IRIS_CONVERTER_CONVERTED_3 = TextKey.of(
"iris.bukkit.runtime.irisconverter.converted_3",
C.GRAY + "Converted: " + "{get}" + " in " + "{value}"
);
public static final TextKey IRIS_CONVERTER_SOME_SCHEMATICS_FAILED_CONVERT_CHECK_CONSOLE_DETAILS = TextKey.of(
"iris.bukkit.runtime.irisconverter.some_schematics_failed_convert_check_console_details",
C.RED + "Some schematics failed to convert. Check the console for details."
);
public static final TextKey STUDIO_S_V_C_INSTALLING_PACKAGE = TextKey.of(
"iris.bukkit.runtime.studiosvc.installing_package",
"Installing Package: " + "{name}" + ":" + "{loadKey}"
);
public static final TextKey STUDIO_S_V_C_LOOKING_PACKAGE = TextKey.of(
"iris.bukkit.runtime.studiosvc.looking_package",
"Looking for Package: " + "{type}"
);
public static final TextKey STUDIO_S_V_C_FOUND_IRIS_FOLDER = TextKey.of(
"iris.bukkit.runtime.studiosvc.found_iris_folder",
"Found " + "{type}" + ".iris in " + "{WORKSPACENAME}" + " folder"
);
public static final TextKey STUDIO_S_V_C_FOUND_DIMENSION_FOLDER_REPACKAGING = TextKey.of(
"iris.bukkit.runtime.studiosvc.found_dimension_folder_repackaging",
"Found " + "{type}" + " dimension in " + "{WORKSPACENAME}" + " folder. Repackaging"
);
public static final TextKey STUDIO_S_V_C_CAN_T_FIND_DIMENSIONS_FOLDER_THIS_PACK_FAILED = TextKey.of(
"iris.bukkit.runtime.studiosvc.can_t_find_dimensions_folder_this_pack_failed",
"Can't find the " + "{name}" + " in the dimensions folder of this pack! Failed!"
);
public static final TextKey STUDIO_S_V_C_CAN_T_LOAD_DIMENSION_FAILED = TextKey.of(
"iris.bukkit.runtime.studiosvc.can_t_load_dimension_failed",
"Can't load the dimension! Failed!"
);
public static final TextKey STUDIO_S_V_C_TYPE_INSTALLED = TextKey.of(
"iris.bukkit.runtime.studiosvc.type_installed",
"{name}" + " type installed. "
);
public static final TextKey STUDIO_S_V_C_PACK_WAS_NOT_FOUND_PACK_LISTING = TextKey.of(
"iris.bukkit.runtime.studiosvc.pack_was_not_found_pack_listing",
"Pack '" + "{key}" + "' was not found in the pack listing."
);
public static final TextKey STUDIO_S_V_C_USE_IRIS_DOWNLOAD_PACK_BRANCH_BRANCH_DOWNLOAD_MANUALLY = TextKey.of(
"iris.bukkit.runtime.studiosvc.use_iris_download_pack_branch_branch_download_manually",
"Use /iris download <pack> branch=<branch> to download manually."
);
public static final TextKey STUDIO_S_V_C_FAILED_DOWNLOAD = TextKey.of(
"iris.bukkit.runtime.studiosvc.failed_download",
"Failed to download '" + "{key}" + "'."
);
public static final TextKey STUDIO_S_V_C_FAILED_DOWNLOAD_IRISDIMENSIONS_OVERWORLD_BETA_RELEASE = TextKey.of(
"iris.bukkit.runtime.studiosvc.failed_download_irisdimensions_overworld_beta_release",
"Failed to download the IrisDimensions/overworld beta release."
);
public static final TextKey STUDIO_S_V_C_FAILED_DOWNLOAD_BRANCH = TextKey.of(
"iris.bukkit.runtime.studiosvc.failed_download_branch",
"Failed to download '" + "{repo}" + "' (branch " + "{branch}" + ")."
);
public static final TextKey STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD = TextKey.of(
"iris.bukkit.runtime.studiosvc.failed_open_studio_world",
"Failed to open studio world: " + "{error}"
);
public static final TextKey STUDIO_S_V_C_CANNOT_OPEN_STUDIO_PACK_HAS_BLOCKING_ERRORS = TextKey.of(
"iris.bukkit.runtime.studiosvc.cannot_open_studio_pack_has_blocking_errors",
"Cannot open studio '" + "{dimm}" + "' - pack has blocking errors:"
);
public static final TextKey STUDIO_S_V_C_MESSAGE = TextKey.of(
"iris.bukkit.runtime.studiosvc.message",
" - " + "{reason}"
);
public static final TextKey STUDIO_S_V_C_FIX_PACK_RUN_IRIS_PACK_VALIDATE_REVALIDATE = TextKey.of(
"iris.bukkit.runtime.studiosvc.fix_pack_run_iris_pack_validate_revalidate",
"Fix the pack and run /iris pack validate " + "{dimm}" + " to revalidate."
);
public static final TextKey STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT = TextKey.of(
"iris.bukkit.runtime.studiosvc.failed_close_existing_studio_project",
"Failed to close the existing studio project: " + "{error}"
);
public static final TextKey STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT_2 = TextKey.of(
"iris.bukkit.runtime.studiosvc.failed_close_existing_studio_project_2",
"Failed to close the existing studio project: " + "{error}"
);
public static final TextKey STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD_2 = TextKey.of(
"iris.bukkit.runtime.studiosvc.failed_open_studio_world_2",
"Failed to open studio world: " + "{error}"
);
public static final TextKey STUDIO_S_V_C_COULDN_T_FIND_PACK_CREATE_NEW_DIMENSION_FROM = TextKey.of(
"iris.bukkit.runtime.studiosvc.couldn_t_find_pack_create_new_dimension_from",
"Couldn't find the pack to create a new dimension from."
);
public static final TextKey STUDIO_S_V_C_MISSING_IMPORTED_DIMENSION_FILE = TextKey.of(
"iris.bukkit.runtime.studiosvc.missing_imported_dimension_file",
"Missing Imported Dimension File"
);
public static final TextKey STUDIO_S_V_C_IMPORTING_INTO_NEW_PROJECT = TextKey.of(
"iris.bukkit.runtime.studiosvc.importing_into_new_project",
"Importing " + "{downloadable}" + " into new Project " + "{s}"
);
public static final TextKey OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_CELL_UNDER_CLICK_X_Z = TextKey.of(
"iris.bukkit.runtime.objectstudiosaveservice.object_studio_no_cell_under_click_x_z",
C.GRAY + "Object Studio: no cell under click (x=" + "{x}" + " z=" + "{z}" + ")."
);
public static final TextKey OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVING_X_X = TextKey.of(
"iris.bukkit.runtime.objectstudiosaveservice.object_studio_saving_x_x",
C.AQUA + "Object Studio: saving " + C.WHITE + "{pack}" + "/" + "{key}" + C.GRAY + " (" + "{w}" + "x" + "{h}" + "x" + "{d}" + ")"
);
public static final TextKey OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_CHANGES = TextKey.of(
"iris.bukkit.runtime.objectstudiosaveservice.object_studio_no_changes",
C.GRAY + "Object Studio: no changes for " + "{pack}" + "/" + "{key}" + "."
);
public static final TextKey OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_EMPTY_CELL_NOTHING_WRITE = TextKey.of(
"iris.bukkit.runtime.objectstudiosaveservice.object_studio_empty_cell_nothing_write",
C.GRAY + "Object Studio: empty cell " + "{pack}" + "/" + "{key}" + " (nothing to write)."
);
public static final TextKey OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_TARGET_FILE = TextKey.of(
"iris.bukkit.runtime.objectstudiosaveservice.object_studio_no_target_file",
C.RED + "Object Studio: no target file for " + "{pack}" + "/" + "{key}" + "."
);
public static final TextKey OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVED = TextKey.of(
"iris.bukkit.runtime.objectstudiosaveservice.object_studio_saved",
C.GREEN + "Object Studio: saved " + C.WHITE + "{pack}" + "/" + "{key}"
);
public static final TextKey OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVE_FAILED = TextKey.of(
"iris.bukkit.runtime.objectstudiosaveservice.object_studio_save_failed",
C.RED + "Object Studio: save failed for " + "{pack}" + "/" + "{key}" + " (" + "{error}" + ")"
);
public static final TextKey IRIS_PROJECT_COULD_NOT_LOAD_DIMENSION = TextKey.of(
"iris.bukkit.runtime.irisproject.could_not_load_dimension",
"Could not load dimension \"" + "{value}" + "\""
);
public static final TextKey IRIS_PROJECT_COULD_NOT_GET_DIMENSION_LOADER = TextKey.of(
"iris.bukkit.runtime.irisproject.could_not_get_dimension_loader",
"Could not get dimension loader"
);
public static final TextKey IRIS_PROJECT_STUDIO_OPEN_FAILED = TextKey.of(
"iris.bukkit.runtime.irisproject.studio_open_failed",
C.RED + "Studio open failed: " + "{error}"
);
public static final TextKey IRIS_PROJECT_STUDIO_OPEN_FAILED_2 = TextKey.of(
"iris.bukkit.runtime.irisproject.studio_open_failed_2",
C.RED + "Studio open failed."
);
public static final TextKey IRIS_PROJECT_STUDIO_READY = TextKey.of(
"iris.bukkit.runtime.irisproject.studio_ready",
C.GREEN + "Studio ready " + C.GRAY + "(" + "{value}" + ")"
);
public static final TextKey IRIS_PROJECT_STUDIO = TextKey.of(
"iris.bukkit.runtime.irisproject.studio",
C.GOLD + "Studio " + C.AQUA + "{bar}" + " " + C.YELLOW + "{percent}" + "%" + C.GRAY + " " + "{currentStage}" + C.DARK_GRAY + " (" + "{value}" + ")"
);
public static final TextKey IRIS_PROJECT_SERIALIZING_OBJECTS = TextKey.of(
"iris.bukkit.runtime.irisproject.serializing_objects",
"Serializing Objects"
);
public static final TextKey IRIS_PROJECT_WROTE_ANOTHER_OBJECTS = TextKey.of(
"iris.bukkit.runtime.irisproject.wrote_another_objects",
"Wrote another " + "{g}" + " Objects"
);
public static final TextKey IRIS_PROJECT_PACKAGE_COMPILED = TextKey.of(
"iris.bukkit.runtime.irisproject.package_compiled",
"Package Compiled!"
);
public static final TextKey IRIS_PROJECT_FAILED = TextKey.of(
"iris.bukkit.runtime.irisproject.failed",
"Failed!"
);
public static final TextKey IRIS_ENGINE_TOTAL = TextKey.of(
"iris.bukkit.runtime.irisengine.total",
"Total: " + C.BOLD + C.WHITE + "{value}"
);
public static final TextKey IRIS_ENGINE_ENGINE = TextKey.of(
"iris.bukkit.runtime.irisengine.engine",
" Engine " + C.UNDERLINE + C.GREEN + "{i}" + C.RESET + ": " + C.BOLD + C.WHITE + "{value}"
);
public static final TextKey IRIS_ENGINE_DETAILS = TextKey.of(
"iris.bukkit.runtime.irisengine.details",
"Details: "
);
public static final TextKey IRIS_ENGINE_MESSAGE = TextKey.of(
"iris.bukkit.runtime.irisengine.message",
" " + "{befb}" + "{num}" + "{afb}" + ": " + C.BOLD + C.WHITE + "{value}"
);
public static final TextKey ENGINE_BUKKIT_OPS_IS_NOT_DEFINED_DIMENSION = TextKey.of(
"iris.bukkit.runtime.enginebukkitops.is_not_defined_dimension",
C.RED + "{name}" + " is not defined in the dimension!"
);
public static final TextKey ENGINE_BUKKIT_OPS_COULD_NOT_FIND_WITHIN_SEARCH_RANGE = TextKey.of(
"iris.bukkit.runtime.enginebukkitops.could_not_find_within_search_range",
C.RED + "Could not find " + "{message}" + " within search range."
);
public static final TextKey ENGINE_BUKKIT_OPS_TELEPORTING = TextKey.of(
"iris.bukkit.runtime.enginebukkitops.teleporting",
C.GREEN + "Teleporting to " + "{message}" + "..."
);
public static final TextKey ENGINE_BUKKIT_OPS_AT = TextKey.of(
"iris.bukkit.runtime.enginebukkitops.at",
C.GREEN + "{message}" + " at: " + "{blockX}" + " " + "{blockY}" + " " + "{blockZ}"
);
public static final TextKey IRIS_TOOLBELT_YOU_HAVE_BEEN_EVACUATED_FROM_THIS_WORLD = TextKey.of(
"iris.bukkit.runtime.iristoolbelt.you_have_been_evacuated_from_this_world",
"You have been evacuated from this world."
);
public static final TextKey IRIS_TOOLBELT_YOU_HAVE_BEEN_EVACUATED_FROM_THIS_WORLD_2 = TextKey.of(
"iris.bukkit.runtime.iristoolbelt.you_have_been_evacuated_from_this_world_2",
"You have been evacuated from this world. " + "{m}"
);
public static final TextKey SERVER_CONFIGURATOR_THERE_ARE_SOME_IRIS_PACKS_THAT_HAVE_CUSTOM_BIOMES_THEM = TextKey.of(
"iris.bukkit.runtime.serverconfigurator.there_are_some_iris_packs_that_have_custom_biomes_them",
"There are some Iris Packs that have custom biomes in them"
);
public static final TextKey SERVER_CONFIGURATOR_YOU_NEED_RESTART_YOUR_SERVER_USE_THESE_PACKS = TextKey.of(
"iris.bukkit.runtime.serverconfigurator.you_need_restart_your_server_use_these_packs",
"You need to restart your server to use these packs."
);
public static final TextKey VIRTUAL_COMMAND_MESSAGE = TextKey.of(
"iris.bukkit.runtime.virtualcommand.message",
"- " + C.WHITE + "{i}"
);
public static final TextKey VIRTUAL_COMMAND_INSUFFICIENT_PERMISSIONS = TextKey.of(
"iris.bukkit.runtime.virtualcommand.insufficient_permissions",
"Insufficient Permissions"
);
public static final TextKey MORTAR_COMMAND_FONT_MINECRAFT_UNIFORM = TextKey.of(
"iris.bukkit.runtime.mortarcommand.font_minecraft_uniform",
"" + C.GREEN + "{node}" + " " + "<font:minecraft:uniform>" + "{value}" + C.GRAY + " - " + "{description}"
);
public static final TextKey MORTAR_COMMAND_THERE_ARE_EITHER_NO_SUB_COMMANDS_YOU_DO_NOT_HAVE_PERMISSION_USE = TextKey.of(
"iris.bukkit.runtime.mortarcommand.there_are_either_no_sub_commands_you_do_not_have_permission_use",
"There are either no sub-commands or you do not have permission to use them."
);
public static final TextKey MORTAR_COMMAND_PARAMETERS_IGNORED = TextKey.of(
"iris.bukkit.runtime.mortarcommand.parameters_ignored",
"Parameters Ignored: " + "{m}"
);
private static final List<MessageKey> KEYS = List.of(
COMMAND_PACK_PACKS_FOLDER_NOT_FOUND,
COMMAND_PACK_NO_PACKS_VALIDATE,
COMMAND_PACK_VALIDATION_COMPLETE_BROKEN_PACKS,
COMMAND_PACK_PACK_NOT_FOUND_UNDER_PACKS,
COMMAND_PACK_NO_CLEANUP_CANDIDATES_FOUND_PACK,
COMMAND_PACK_QUARANTINED_CLEANUP_CANDIDATE_S_UNDER,
COMMAND_PACK_CLEANUP_MODE_MUST_BE_PREVIEW_APPLY,
COMMAND_PACK_NO_CLEANUP_CANDIDATES_FOUND_PACK_2,
COMMAND_PACK_CLEANUP_PREVIEW_PACK_CANDIDATE_S_NO_FILES_WERE_CHANGED,
COMMAND_PACK_RUN_IRIS_PACK_CLEANUP_MODE_APPLY_QUARANTINE_THESE_CANDIDATES_AFTER_FRESH_SCAN,
COMMAND_PACK_RESTORE_REFUSED_BECAUSE_DESTINATION_S_ALREADY_EXIST,
COMMAND_PACK_NOTHING_RESTORE_PACK,
COMMAND_PACK_RESTORED_FILE_S_FROM,
COMMAND_PACK_RESTORE_MODE_MUST_BE_PREVIEW_APPLY,
COMMAND_PACK_NOTHING_RESTORE_PACK_2,
COMMAND_PACK_RESTORE_PREVIEW_FILE_S_NO_FILES_WERE_CHANGED,
COMMAND_PACK_RESTORE_IS_BLOCKED_BY_EXISTING_DESTINATION_S,
COMMAND_PACK_RUN_IRIS_PACK_RESTORE_MODE_APPLY_RESTORE_AFTER_FRESH_CONFLICT_CHECK,
COMMAND_PACK_NO_VALIDATION_RESULTS_RECORDED_RUN_IRIS_PACK_VALIDATE_FIRST,
COMMAND_PACK_STATUS_OK,
COMMAND_PACK_STATUS_BROKEN,
COMMAND_PACK_CLEANUP_FAILED,
COMMAND_PACK_RESTORE_FAILED,
COMMAND_PACK_PATH_STILL_QUARANTINED,
COMMAND_PACK_PATH_QUARANTINED,
COMMAND_PACK_PATH_CANDIDATE,
COMMAND_PACK_PATH_CONFLICT,
COMMAND_PACK_PATH_RESTORED,
COMMAND_PACK_PATH_FILE,
COMMAND_PACK_NO_VALIDATION_RESULT_RUN_IRIS_PACK_VALIDATE,
COMMAND_PACK_VALIDATION_FAILED,
COMMAND_PACK_PACK_IS_LOADABLE_WARNINGS,
COMMAND_PACK_PACK_IS_BROKEN,
COMMAND_PACK_MESSAGE,
COMMAND_PACK_MESSAGE_2,
COMMAND_PACK_MORE_WARNING_S,
COMMAND_DEVELOPER_UPDATE_WORLD_WARNING,
BULK_STRUCTURE_IMPORTER_IMPORTING_VANILLA_DATAPACK_STRUCTURES_MODE_INCLUDENONJIGSAW,
BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY,
BULK_STRUCTURE_IMPORTER_JIGSAW,
BULK_STRUCTURE_IMPORTER_SINGLE,
BULK_STRUCTURE_IMPORTER_SKIP_NO_SINGLE_TEMPLATE_NBT_VANILLA_BUILDS_THIS_CODE_FROM_SEPARATE_PIECE,
BULK_STRUCTURE_IMPORTER_FAIL,
BULK_STRUCTURE_IMPORTER_FAIL_2,
BULK_STRUCTURE_IMPORTER_FAIL_3,
BULK_STRUCTURE_IMPORTER_BULK_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED_TOTAL,
BULK_STRUCTURE_IMPORTER_BUILDING_SINGLE_TEMPLATE_STRUCTURES_FROM_IMPORTED_PIECES_ONE_VARIANT_PLACED_PER_GENERATION,
BULK_STRUCTURE_IMPORTER_GROUP_VARIANTS,
BULK_STRUCTURE_IMPORTER_SKIP,
BULK_STRUCTURE_IMPORTER_FAIL_4,
BULK_STRUCTURE_IMPORTER_SINGLE_TEMPLATE_STRUCTURES_BUILT_SKIPPED_FAILED,
BULK_STRUCTURE_IMPORTER_FAILED_ENUMERATE_STRUCTURE_TEMPLATES_VIA_SERVER_RESOURCEMANAGER,
BULK_STRUCTURE_IMPORTER_NO_STRUCTURE_TEMPLATES_WERE_FOUND_UNDER_STRUCTURE_RESOURCE_PATH,
BULK_STRUCTURE_IMPORTER_IMPORTING_STRUCTURE_TEMPLATES_MODE,
BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY_2,
BULK_STRUCTURE_IMPORTER_FAIL_5,
BULK_STRUCTURE_IMPORTER_FAIL_6,
BULK_STRUCTURE_IMPORTER_IMPORTED_SKIPPED_FAILED,
BULK_STRUCTURE_IMPORTER_TEMPLATE_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED_TOTAL,
BULK_STRUCTURE_IMPORTER_NO_DATAPACK_NON_MINECRAFT_STRUCTURES_ARE_REGISTERED_INGEST_DATAPACK_RESTART_FIRST_THEN,
BULK_STRUCTURE_IMPORTER_IMPORTING_DATAPACK_STRUCTURES_MODE,
BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY_3,
BULK_STRUCTURE_IMPORTER_JIGSAW_2,
BULK_STRUCTURE_IMPORTER_SINGLE_2,
BULK_STRUCTURE_IMPORTER_FAIL_7,
BULK_STRUCTURE_IMPORTER_FAIL_8,
BULK_STRUCTURE_IMPORTER_FAIL_9,
BULK_STRUCTURE_IMPORTER_IMPORTING_DATAPACK_STRUCTURE_TEMPLATES,
BULK_STRUCTURE_IMPORTER_FAIL_10,
BULK_STRUCTURE_IMPORTER_FAIL_11,
BULK_STRUCTURE_IMPORTER_COULD_NOT_ENUMERATE_DATAPACK_TEMPLATES_VIA_SERVER_RESOURCEMANAGER,
BULK_STRUCTURE_IMPORTER_DATAPACK_STRUCTURE_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED,
STRUCTURE_CAPTURE_IMPORTER_STRUCTURE_CAPTURE_IS_NOT_SUPPORTED_BY_ACTIVE_NMS_BINDING_SKIPPING_CAPTURE_PASS,
STRUCTURE_CAPTURE_IMPORTER_NO_CODE_GENERATED_STRUCTURES_LEFT_CAPTURE_EVERYTHING_IS_ALREADY_IMPORTED_AS_STRUCTURE,
STRUCTURE_CAPTURE_IMPORTER_CAPTURING_CODE_GENERATED_STRUCTURES_NO_NBT_TEMPLATE_INTO_SCRATCH_WORLD_SKIPPING_ANY,
STRUCTURE_CAPTURE_IMPORTER_SKIP_DID_NOT_PLACE_CAPTURABLE_STRUCTURE_HERE_TOO_LARGE_WRONG_DIMENSION_NO,
STRUCTURE_CAPTURE_IMPORTER_FAIL,
STRUCTURE_CAPTURE_IMPORTER_CAPTURE_OBJECTS_IOB_X_X,
STRUCTURE_CAPTURE_IMPORTER_FAIL_2,
STRUCTURE_CAPTURE_IMPORTER_CAPTURED_SKIPPED_FAILED,
STRUCTURE_CAPTURE_IMPORTER_STRUCTURE_CAPTURE_COMPLETE_CAPTURED_SKIPPED_FAILED_TOTAL,
FEATURE_IMPORTER_NO_VANILLA_TREE_OBJECT_FEATURES_ARE_EXPOSED_BY_ACTIVE_NMS_BINDING_IMPORTING,
FEATURE_IMPORTER_IMPORTING_VANILLA_TREE_OBJECT_FEATURES_VARIANTS_EACH_INTO_SCRATCH_WORLD,
FEATURE_IMPORTER_OBJ_OBJECTS_VANILLA,
FEATURE_IMPORTER_SKIP_FEATURE_PLACED_NOTHING_AFTER_RETRIES,
FEATURE_IMPORTER_FAIL,
FEATURE_IMPORTER_IMPORTED_SKIPPED_FAILED,
FEATURE_IMPORTER_FEATURE_IMPORT_COMPLETE_FEATURES_WRITTEN_SKIPPED_FAILED_TOTAL,
FEATURE_IMPORTER_COULD_NOT_CREATE_SCRATCH_WORLD_FEATURE_IMPORT_SKIPPING_TREE_OBJECT_PASS,
IRIS_CONVERTER_NO_SCHEMATIC_FILES_CONVERT_FOUND,
IRIS_CONVERTER_CONVERTED,
IRIS_CONVERTER_CONVERTED_2,
IRIS_CONVERTER_FAILED_SAVE,
IRIS_CONVERTER_FAILED_CONVERT,
IRIS_CONVERTER_CONVERTED_3,
IRIS_CONVERTER_SOME_SCHEMATICS_FAILED_CONVERT_CHECK_CONSOLE_DETAILS,
STUDIO_S_V_C_INSTALLING_PACKAGE,
STUDIO_S_V_C_LOOKING_PACKAGE,
STUDIO_S_V_C_FOUND_IRIS_FOLDER,
STUDIO_S_V_C_FOUND_DIMENSION_FOLDER_REPACKAGING,
STUDIO_S_V_C_CAN_T_FIND_DIMENSIONS_FOLDER_THIS_PACK_FAILED,
STUDIO_S_V_C_CAN_T_LOAD_DIMENSION_FAILED,
STUDIO_S_V_C_TYPE_INSTALLED,
STUDIO_S_V_C_PACK_WAS_NOT_FOUND_PACK_LISTING,
STUDIO_S_V_C_USE_IRIS_DOWNLOAD_PACK_BRANCH_BRANCH_DOWNLOAD_MANUALLY,
STUDIO_S_V_C_FAILED_DOWNLOAD,
STUDIO_S_V_C_FAILED_DOWNLOAD_IRISDIMENSIONS_OVERWORLD_BETA_RELEASE,
STUDIO_S_V_C_FAILED_DOWNLOAD_BRANCH,
STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD,
STUDIO_S_V_C_CANNOT_OPEN_STUDIO_PACK_HAS_BLOCKING_ERRORS,
STUDIO_S_V_C_MESSAGE,
STUDIO_S_V_C_FIX_PACK_RUN_IRIS_PACK_VALIDATE_REVALIDATE,
STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT,
STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT_2,
STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD_2,
STUDIO_S_V_C_COULDN_T_FIND_PACK_CREATE_NEW_DIMENSION_FROM,
STUDIO_S_V_C_MISSING_IMPORTED_DIMENSION_FILE,
STUDIO_S_V_C_IMPORTING_INTO_NEW_PROJECT,
OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_CELL_UNDER_CLICK_X_Z,
OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVING_X_X,
OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_CHANGES,
OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_EMPTY_CELL_NOTHING_WRITE,
OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_TARGET_FILE,
OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVED,
OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVE_FAILED,
IRIS_PROJECT_COULD_NOT_LOAD_DIMENSION,
IRIS_PROJECT_COULD_NOT_GET_DIMENSION_LOADER,
IRIS_PROJECT_STUDIO_OPEN_FAILED,
IRIS_PROJECT_STUDIO_OPEN_FAILED_2,
IRIS_PROJECT_STUDIO_READY,
IRIS_PROJECT_STUDIO,
IRIS_PROJECT_SERIALIZING_OBJECTS,
IRIS_PROJECT_WROTE_ANOTHER_OBJECTS,
IRIS_PROJECT_PACKAGE_COMPILED,
IRIS_PROJECT_FAILED,
IRIS_ENGINE_TOTAL,
IRIS_ENGINE_ENGINE,
IRIS_ENGINE_DETAILS,
IRIS_ENGINE_MESSAGE,
ENGINE_BUKKIT_OPS_IS_NOT_DEFINED_DIMENSION,
ENGINE_BUKKIT_OPS_COULD_NOT_FIND_WITHIN_SEARCH_RANGE,
ENGINE_BUKKIT_OPS_TELEPORTING,
ENGINE_BUKKIT_OPS_AT,
IRIS_TOOLBELT_YOU_HAVE_BEEN_EVACUATED_FROM_THIS_WORLD,
IRIS_TOOLBELT_YOU_HAVE_BEEN_EVACUATED_FROM_THIS_WORLD_2,
SERVER_CONFIGURATOR_THERE_ARE_SOME_IRIS_PACKS_THAT_HAVE_CUSTOM_BIOMES_THEM,
SERVER_CONFIGURATOR_YOU_NEED_RESTART_YOUR_SERVER_USE_THESE_PACKS,
VIRTUAL_COMMAND_MESSAGE,
VIRTUAL_COMMAND_INSUFFICIENT_PERMISSIONS,
MORTAR_COMMAND_FONT_MINECRAFT_UNIFORM,
MORTAR_COMMAND_THERE_ARE_EITHER_NO_SUB_COMMANDS_YOU_DO_NOT_HAVE_PERMISSION_USE,
MORTAR_COMMAND_PARAMETERS_IGNORED
);
private BukkitRuntimeMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -0,0 +1,70 @@
package art.arcane.iris.core.localization;
import art.arcane.iris.util.common.format.C;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
public final class BukkitUiMessages {
public static final TextKey SCOREBOARD_TITLE = TextKey.of(
"iris.bukkit.scoreboard.title",
C.GREEN + "Iris"
);
public static final TextKey SCOREBOARD_SPEED = TextKey.of(
"iris.bukkit.scoreboard.speed",
C.GREEN + "Speed" + C.GRAY + ": {speed}/s {duration}"
);
public static final TextKey SCOREBOARD_CACHE = TextKey.of(
"iris.bukkit.scoreboard.cache",
C.AQUA + "Cache" + C.GRAY + ": {count}"
);
public static final TextKey SCOREBOARD_MANTLE = TextKey.of(
"iris.bukkit.scoreboard.mantle",
C.AQUA + "Mantle" + C.GRAY + ": {count}"
);
public static final TextKey SCOREBOARD_CARVING = TextKey.of(
"iris.bukkit.scoreboard.carving",
C.LIGHT_PURPLE + "Carving" + C.GRAY + ": {state}"
);
public static final TextKey SCOREBOARD_REGION = TextKey.of(
"iris.bukkit.scoreboard.region",
C.AQUA + "Region" + C.GRAY + ": {region}"
);
public static final TextKey SCOREBOARD_BIOME = TextKey.of(
"iris.bukkit.scoreboard.biome",
C.AQUA + "Biome" + C.GRAY + ": {biome}"
);
public static final TextKey SCOREBOARD_HEIGHT = TextKey.of(
"iris.bukkit.scoreboard.height",
C.AQUA + "Height" + C.GRAY + ": {height}"
);
public static final TextKey SCOREBOARD_SLOPE = TextKey.of(
"iris.bukkit.scoreboard.slope",
C.AQUA + "Slope" + C.GRAY + ": {slope}"
);
public static final TextKey SCOREBOARD_BLOCK_UPDATES = TextKey.of(
"iris.bukkit.scoreboard.block_updates",
C.AQUA + "BUD/s" + C.GRAY + ": {updates}"
);
private static final List<MessageKey> KEYS = List.of(
SCOREBOARD_TITLE,
SCOREBOARD_SPEED,
SCOREBOARD_CACHE,
SCOREBOARD_MANTLE,
SCOREBOARD_CARVING,
SCOREBOARD_REGION,
SCOREBOARD_BIOME,
SCOREBOARD_HEIGHT,
SCOREBOARD_SLOPE,
SCOREBOARD_BLOCK_UPDATES
);
private BukkitUiMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -0,0 +1,104 @@
package art.arcane.iris.core.localization;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.PluralKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
import java.util.Map;
public final class ClientUiMessages {
public static final TextKey VISION_TITLE = TextKey.of(
"iris.client.vision.title",
"Iris Vision"
);
public static final TextKey VISION_CONNECTING = TextKey.of(
"iris.client.vision.connecting",
"Connecting to Iris server..."
);
public static final TextKey VISION_NOT_CONNECTED = TextKey.of(
"iris.client.vision.not_connected",
"not connected"
);
public static final TextKey VISION_NOT_IRIS_WORLD = TextKey.of(
"iris.client.vision.not_iris_world",
"Not an Iris world"
);
public static final TextKey VISION_NO_DIMENSION_DATA = TextKey.of(
"iris.client.vision.no_dimension_data",
"no dimension data"
);
public static final TextKey VISION_HEADER_DETAIL = TextKey.of(
"iris.client.vision.header_detail",
"{status} zoom {zoom} x{x} z{z}"
);
public static final TextKey VISION_FOOTER_HINT = TextKey.of(
"iris.client.vision.footer_hint",
"Drag to pan Scroll to zoom Esc to close"
);
public static final TextKey VISION_DIMENSION_PACK = TextKey.of(
"iris.client.vision.dimension_pack",
"{dimension} pack {pack}"
);
public static final TextKey TOAST_STUDIO_HOTLOAD = TextKey.of("iris.client.toast.studio_hotload", "Studio Hotload");
public static final PluralKey TOAST_CHANGED_FILES = PluralKey.of(
"iris.client.toast.changed_files",
"count",
Map.of(
"one", "{count} file",
"other", "{count} files"
)
);
public static final TextKey TOAST_RELOAD_FAILED = TextKey.of("iris.client.toast.reload_failed", "reload failed");
public static final TextKey TOAST_RELOADED = TextKey.of("iris.client.toast.reloaded", "reloaded");
public static final TextKey TOAST_PACK_FAILED = TextKey.of("iris.client.toast.pack_failed", "{pack} failed");
public static final TextKey WHAT_TITLE = TextKey.of("iris.client.what.title", "Iris What");
public static final TextKey WHAT_QUERYING = TextKey.of("iris.client.what.querying", "Querying {x}, {z}...");
public static final TextKey WHAT_BIOME = TextKey.of("iris.client.what.biome", "Biome: {biome}");
public static final TextKey WHAT_REGION = TextKey.of("iris.client.what.region", "Region: {region}");
public static final TextKey WHAT_CAVE = TextKey.of("iris.client.what.cave", "Cave: {cave}");
public static final TextKey WHAT_HEIGHT = TextKey.of("iris.client.what.height", "Height: {height} ({x}, {z})");
public static final TextKey PREGEN_STATS = TextKey.of("iris.client.pregen.stats", "{done} / {total} ({percent}%)");
public static final TextKey PREGEN_PAUSED = TextKey.of("iris.client.pregen.paused", "PAUSED");
public static final TextKey PREGEN_RATE = TextKey.of("iris.client.pregen.rate", "{rate}/s");
public static final TextKey PREGEN_RATE_ETA = TextKey.of("iris.client.pregen.rate_eta", "{rate}/s ETA {eta}");
public static final TextKey DURATION_HOURS_MINUTES = TextKey.of("iris.client.duration.hours_minutes", "{hours}h {minutes}m");
public static final TextKey DURATION_MINUTES_SECONDS = TextKey.of("iris.client.duration.minutes_seconds", "{minutes}m {seconds}s");
public static final TextKey DURATION_SECONDS = TextKey.of("iris.client.duration.seconds", "{seconds}s");
private static final List<MessageKey> KEYS = List.of(
VISION_TITLE,
VISION_CONNECTING,
VISION_NOT_CONNECTED,
VISION_NOT_IRIS_WORLD,
VISION_NO_DIMENSION_DATA,
VISION_HEADER_DETAIL,
VISION_FOOTER_HINT,
VISION_DIMENSION_PACK,
TOAST_STUDIO_HOTLOAD,
TOAST_CHANGED_FILES,
TOAST_RELOAD_FAILED,
TOAST_RELOADED,
TOAST_PACK_FAILED,
WHAT_TITLE,
WHAT_QUERYING,
WHAT_BIOME,
WHAT_REGION,
WHAT_CAVE,
WHAT_HEIGHT,
PREGEN_STATS,
PREGEN_PAUSED,
PREGEN_RATE,
PREGEN_RATE_ETA,
DURATION_HOURS_MINUTES,
DURATION_MINUTES_SECONDS,
DURATION_SECONDS
);
private ClientUiMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -0,0 +1,127 @@
package art.arcane.iris.core.localization;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
public final class DesktopUiMessages {
public static final TextKey VISION_TITLE = TextKey.of("iris.desktop.vision.title", "Iris Vision");
public static final TextKey VISION_VIEW = TextKey.of("iris.desktop.vision.view", "View:");
public static final TextKey VISION_GRID = TextKey.of("iris.desktop.vision.grid", "Grid");
public static final TextKey VISION_FOLLOW = TextKey.of("iris.desktop.vision.follow", "Follow");
public static final TextKey VISION_LOW_QUALITY_SHORT = TextKey.of("iris.desktop.vision.low_quality_short", "LQ");
public static final TextKey VISION_REFRESHING = TextKey.of("iris.desktop.vision.refreshing", "Refreshing");
public static final TextKey VISION_FPS = TextKey.of("iris.desktop.vision.fps", "{fps} FPS");
public static final TextKey VISION_ZOOM_RESET = TextKey.of("iris.desktop.vision.zoom_reset", "Zoom reset");
public static final TextKey VISION_GRID_ENABLED = TextKey.of("iris.desktop.vision.grid_enabled", "Grid enabled");
public static final TextKey VISION_GRID_DISABLED = TextKey.of("iris.desktop.vision.grid_disabled", "Grid disabled");
public static final TextKey VISION_FOLLOWING = TextKey.of("iris.desktop.vision.following", "Following {player}");
public static final TextKey VISION_NO_PLAYER = TextKey.of("iris.desktop.vision.no_player", "No player in world");
public static final TextKey VISION_FOLLOW_DISABLED = TextKey.of("iris.desktop.vision.follow_disabled", "Follow disabled");
public static final TextKey VISION_LOW_QUALITY = TextKey.of("iris.desktop.vision.low_quality", "Low quality");
public static final TextKey VISION_HIGH_QUALITY = TextKey.of("iris.desktop.vision.high_quality", "High quality");
public static final TextKey VISION_STATUS_LEFT = TextKey.of("iris.desktop.vision.status_left", "{mode} | {bpp} bpp | {width} x {height} blocks");
public static final TextKey VISION_STATUS_RIGHT = TextKey.of("iris.desktop.vision.status_right", "X: {x} Z: {z} | {fps} FPS");
public static final TextKey VISION_ENTITY_POSITION = TextKey.of("iris.desktop.vision.entity_position", "Position: {x}, {y}, {z}");
public static final TextKey VISION_ENTITY_HEALTH = TextKey.of("iris.desktop.vision.entity_health", "Health: {health} / {maximum}");
public static final TextKey VISION_BLOCK_POSITION = TextKey.of("iris.desktop.vision.block_position", "Block {x}, {z}");
public static final TextKey VISION_CHUNK_POSITION = TextKey.of("iris.desktop.vision.chunk_position", "Chunk {x}, {z}");
public static final TextKey VISION_REGION_POSITION = TextKey.of("iris.desktop.vision.region_position", "Region {x}, {z}");
public static final TextKey VISION_BIOME_KEY = TextKey.of("iris.desktop.vision.biome_key", "Key: {key}");
public static final TextKey VISION_BIOME_FILE = TextKey.of("iris.desktop.vision.biome_file", "File: {file}");
public static final TextKey VISION_VELOCITY = TextKey.of("iris.desktop.vision.velocity", "Velocity: {velocity}");
public static final TextKey VISION_TILES = TextKey.of("iris.desktop.vision.tiles", "Tiles: {high} HD / {low} LQ");
public static final TextKey VISION_WORKERS = TextKey.of("iris.desktop.vision.workers", "Workers: {high} HD / {low} LQ");
public static final TextKey VISION_CENTER = TextKey.of("iris.desktop.vision.center", "Center: {x}, {z}");
public static final TextKey VISION_HELP_TOGGLE = TextKey.of("iris.desktop.vision.help.toggle", "Toggle help");
public static final TextKey VISION_HELP_REFRESH = TextKey.of("iris.desktop.vision.help.refresh", "Refresh tiles");
public static final TextKey VISION_HELP_FOLLOW = TextKey.of("iris.desktop.vision.help.follow", "Follow player");
public static final TextKey VISION_HELP_ZOOM = TextKey.of("iris.desktop.vision.help.zoom", "Zoom in/out");
public static final TextKey VISION_HELP_RESET_ZOOM = TextKey.of("iris.desktop.vision.help.reset_zoom", "Reset zoom");
public static final TextKey VISION_HELP_CYCLE_MODE = TextKey.of("iris.desktop.vision.help.cycle_mode", "Cycle render mode");
public static final TextKey VISION_HELP_QUALITY = TextKey.of("iris.desktop.vision.help.quality", "Toggle tile quality");
public static final TextKey VISION_HELP_FPS = TextKey.of("iris.desktop.vision.help.fps", "Toggle 30/60 FPS");
public static final TextKey VISION_HELP_GRID = TextKey.of("iris.desktop.vision.help.grid", "Toggle grid");
public static final TextKey VISION_HELP_BIOME = TextKey.of("iris.desktop.vision.help.biome", "Detailed biome info");
public static final TextKey VISION_HELP_TELEPORT = TextKey.of("iris.desktop.vision.help.teleport", "Teleport to cursor");
public static final TextKey VISION_HELP_EDITOR = TextKey.of("iris.desktop.vision.help.editor", "Open biome in editor");
public static final TextKey VISION_OPENED = TextKey.of("iris.desktop.vision.opened", "Opened {target}");
public static final TextKey VISION_TELEPORTING = TextKey.of("iris.desktop.vision.teleporting", "Teleporting to {x}, {z}");
public static final TextKey VISION_MODE_BIOME = TextKey.of("iris.desktop.vision.mode.biome", "Biome");
public static final TextKey VISION_MODE_BIOME_LAND = TextKey.of("iris.desktop.vision.mode.biome_land", "Biome land");
public static final TextKey VISION_MODE_BIOME_SEA = TextKey.of("iris.desktop.vision.mode.biome_sea", "Biome sea");
public static final TextKey VISION_MODE_REGION = TextKey.of("iris.desktop.vision.mode.region", "Region");
public static final TextKey VISION_MODE_CAVE_LAND = TextKey.of("iris.desktop.vision.mode.cave_land", "Cave land");
public static final TextKey VISION_MODE_HEIGHT = TextKey.of("iris.desktop.vision.mode.height", "Height");
public static final TextKey VISION_MODE_OBJECT_LOAD = TextKey.of("iris.desktop.vision.mode.object_load", "Object load");
public static final TextKey VISION_MODE_DECORATOR_LOAD = TextKey.of("iris.desktop.vision.mode.decorator_load", "Decorator load");
public static final TextKey VISION_MODE_CONTINENT = TextKey.of("iris.desktop.vision.mode.continent", "Continent");
public static final TextKey VISION_MODE_LAYER_LOAD = TextKey.of("iris.desktop.vision.mode.layer_load", "Layer load");
public static final TextKey NOISE_TITLE = TextKey.of("iris.desktop.noise.title", "Noise Explorer");
public static final TextKey NOISE_TITLE_GENERATOR = TextKey.of("iris.desktop.noise.title_generator", "Noise Explorer: {generator}");
public static final TextKey NOISE_SEARCH = TextKey.of("iris.desktop.noise.search", "Search...");
public static final TextKey NOISE_STATUS = TextKey.of("iris.desktop.noise.status", "{name} | X: {x} Z: {z} | Zoom: {zoom} | Value: {value} | {fps} FPS");
public static final TextKey NOISE_CATEGORY_CUSTOM = TextKey.of("iris.desktop.noise.category.custom", "Custom");
public static final TextKey NOISE_CATEGORY_PACK_GENERATORS = TextKey.of("iris.desktop.noise.category.pack_generators", "Pack Generators");
public static final TextKey NOISE_CATEGORY_SIMPLEX = TextKey.of("iris.desktop.noise.category.simplex", "Simplex");
public static final TextKey NOISE_CATEGORY_PERLIN = TextKey.of("iris.desktop.noise.category.perlin", "Perlin");
public static final TextKey NOISE_CATEGORY_CELLULAR = TextKey.of("iris.desktop.noise.category.cellular", "Cellular");
public static final TextKey NOISE_CATEGORY_IRIS = TextKey.of("iris.desktop.noise.category.iris", "Iris");
public static final TextKey NOISE_CATEGORY_CLOVER = TextKey.of("iris.desktop.noise.category.clover", "Clover");
public static final TextKey NOISE_CATEGORY_HEXAGON = TextKey.of("iris.desktop.noise.category.hexagon", "Hexagon");
public static final TextKey NOISE_CATEGORY_VASCULAR = TextKey.of("iris.desktop.noise.category.vascular", "Vascular");
public static final TextKey NOISE_CATEGORY_GLOBE = TextKey.of("iris.desktop.noise.category.globe", "Globe");
public static final TextKey NOISE_CATEGORY_CUBIC = TextKey.of("iris.desktop.noise.category.cubic", "Cubic");
public static final TextKey NOISE_CATEGORY_FRACTAL = TextKey.of("iris.desktop.noise.category.fractal", "Fractal");
public static final TextKey NOISE_CATEGORY_STATIC = TextKey.of("iris.desktop.noise.category.static", "Static");
public static final TextKey NOISE_CATEGORY_NOWHERE = TextKey.of("iris.desktop.noise.category.nowhere", "Nowhere");
public static final TextKey NOISE_CATEGORY_SIERPINSKI = TextKey.of("iris.desktop.noise.category.sierpinski", "Sierpinski");
public static final TextKey NOISE_CATEGORY_UTILITY = TextKey.of("iris.desktop.noise.category.utility", "Utility");
public static final TextKey NOISE_CATEGORY_OTHER = TextKey.of("iris.desktop.noise.category.other", "Other");
public static final TextKey PREGEN_INITIALIZING = TextKey.of("iris.desktop.pregen.initializing", "Initializing...");
public static final TextKey PREGEN_TITLE = TextKey.of("iris.desktop.pregen.title", "Pregen View");
public static final TextKey PREGEN_METHOD_PENDING = TextKey.of("iris.desktop.pregen.method_pending", "Pending");
public static final TextKey PREGEN_PAUSED = TextKey.of("iris.desktop.pregen.paused", "PAUSED");
public static final TextKey PREGEN_RESUME_HINT = TextKey.of("iris.desktop.pregen.resume_hint", "Press P to resume");
public static final TextKey PREGEN_PAUSE_HINT = TextKey.of("iris.desktop.pregen.pause_hint", "Press P to pause");
public static final TextKey PREGEN_PROGRESS_PAUSED = TextKey.of("iris.desktop.pregen.progress_paused", "PAUSED {generated} of {total} ({percent} complete)");
public static final TextKey PREGEN_PROGRESS_SAVING = TextKey.of("iris.desktop.pregen.progress_saving", "Saving... {generated} of {total} ({percent} complete)");
public static final TextKey PREGEN_PROGRESS_GENERATING = TextKey.of("iris.desktop.pregen.progress_generating", "Generating {generated} of {total} ({percent} complete)");
public static final TextKey PREGEN_SPEED = TextKey.of("iris.desktop.pregen.speed", "Speed: {chunksPerSecond} chunks/s, {regionsPerMinute} regions/m, {chunksPerMinute} chunks/m");
public static final TextKey PREGEN_SPEED_CACHED = TextKey.of("iris.desktop.pregen.speed_cached", "Speed: cached {chunksPerSecond} chunks/s, {regionsPerMinute} regions/m, {chunksPerMinute} chunks/m");
public static final TextKey PREGEN_TIME = TextKey.of("iris.desktop.pregen.time", "{remaining} remaining ({elapsed} elapsed)");
public static final TextKey PREGEN_METHOD = TextKey.of("iris.desktop.pregen.method", "Generation method: {method}");
public static final TextKey PREGEN_MEMORY = TextKey.of("iris.desktop.pregen.memory", "Memory: {used} ({usage}) Pressure: {pressure}/s");
private static final List<MessageKey> KEYS = List.of(
VISION_TITLE, VISION_VIEW, VISION_GRID, VISION_FOLLOW, VISION_LOW_QUALITY_SHORT,
VISION_REFRESHING, VISION_FPS, VISION_ZOOM_RESET, VISION_GRID_ENABLED, VISION_GRID_DISABLED,
VISION_FOLLOWING, VISION_NO_PLAYER, VISION_FOLLOW_DISABLED, VISION_LOW_QUALITY, VISION_HIGH_QUALITY,
VISION_STATUS_LEFT, VISION_STATUS_RIGHT, VISION_ENTITY_POSITION, VISION_ENTITY_HEALTH,
VISION_BLOCK_POSITION, VISION_CHUNK_POSITION, VISION_REGION_POSITION, VISION_BIOME_KEY,
VISION_BIOME_FILE, VISION_VELOCITY, VISION_TILES, VISION_WORKERS, VISION_CENTER,
VISION_HELP_TOGGLE, VISION_HELP_REFRESH, VISION_HELP_FOLLOW, VISION_HELP_ZOOM,
VISION_HELP_RESET_ZOOM, VISION_HELP_CYCLE_MODE, VISION_HELP_QUALITY, VISION_HELP_FPS,
VISION_HELP_GRID, VISION_HELP_BIOME, VISION_HELP_TELEPORT, VISION_HELP_EDITOR, VISION_OPENED,
VISION_TELEPORTING, VISION_MODE_BIOME, VISION_MODE_BIOME_LAND, VISION_MODE_BIOME_SEA,
VISION_MODE_REGION, VISION_MODE_CAVE_LAND, VISION_MODE_HEIGHT, VISION_MODE_OBJECT_LOAD,
VISION_MODE_DECORATOR_LOAD, VISION_MODE_CONTINENT, VISION_MODE_LAYER_LOAD, NOISE_TITLE,
NOISE_TITLE_GENERATOR, NOISE_SEARCH, NOISE_STATUS, NOISE_CATEGORY_CUSTOM,
NOISE_CATEGORY_PACK_GENERATORS, NOISE_CATEGORY_SIMPLEX, NOISE_CATEGORY_PERLIN,
NOISE_CATEGORY_CELLULAR, NOISE_CATEGORY_IRIS, NOISE_CATEGORY_CLOVER, NOISE_CATEGORY_HEXAGON,
NOISE_CATEGORY_VASCULAR, NOISE_CATEGORY_GLOBE, NOISE_CATEGORY_CUBIC, NOISE_CATEGORY_FRACTAL,
NOISE_CATEGORY_STATIC, NOISE_CATEGORY_NOWHERE, NOISE_CATEGORY_SIERPINSKI,
NOISE_CATEGORY_UTILITY, NOISE_CATEGORY_OTHER, PREGEN_INITIALIZING, PREGEN_TITLE,
PREGEN_METHOD_PENDING, PREGEN_PAUSED, PREGEN_RESUME_HINT, PREGEN_PAUSE_HINT,
PREGEN_PROGRESS_PAUSED, PREGEN_PROGRESS_SAVING, PREGEN_PROGRESS_GENERATING, PREGEN_SPEED,
PREGEN_SPEED_CACHED, PREGEN_TIME, PREGEN_METHOD, PREGEN_MEMORY
);
private DesktopUiMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -0,0 +1,467 @@
package art.arcane.iris.core.localization;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.spi.IrisPlatforms;
import art.arcane.volmlib.util.director.DirectorTextResolver;
import art.arcane.volmlib.util.localization.LinesKey;
import art.arcane.volmlib.util.localization.LocaleOverlay;
import art.arcane.volmlib.util.localization.LocalizationCandidate;
import art.arcane.volmlib.util.localization.LocalizationIssue;
import art.arcane.volmlib.util.localization.LocalizationManager;
import art.arcane.volmlib.util.localization.LocalizationReloadResult;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.volmlib.util.localization.MessageArgumentKind;
import art.arcane.volmlib.util.localization.MessageArgs;
import art.arcane.volmlib.util.localization.MessageCatalog;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.PluralKey;
import art.arcane.volmlib.util.localization.PluralSelector;
import art.arcane.volmlib.util.localization.ResolvedLines;
import art.arcane.volmlib.util.localization.ResolvedText;
import art.arcane.volmlib.util.localization.TextKey;
import art.arcane.volmlib.util.localization.VolmitLocales;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.io.File;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
public final class IrisLanguage {
private static final long MAX_LOCALE_BYTES = 2L * 1024L * 1024L;
private static final int MAX_REPORTED_ISSUES = 12;
private static final Pattern LOCALE_NAME = Pattern.compile("[A-Za-z0-9_-]+");
private static final Pattern LEGACY_COLOR = Pattern.compile("(?i)\\u00a7[0-9A-FK-ORX]");
private static final MessageCatalog CATALOG = IrisMessages.catalog();
private static final LocalizationManager MANAGER = new LocalizationManager(
LocalizationCandidate.english(CATALOG, PluralSelector.oneOther())
);
private static volatile File dataFolder;
private static volatile File watchedFile;
private static volatile long watchedSignature = Long.MIN_VALUE;
private static volatile String activeLocale = CATALOG.englishLocale();
private IrisLanguage() {
}
public static boolean initialize() {
if (!IrisPlatforms.isBound()) {
return false;
}
return reload(IrisPlatforms.get().dataFolder(), configuredLocale());
}
public static synchronized boolean reload() {
File root = dataFolder;
if (root == null && IrisPlatforms.isBound()) {
root = IrisPlatforms.get().dataFolder();
}
if (root == null) {
return false;
}
return reload(root, configuredLocale());
}
public static synchronized boolean reload(File root, String locale) {
File resolvedRoot = root == null ? null : root.getAbsoluteFile();
if (resolvedRoot == null) {
throw new IllegalArgumentException("Iris locale data folder cannot be null");
}
String requestedLocale;
try {
requestedLocale = normalizeLocale(locale);
} catch (RuntimeException exception) {
dataFolder = resolvedRoot;
IrisLogging.error("Rejected locale setting '" + locale + "'; continuing with " + activeLocale + ".");
IrisLogging.reportError(exception);
exception.printStackTrace();
return false;
}
LocalizationReloadResult result = MANAGER.reload(() -> loadCandidate(resolvedRoot, requestedLocale));
dataFolder = resolvedRoot;
File override = overrideFile(resolvedRoot, requestedLocale);
watchedFile = override;
watchedSignature = signature(override);
if (!result.applied()) {
reportRejectedReload(requestedLocale, result);
return false;
}
activeLocale = requestedLocale;
int warnings = result.validation().warnings().size();
IrisLogging.info("Loaded locale " + requestedLocale + " with " + warnings + " fallback "
+ (warnings == 1 ? "entry" : "entries") + ".");
return true;
}
public static synchronized boolean update() {
File root = dataFolder;
if (root == null) {
return initialize();
}
String locale;
try {
locale = normalizeLocale(configuredLocale());
} catch (RuntimeException exception) {
return reload(root, configuredLocale());
}
File expected = overrideFile(root, locale);
long signature = signature(expected);
if (expected.equals(watchedFile) && signature == watchedSignature) {
return true;
}
return reload(root, locale);
}
public static String activeLocale() {
return activeLocale;
}
public static File overrideFolder() {
File root = dataFolder;
if (root == null && IrisPlatforms.isBound()) {
root = IrisPlatforms.get().dataFolder();
}
if (root == null) {
return null;
}
return new File(root, "languages/overrides");
}
public static String text(MessageKey key, MessageArgument... arguments) {
MessageArgs.Builder builder = MessageArgs.builder();
for (MessageArgument argument : arguments) {
builder.add(argument);
}
return text(key, builder.build());
}
public static String text(MessageKey key) {
return text(key, MessageArgs.empty());
}
public static String text(MessageKey key, MessageArgs arguments) {
return render(resolve(key, arguments));
}
public static String plain(MessageKey key, MessageArgument... arguments) {
MessageArgs.Builder builder = MessageArgs.builder();
for (MessageArgument argument : arguments) {
builder.add(argument);
}
return plain(key, builder.build());
}
public static String plain(MessageKey key) {
return plain(key, MessageArgs.empty());
}
public static String plain(MessageKey key, MessageArgs arguments) {
String rendered = render(resolve(key, arguments));
return IrisLogging.clean(rendered);
}
public static String errorDetail(Throwable throwable) {
String message = throwable == null ? null : throwable.getMessage();
if (message == null || message.isBlank()) {
return "";
}
return plain(RuntimeUiMessages.ERROR_DETAIL_SUFFIX, MessageArgument.untrusted("error", message));
}
public static DirectorTextResolver directorResolver() {
return (key, arguments) -> {
MessageKey definition = CATALOG.key(key.id());
if (!(definition instanceof TextKey textKey)) {
return DirectorTextResolver.ENGLISH.resolve(key, arguments);
}
return plain(textKey, arguments);
};
}
public static MessageCatalog catalog() {
return CATALOG;
}
private static ResolvedText resolve(MessageKey key, MessageArgs arguments) {
if (key instanceof TextKey textKey) {
return MANAGER.snapshot().resolve(textKey, arguments);
}
if (key instanceof PluralKey pluralKey) {
return MANAGER.snapshot().resolve(pluralKey, arguments);
}
if (key instanceof LinesKey linesKey) {
ResolvedLines lines = MANAGER.snapshot().resolve(linesKey, arguments);
return new ResolvedText(lines.key(), lines.locale(), String.join("\n", lines.lines()), lines.arguments());
}
throw new IllegalArgumentException("Unsupported Iris message key: " + key.id());
}
private static LocalizationCandidate loadCandidate(File root, String locale) throws Exception {
File folder = new File(root, "languages/overrides");
Files.createDirectories(folder.toPath());
List<LocaleOverlay> overlays = new ArrayList<>(2);
File override = overrideFile(root, locale);
if (override.exists()) {
overlays.add(loadFileOverlay(override, locale));
}
if (!CATALOG.englishLocale().equals(locale)) {
LocaleOverlay bundled = loadBundledOverlay(locale);
if (bundled != null) {
overlays.add(bundled);
}
}
return new LocalizationCandidate(CATALOG, overlays, PluralSelector.oneOther());
}
static LocaleOverlay loadBundledOverlay(String locale) throws Exception {
String normalizedLocale = normalizeLocale(locale);
if (CATALOG.englishLocale().equals(normalizedLocale)) {
return null;
}
String resourceName = "/languages/" + normalizedLocale + ".json";
InputStream input = IrisLanguage.class.getResourceAsStream(resourceName);
if (input == null) {
if (VolmitLocales.isBundled(normalizedLocale)) {
throw new IllegalStateException("Missing bundled Iris locale resource: " + resourceName);
}
return null;
}
try (InputStream stream = input) {
byte[] bytes = stream.readNBytes((int) MAX_LOCALE_BYTES + 1);
if (bytes.length > MAX_LOCALE_BYTES) {
throw new IllegalArgumentException("Bundled locale is too large: " + resourceName);
}
return parseOverlay("bundled:" + resourceName, normalizedLocale, new String(bytes, StandardCharsets.UTF_8));
}
}
private static LocaleOverlay loadFileOverlay(File override, String locale) throws Exception {
if (!override.isFile()) {
throw new IllegalArgumentException("Locale override is not a regular file: " + override.getPath());
}
if (override.length() > MAX_LOCALE_BYTES) {
throw new IllegalArgumentException("Locale override is too large: " + override.getPath());
}
String raw = Files.readString(override.toPath(), StandardCharsets.UTF_8);
return parseOverlay(override.getPath(), locale, raw);
}
private static LocaleOverlay parseOverlay(String source, String locale, String raw) {
JsonElement parsed = JsonParser.parseString(raw == null || raw.isBlank() ? "{}" : raw);
if (!parsed.isJsonObject()) {
throw new IllegalArgumentException("Locale source is not a JSON object: " + source);
}
JsonObject root = parsed.getAsJsonObject();
for (String key : root.keySet()) {
if (!key.equals("locale") && !key.equals("messages")) {
throw new IllegalArgumentException("Unknown locale root key: " + key);
}
}
if (root.has("locale")) {
JsonElement declaredLocale = root.get("locale");
if (!declaredLocale.isJsonPrimitive() || !locale.equals(normalizeLocale(declaredLocale.getAsString()))) {
throw new IllegalArgumentException("Locale source declares a different locale than its file: " + source);
}
}
LocaleOverlay.Builder builder = LocaleOverlay.builder(source, locale);
if (!root.has("messages")) {
return builder.build();
}
JsonElement messages = root.get("messages");
if (!messages.isJsonObject()) {
throw new IllegalArgumentException("Locale messages must be a JSON object: " + source);
}
appendMessages(builder, messages.getAsJsonObject(), "");
return builder.build();
}
private static void appendMessages(LocaleOverlay.Builder builder, JsonObject object, String prefix) {
for (Map.Entry<String, JsonElement> entry : object.entrySet()) {
String key = prefix.isEmpty() ? entry.getKey() : prefix + "." + entry.getKey();
JsonElement value = entry.getValue();
if (value == null || value.isJsonNull()) {
throw new IllegalArgumentException("Locale value cannot be null: " + key);
}
MessageKey definition = CATALOG.key(key);
if (value.isJsonObject() && definition instanceof PluralKey) {
builder.plural(key, readPlural(key, value.getAsJsonObject()));
} else if (value.isJsonObject()) {
appendMessages(builder, value.getAsJsonObject(), key);
} else if (value.isJsonArray()) {
builder.lines(key, readLines(key, value.getAsJsonArray()));
} else if (value.isJsonPrimitive() && value.getAsJsonPrimitive().isString()) {
builder.text(key, value.getAsString());
} else {
throw new IllegalArgumentException("Locale value must be text, lines, or plural forms: " + key);
}
}
}
private static List<String> readLines(String key, JsonArray array) {
List<String> lines = new ArrayList<>(array.size());
for (JsonElement value : array) {
if (value == null || !value.isJsonPrimitive() || !value.getAsJsonPrimitive().isString()) {
throw new IllegalArgumentException("Locale line must be text: " + key);
}
lines.add(value.getAsString());
}
return lines;
}
private static Map<String, String> readPlural(String key, JsonObject object) {
Map<String, String> forms = new LinkedHashMap<>();
for (Map.Entry<String, JsonElement> entry : object.entrySet()) {
JsonElement value = entry.getValue();
if (value == null || !value.isJsonPrimitive() || !value.getAsJsonPrimitive().isString()) {
throw new IllegalArgumentException("Locale plural form must be text: " + key + "." + entry.getKey());
}
forms.put(entry.getKey(), value.getAsString());
}
return forms;
}
private static String render(ResolvedText resolved) {
String prepared = resolved.template();
List<RenderedArgument> replacements = new ArrayList<>(resolved.arguments().size());
int index = 0;
for (MessageArgument argument : resolved.arguments().arguments().values()) {
String token = "\uE000" + index + "\uE001";
prepared = prepared.replace("{" + argument.name() + "}", token);
replacements.add(new RenderedArgument(token, argument));
index++;
}
String rendered = translateColors(prepared);
StringBuilder output = new StringBuilder(rendered.length());
int cursor = 0;
while (cursor < rendered.length()) {
if (rendered.charAt(cursor) != '\uE000') {
output.append(rendered.charAt(cursor));
cursor++;
continue;
}
int end = rendered.indexOf('\uE001', cursor + 1);
int replacementIndex = end < 0 ? -1 : parseReplacementIndex(rendered, cursor + 1, end);
if (replacementIndex < 0 || replacementIndex >= replacements.size()) {
output.append(rendered.charAt(cursor));
cursor++;
continue;
}
RenderedArgument replacement = replacements.get(replacementIndex);
if (replacement.token().length() != end - cursor + 1
|| !rendered.regionMatches(cursor, replacement.token(), 0, replacement.token().length())) {
output.append(rendered.charAt(cursor));
cursor++;
continue;
}
MessageArgument argument = replacement.argument();
String value = String.valueOf(argument.value());
output.append(argument.kind() == MessageArgumentKind.TRUSTED
? translateColors(value)
: escapeUntrusted(value));
cursor = end + 1;
}
return output.toString();
}
private static int parseReplacementIndex(String value, int start, int end) {
if (start >= end) {
return -1;
}
int result = 0;
for (int index = start; index < end; index++) {
char character = value.charAt(index);
if (character < '0' || character > '9') {
return -1;
}
int digit = character - '0';
if (result > (Integer.MAX_VALUE - digit) / 10) {
return -1;
}
result = result * 10 + digit;
}
return result;
}
private static String translateColors(String value) {
if (value == null || value.isEmpty()) {
return "";
}
char[] characters = value.toCharArray();
for (int index = 0; index < characters.length - 1; index++) {
if (characters[index] == '&' && isColorCode(characters[index + 1])) {
characters[index] = '\u00a7';
characters[index + 1] = Character.toLowerCase(characters[index + 1]);
}
}
return new String(characters);
}
private static boolean isColorCode(char value) {
char lowered = Character.toLowerCase(value);
return lowered >= '0' && lowered <= '9' || lowered >= 'a' && lowered <= 'f'
|| lowered >= 'k' && lowered <= 'o' || lowered == 'r' || lowered == 'x';
}
private static String escapeUntrusted(String value) {
return LEGACY_COLOR.matcher(value).replaceAll("")
.replace("&", "")
.replace("<", "")
.replace(">", "");
}
private static String configuredLocale() {
IrisSettings.IrisSettingsGeneral general = IrisSettings.get().getGeneral();
return general == null ? CATALOG.englishLocale() : general.getLanguage();
}
private static String normalizeLocale(String locale) {
String value = locale == null || locale.isBlank() ? CATALOG.englishLocale() : locale.trim();
if (!LOCALE_NAME.matcher(value).matches()) {
throw new IllegalArgumentException("Invalid locale name: " + value);
}
return value;
}
private static File overrideFile(File root, String locale) {
return new File(new File(root, "languages/overrides"), normalizeLocale(locale) + ".json").getAbsoluteFile();
}
private static long signature(File file) {
if (file == null || !file.exists()) {
return 0L;
}
return file.lastModified() * 31L + file.length();
}
private static void reportRejectedReload(String locale, LocalizationReloadResult result) {
IrisLogging.error("Rejected locale reload for " + locale + "; continuing with " + activeLocale + ".");
List<LocalizationIssue> issues = result.validation().errors();
for (int index = 0; index < Math.min(issues.size(), MAX_REPORTED_ISSUES); index++) {
LocalizationIssue issue = issues.get(index);
IrisLogging.error(issue.source() + " [" + issue.key() + "]: " + issue.detail());
}
if (issues.size() > MAX_REPORTED_ISSUES) {
IrisLogging.error((issues.size() - MAX_REPORTED_ISSUES) + " additional locale errors were omitted.");
}
if (result.failure() != null) {
IrisLogging.reportError(result.failure());
result.failure().printStackTrace();
}
}
private record RenderedArgument(String token, MessageArgument argument) {
}
}
@@ -0,0 +1,126 @@
package art.arcane.iris.core.localization;
import art.arcane.volmlib.util.director.DirectorMessages;
import art.arcane.volmlib.util.localization.MessageCatalog;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.TextKey;
import art.arcane.volmlib.util.localization.VolmitLocales;
import java.util.List;
public final class IrisMessages {
public static final TextKey COMMAND_PERMISSION_DENIED = TextKey.of(
"iris.command.permission_denied",
"You lack the permission '{permission}'"
);
public static final TextKey COMMAND_UNKNOWN = TextKey.of(
"iris.command.unknown",
"Unknown Iris command"
);
public static final TextKey COMMAND_PLAYER_ONLY = TextKey.of(
"iris.command.player_only",
"This command can only be used by players."
);
public static final TextKey COMMAND_IRIS_WORLD_REQUIRED = TextKey.of(
"iris.command.iris_world_required",
"This dimension is not generated by Iris."
);
public static final TextKey COMMAND_RELOAD_SUCCESS = TextKey.of(
"iris.command.reload.success",
"Hotloaded settings and locale {locale}."
);
public static final TextKey COMMAND_RELOAD_FAILED = TextKey.of(
"iris.command.reload.failed",
"Settings were reloaded, but locale {locale} was rejected; continuing with {activeLocale}."
);
public static final TextKey MODDED_HELP_UNKNOWN_SECTION = TextKey.of(
"iris.modded.help.unknown_section",
"Unknown Iris help section: {section}"
);
public static final TextKey MODDED_HELP_BACK_HOVER = TextKey.of(
"iris.modded.help.back_hover",
"Return to {parent}."
);
public static final TextKey MODDED_HELP_COMMAND_PARAMETER = TextKey.of(
"iris.modded.help.command_parameter",
"Command parameter"
);
public static final TextKey MODDED_HELP_PARAMETER_REQUIRED = TextKey.of(
"iris.modded.help.parameter_required",
"This parameter is required."
);
public static final TextKey MODDED_HELP_PARAMETER_OPTIONAL = TextKey.of(
"iris.modded.help.parameter_optional",
"This parameter is optional."
);
public static final TextKey MODDED_HELP_BRIGADIER_TEXT = TextKey.of(
"iris.modded.help.brigadier_text",
"This parameter is read as text by Brigadier."
);
public static final TextKey MODDED_HELP_OPERATOR_NOTICE = TextKey.of(
"iris.modded.help.operator_notice",
"Iris commands need operator permission (level 2)."
);
public static final TextKey MODDED_HELP_OPERATOR_INSTRUCTION = TextKey.of(
"iris.modded.help.operator_instruction",
"Run {command} from the console (or enable cheats in singleplayer); until then these commands will not run or tab-complete."
);
public static final TextKey MODDED_PROPERTIES_NONE = TextKey.of(
"iris.modded.command.properties.none",
"Properties: (none)"
);
public static final TextKey MODDED_PROPERTIES = TextKey.of(
"iris.modded.command.properties.list",
"Properties: {properties}"
);
private static final List<MessageKey> RUNTIME_KEYS = List.of(
COMMAND_PERMISSION_DENIED,
COMMAND_UNKNOWN,
COMMAND_PLAYER_ONLY,
COMMAND_IRIS_WORLD_REQUIRED,
COMMAND_RELOAD_SUCCESS,
COMMAND_RELOAD_FAILED,
MODDED_HELP_UNKNOWN_SECTION,
MODDED_HELP_BACK_HOVER,
MODDED_HELP_COMMAND_PARAMETER,
MODDED_HELP_PARAMETER_REQUIRED,
MODDED_HELP_PARAMETER_OPTIONAL,
MODDED_HELP_BRIGADIER_TEXT,
MODDED_HELP_OPERATOR_NOTICE,
MODDED_HELP_OPERATOR_INSTRUCTION,
MODDED_PROPERTIES_NONE,
MODDED_PROPERTIES
);
private static final MessageCatalog CATALOG = createCatalog();
private IrisMessages() {
}
public static MessageCatalog catalog() {
return CATALOG;
}
public static MessageKey require(String id) {
return CATALOG.require(id);
}
private static MessageCatalog createCatalog() {
MessageCatalog.Builder builder = MessageCatalog.builder(VolmitLocales.ENGLISH);
builder.addAll(DirectorMessages.keys());
builder.addAll(RUNTIME_KEYS);
builder.addAll(BukkitCommandMessages.keys());
builder.addAll(BukkitCommandMessagesExtended.keys());
builder.addAll(ModdedCommandMessages.keys());
builder.addAll(DirectorCommandMessages.keys());
builder.addAll(ModdedHelpMessages.keys());
builder.addAll(RuntimeUiMessages.keys());
builder.addAll(BukkitRuntimeMessages.keys());
builder.addAll(RuntimeProgressMessages.keys());
builder.addAll(PackDownloadMessages.keys());
builder.addAll(ClientUiMessages.keys());
builder.addAll(BukkitUiMessages.keys());
builder.addAll(DesktopUiMessages.keys());
return builder.build();
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,454 @@
package art.arcane.iris.core.localization;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
public final class ModdedHelpMessages {
public static final TextKey COMMAND_VERSION_PRINT_VERSION_INFORMATION = TextKey.of(
"iris.modded.help.entry.command.version",
"Print version information"
);
public static final TextKey COMMAND_INFO_LIST_LOADED_IRIS_DIMENSIONS_AND_PACK_DETAILS = TextKey.of(
"iris.modded.help.entry.command.info",
"List loaded Iris dimensions and pack details"
);
public static final TextKey COMMAND_WHAT_INSPECT_THE_IRIS_BIOME_REGION_CAVE_BIOME_SURFACE_AND_CHUNK_AT_YOUR = TextKey.of(
"iris.modded.help.entry.command.what",
"Inspect the Iris biome, region, cave biome, surface and chunk at your position, the block you look at, your held item, or nearby markers"
);
public static final TextKey GROUP_FIND_FIND_AND_TELEPORT_TO_IRIS_BIOMES_REGIONS_OBJECTS_IRIS_STRUCTURES_NATIVE_STRUCTURES = TextKey.of(
"iris.modded.help.entry.group.find",
"Find and teleport to Iris biomes, regions, objects, Iris structures, native structures and points of interest"
);
public static final TextKey COMMAND_TP_TELEPORT_YOURSELF_OR_A_NAMED_PLAYER_INTO_A_LOADED_IRIS_DIMENSION = TextKey.of(
"iris.modded.help.entry.command.tp",
"Teleport yourself or a named player into a loaded Iris dimension"
);
public static final TextKey COMMAND_EVACUATE_TELEPORT_EVERY_PLAYER_OUT_OF_AN_IRIS_DIMENSION_TO_THE_PRIMARY_WORLD = TextKey.of(
"iris.modded.help.entry.command.evacuate",
"Teleport every player out of an Iris dimension to the primary world spawn"
);
public static final TextKey COMMAND_SEED_PRINT_WORLD_AND_ENGINE_SEED_INFORMATION = TextKey.of(
"iris.modded.help.entry.command.seed",
"Print world and engine seed information"
);
public static final TextKey COMMAND_DEBUG_TOGGLE_IRIS_DEBUG_LOGGING_AND_SAVE_SETTINGS_JSON = TextKey.of(
"iris.modded.help.entry.command.debug",
"Toggle Iris debug logging and save settings.json"
);
public static final TextKey COMMAND_RELOAD_RELOAD_SETTINGS_JSON_ALSO_HOTLOADED_AUTOMATICALLY_EVERY_3S = TextKey.of(
"iris.modded.help.entry.command.reload",
"Reload settings.json (also hotloaded automatically every 3s)"
);
public static final TextKey COMMAND_DOWNLOAD_DOWNLOAD_A_PACK_PROJECT = TextKey.of(
"iris.modded.help.entry.command.download",
"Download a pack project"
);
public static final TextKey COMMAND_METRICS_PRINT_GENERATION_METRICS_FOR_YOUR_CURRENT_IRIS_DIMENSION = TextKey.of(
"iris.modded.help.entry.command.metrics",
"Print generation metrics for your current Iris dimension"
);
public static final TextKey COMMAND_REGEN_DELETE_AND_REGENERATE_NEARBY_CHUNKS_IN_PLACE = TextKey.of(
"iris.modded.help.entry.command.regen",
"Delete and regenerate nearby chunks in place"
);
public static final TextKey GROUP_PREGEN_PREGENERATE_AN_IRIS_DIMENSION = TextKey.of(
"iris.modded.help.entry.group.pregen",
"Pregenerate an Iris dimension"
);
public static final TextKey COMMAND_WAND_GET_AN_IRIS_OBJECT_WAND = TextKey.of(
"iris.modded.help.entry.command.wand",
"Get an Iris object wand"
);
public static final TextKey GROUP_OBJECT_OBJECT_WAND_SAVE_PASTE_ANALYZE_AND_UNDO_TOOLS = TextKey.of(
"iris.modded.help.entry.group.object",
"Object wand, save, paste, analyze and undo tools"
);
public static final TextKey GROUP_EDIT_OPEN_PACK_BIOME_REGION_AND_DIMENSION_JSON_FILES_IN_YOUR_DESKTOP_EDITOR = TextKey.of(
"iris.modded.help.entry.group.edit",
"Open pack biome, region and dimension json files in your desktop editor"
);
public static final TextKey COMMAND_CREATE_CREATE_AND_INJECT_A_PERSISTENT_IRIS_DIMENSION_QUOTE_PACK_DIMENSIONKEY_TO_PICK = TextKey.of(
"iris.modded.help.entry.command.create",
"Create and inject a persistent Iris dimension; quote pack:dimensionKey to pick a specific pack dimension"
);
public static final TextKey GROUP_STUDIO_PACK_PROJECT_CREATION_PACKAGING_AND_REPORTS = TextKey.of(
"iris.modded.help.entry.group.studio",
"Pack project creation, packaging and reports"
);
public static final TextKey GROUP_PACK_PACK_VALIDATION_AND_MAINTENANCE = TextKey.of(
"iris.modded.help.entry.group.pack",
"Pack validation and maintenance"
);
public static final TextKey GROUP_WORLD_RUNTIME_IRIS_DIMENSION_CREATION_REMOVAL_AND_STATUS = TextKey.of(
"iris.modded.help.entry.group.world",
"Runtime Iris dimension creation, removal and status"
);
public static final TextKey GROUP_DATAPACK_WORLD_DATAPACK_INSTALL_AND_STATUS_HELPERS = TextKey.of(
"iris.modded.help.entry.group.datapack",
"World datapack install and status helpers"
);
public static final TextKey GROUP_STRUCTURE_IRIS_STRUCTURE_INDEX_INFO_AND_PLACEMENT_TOOLS = TextKey.of(
"iris.modded.help.entry.group.structure",
"Iris structure index, info and placement tools"
);
public static final TextKey COMMAND_GOLDENHASH_GENERATE_DETERMINISTIC_BLOCK_HASHES_FOR_PARITY_TESTING = TextKey.of(
"iris.modded.help.entry.command.goldenhash",
"Generate deterministic block hashes for parity testing"
);
public static final TextKey GROUP_DEVELOPER_DEVELOPER_DIAGNOSTICS_SENTRY_TEST_NETWORK_INTERFACES_REGION_FILE_SCAN = TextKey.of(
"iris.modded.help.entry.group.developer",
"Developer diagnostics: Sentry test, network interfaces, region-file scan"
);
public static final TextKey COMMAND_BIOME_FIND_AN_IRIS_BIOME = TextKey.of(
"iris.modded.help.entry.command.biome",
"Find an Iris biome"
);
public static final TextKey COMMAND_REGION_FIND_AN_IRIS_REGION = TextKey.of(
"iris.modded.help.entry.command.region",
"Find an Iris region"
);
public static final TextKey COMMAND_OBJECT_FIND_AN_OBJECT_PLACEMENT = TextKey.of(
"iris.modded.help.entry.command.object",
"Find an object placement"
);
public static final TextKey COMMAND_STRUCTURE_FIND_AN_IRIS_PLACED_OR_NATIVE_DATAPACK_STRUCTURE = TextKey.of(
"iris.modded.help.entry.command.structure",
"Find an Iris-placed or native/datapack structure"
);
public static final TextKey COMMAND_POI_FIND_A_SUPPORTED_POINT_OF_INTEREST = TextKey.of(
"iris.modded.help.entry.command.poi",
"Find a supported point of interest"
);
public static final TextKey COMMAND_BIOME_OPEN_A_BIOME_JSON_IN_YOUR_DESKTOP_EDITOR_NO_KEY_OPENS_THE = TextKey.of(
"iris.modded.help.entry.command.biome_2",
"Open a biome json in your desktop editor; no key opens the biome at your position"
);
public static final TextKey COMMAND_REGION_OPEN_A_REGION_JSON_IN_YOUR_DESKTOP_EDITOR_NO_KEY_OPENS_THE = TextKey.of(
"iris.modded.help.entry.command.region_2",
"Open a region json in your desktop editor; no key opens the region at your position"
);
public static final TextKey COMMAND_DIMENSION_OPEN_THE_CURRENT_PACK_S_DIMENSION_JSON_IN_YOUR_DESKTOP_EDITOR = TextKey.of(
"iris.modded.help.entry.command.dimension",
"Open the current pack's dimension json in your desktop editor"
);
public static final TextKey COMMAND_START_START_PREGENERATION_RADIUS_IN_BLOCKS_RESUMABLE_CHECKPOINT_CACHE_ON_BY_DEFAULT_CENTER = TextKey.of(
"iris.modded.help.entry.command.start",
"Start pregeneration; radius in blocks, resumable checkpoint cache on by default, center via 'at <x> <z>', flags compose in any order"
);
public static final TextKey COMMAND_STOP_STOP_THE_ACTIVE_PREGENERATION_TASK = TextKey.of(
"iris.modded.help.entry.command.stop",
"Stop the active pregeneration task"
);
public static final TextKey COMMAND_PAUSE_PAUSE_OR_RESUME_PREGENERATION = TextKey.of(
"iris.modded.help.entry.command.pause",
"Pause or resume pregeneration"
);
public static final TextKey COMMAND_STATUS_SHOW_PREGENERATION_STATUS = TextKey.of(
"iris.modded.help.entry.command.status",
"Show pregeneration status"
);
public static final TextKey COMMAND_WAND_GET_AN_IRIS_OBJECT_WAND_2 = TextKey.of(
"iris.modded.help.entry.command.wand_3",
"Get an Iris object wand"
);
public static final TextKey COMMAND_DUST_GET_DUST_THAT_REVEALS_OBJECT_PLACEMENTS = TextKey.of(
"iris.modded.help.entry.command.dust",
"Get dust that reveals object placements"
);
public static final TextKey COMMAND_SAVE_SAVE_THE_SELECTED_WAND_VOLUME_AS_AN_OBJECT = TextKey.of(
"iris.modded.help.entry.command.save",
"Save the selected wand volume as an object"
);
public static final TextKey COMMAND_PASTE_PASTE_AN_OBJECT_AT_YOUR_POSITION_OR_A_GIVEN_POSITION_OPTIONALLY_ROTATED = TextKey.of(
"iris.modded.help.entry.command.paste",
"Paste an object at your position or a given position, optionally rotated"
);
public static final TextKey COMMAND_EXPAND_EXPAND_THE_WAND_SELECTION_IN_YOUR_LOOKING_DIRECTION = TextKey.of(
"iris.modded.help.entry.command.expand",
"Expand the wand selection in your looking direction"
);
public static final TextKey COMMAND_CONTRACT_CONTRACT_THE_WAND_SELECTION_IN_YOUR_LOOKING_DIRECTION = TextKey.of(
"iris.modded.help.entry.command.contract",
"Contract the wand selection in your looking direction"
);
public static final TextKey COMMAND_SHIFT_SHIFT_THE_WAND_SELECTION_IN_YOUR_LOOKING_DIRECTION = TextKey.of(
"iris.modded.help.entry.command.shift",
"Shift the wand selection in your looking direction"
);
public static final TextKey COMMAND_POSITION1_SET_SELECTION_POINT_1 = TextKey.of(
"iris.modded.help.entry.command.position1",
"Set selection point 1"
);
public static final TextKey COMMAND_POSITION2_SET_SELECTION_POINT_2 = TextKey.of(
"iris.modded.help.entry.command.position2",
"Set selection point 2"
);
public static final TextKey COMMAND_X_Y_AUTOSELECT_UP_AND_OUT = TextKey.of(
"iris.modded.help.entry.command.x_y",
"Autoselect up and out"
);
public static final TextKey COMMAND_X_Y_AUTOSELECT_UP_DOWN_AND_OUT = TextKey.of(
"iris.modded.help.entry.command.x_y_2",
"Autoselect up, down and out"
);
public static final TextKey COMMAND_ANALYZE_SHOW_OBJECT_COMPOSITION = TextKey.of(
"iris.modded.help.entry.command.analyze",
"Show object composition"
);
public static final TextKey COMMAND_SHRINK_SHRINK_AN_OBJECT_TO_ITS_MINIMUM_SIZE = TextKey.of(
"iris.modded.help.entry.command.shrink",
"Shrink an object to its minimum size"
);
public static final TextKey COMMAND_PLAUSIBILIZE_GROW_BRANCHES_SO_TREE_LEAVES_SURVIVE_VANILLA_DECAY = TextKey.of(
"iris.modded.help.entry.command.plausibilize",
"Grow branches so tree leaves survive vanilla decay"
);
public static final TextKey COMMAND_UNDO_UNDO_PASTED_OBJECTS = TextKey.of(
"iris.modded.help.entry.command.undo",
"Undo pasted objects"
);
public static final TextKey COMMAND_CREATE_CREATE_A_NEW_PACK_PROJECT = TextKey.of(
"iris.modded.help.entry.command.create_2",
"Create a new pack project"
);
public static final TextKey COMMAND_PACKAGE_PACKAGE_A_DIMENSION_INTO_A_COMPRESSED_FORMAT = TextKey.of(
"iris.modded.help.entry.command.package",
"Package a dimension into a compressed format"
);
public static final TextKey COMMAND_VERSION_PRINT_A_PACK_VERSION = TextKey.of(
"iris.modded.help.entry.command.version_2",
"Print a pack version"
);
public static final TextKey COMMAND_REGIONS_CALCULATE_NEARBY_REGION_DISTRIBUTION = TextKey.of(
"iris.modded.help.entry.command.regions",
"Calculate nearby region distribution"
);
public static final TextKey COMMAND_OPEN_OPEN_A_TEMPORARY_STUDIO_DIMENSION_FOR_A_PACK = TextKey.of(
"iris.modded.help.entry.command.open",
"Open a temporary studio dimension for a pack"
);
public static final TextKey COMMAND_CLOSE_CLOSE_THE_OPEN_STUDIO_DIMENSION_AND_DISCARD_ITS_WORLD = TextKey.of(
"iris.modded.help.entry.command.close",
"Close the open studio dimension and discard its world"
);
public static final TextKey COMMAND_TPSTUDIO_TELEPORT_INTO_THE_OPEN_STUDIO_DIMENSION = TextKey.of(
"iris.modded.help.entry.command.tpstudio",
"Teleport into the open studio dimension"
);
public static final TextKey COMMAND_STATUS_SHOW_THE_OPEN_STUDIO_DIMENSION_AND_ITS_PACK = TextKey.of(
"iris.modded.help.entry.command.status_studio",
"Show the open studio dimension and its pack"
);
public static final TextKey COMMAND_NOISE_OPEN_THE_NOISE_EXPLORER_GUI_ON_THE_SERVER_DISPLAY = TextKey.of(
"iris.modded.help.entry.command.noise",
"Open the Noise Explorer GUI on the server display"
);
public static final TextKey COMMAND_MAP_OPEN_THE_VISION_MAP_GUI_ON_THE_SERVER_DISPLAY = TextKey.of(
"iris.modded.help.entry.command.map",
"Open the Vision map GUI on the server display"
);
public static final TextKey COMMAND_VSCODE_REGENERATE_THE_CODE_WORKSPACE_FOR_A_PACK_AND_OPEN_IT_IN_YOUR = TextKey.of(
"iris.modded.help.entry.command.vscode",
"Regenerate the .code-workspace for a pack and open it in your desktop editor"
);
public static final TextKey COMMAND_UPDATE_REGENERATE_THE_CODE_WORKSPACE_FOR_A_PACK = TextKey.of(
"iris.modded.help.entry.command.update",
"Regenerate the .code-workspace for a pack"
);
public static final TextKey COMMAND_IMPORTVANILLA_EXPLAIN_VANILLA_IMPORT_WORKFLOW = TextKey.of(
"iris.modded.help.entry.command.importvanilla",
"Explain vanilla import workflow"
);
public static final TextKey COMMAND_VALIDATE_VALIDATE_A_PACK_OR_EVERY_PACK = TextKey.of(
"iris.modded.help.entry.command.validate",
"Validate a pack or every pack"
);
public static final TextKey COMMAND_CLEANUP_PREVIEW_OR_QUARANTINE_UNUSED_RESOURCE_CANDIDATES = TextKey.of(
"iris.modded.help.entry.command.cleanup",
"Preview or quarantine unused-resource candidates"
);
public static final TextKey COMMAND_RESTORE_PREVIEW_OR_RESTORE_THE_LATEST_QUARANTINE = TextKey.of(
"iris.modded.help.entry.command.restore",
"Preview or restore the latest quarantine"
);
public static final TextKey COMMAND_STATUS_SHOW_CACHED_VALIDATION_STATUS = TextKey.of(
"iris.modded.help.entry.command.status_validation",
"Show cached validation status"
);
public static final TextKey COMMAND_ENABLE_CREATE_AND_INJECT_A_PERSISTENT_IRIS_DIMENSION_AT_RUNTIME_DOWNLOADS_THE_PACK = TextKey.of(
"iris.modded.help.entry.command.enable",
"Create and inject a persistent Iris dimension at runtime; downloads the pack if missing, quote pack:dimensionKey to pick a specific pack dimension"
);
public static final TextKey COMMAND_REPLACE_OVERWORLD_INJECT_AN_IRIS_PRIMARY_WORLD_AND_ROUTE_PLAYERS_THERE_INSTEAD_OF_THE = TextKey.of(
"iris.modded.help.entry.command.replace_overworld",
"Inject an Iris primary world and route players there instead of the vanilla overworld"
);
public static final TextKey COMMAND_DISABLE_EVACUATE_AND_UNLOAD_AN_IRIS_DIMENSION_WORLD_DATA_ON_DISK_IS_KEPT = TextKey.of(
"iris.modded.help.entry.command.disable",
"Evacuate and unload an Iris dimension; world data on disk is kept for re-enabling"
);
public static final TextKey COMMAND_DELETE_DISABLE_AN_IRIS_DIMENSION_AND_WIPE_ITS_CHUNK_AND_MANTLE_DATA_FROM = TextKey.of(
"iris.modded.help.entry.command.delete",
"Disable an Iris dimension and wipe its chunk and mantle data from disk"
);
public static final TextKey COMMAND_LIST_LIST_LOADED_IRIS_DIMENSIONS = TextKey.of(
"iris.modded.help.entry.command.list",
"List loaded Iris dimensions"
);
public static final TextKey COMMAND_STATUS_SHOW_LOADED_IRIS_DIMENSIONS_AND_THE_CONFIGURED_PRIMARY_WORLD = TextKey.of(
"iris.modded.help.entry.command.status_world",
"Show loaded Iris dimensions and the configured primary world"
);
public static final TextKey COMMAND_STATUS_CHECK_LOADED_IRIS_DIMENSION_TYPE_OVERRIDES = TextKey.of(
"iris.modded.help.entry.command.status_datapack",
"Check loaded Iris dimension type overrides"
);
public static final TextKey COMMAND_INSTALL_INSTALL_DIMENSION_TYPE_OVERRIDES_FOR_LOADED_IRIS_DIMENSIONS = TextKey.of(
"iris.modded.help.entry.command.install",
"Install dimension type overrides for loaded Iris dimensions"
);
public static final TextKey COMMAND_LIST_LIST_CONFIGURED_AND_INSTALLED_DATAPACKS = TextKey.of(
"iris.modded.help.entry.command.list_datapacks",
"List configured and installed datapacks"
);
public static final TextKey COMMAND_INGEST_EXPLAIN_BUKKIT_DATAPACK_INGEST_WORKFLOW = TextKey.of(
"iris.modded.help.entry.command.ingest",
"Explain Bukkit datapack ingest workflow"
);
public static final TextKey COMMAND_REMOVE_EXPLAIN_DATAPACK_REMOVAL_WORKFLOW = TextKey.of(
"iris.modded.help.entry.command.remove",
"Explain datapack removal workflow"
);
public static final TextKey COMMAND_LIST_REGENERATE_STRUCTURE_INDEX_JSON = TextKey.of(
"iris.modded.help.entry.command.list_structures",
"Regenerate structure-index.json"
);
public static final TextKey COMMAND_INFO_RESOLVE_AN_IRIS_STRUCTURE_GRAPH_AND_REPORT_BOUNDS = TextKey.of(
"iris.modded.help.entry.command.info_2",
"Resolve an Iris structure graph and report bounds"
);
public static final TextKey COMMAND_PLACE_ASSEMBLE_AND_PLACE_AN_IRIS_STRUCTURE_AT_YOUR_LOCATION = TextKey.of(
"iris.modded.help.entry.command.place",
"Assemble and place an Iris structure at your location"
);
public static final TextKey COMMAND_IMPORT_EXPLAIN_BUKKIT_STRUCTURE_IMPORT_WORKFLOW = TextKey.of(
"iris.modded.help.entry.command.import",
"Explain Bukkit structure import workflow"
);
public static final TextKey COMMAND_CAPTURE_EXPLAIN_BUKKIT_STRUCTURE_CAPTURE_WORKFLOW = TextKey.of(
"iris.modded.help.entry.command.capture",
"Explain Bukkit structure capture workflow"
);
public static final TextKey COMMAND_VERIFY_REPORT_NATIVE_AND_IRIS_STRUCTURE_REACHABILITY_IN_THE_CURRENT_DIMENSION = TextKey.of(
"iris.modded.help.entry.command.verify",
"Report native and Iris structure reachability in the current dimension"
);
public static final TextKey COMMAND_SENTRY_SEND_A_TEST_EXCEPTION_TO_THE_IRIS_ERROR_REPORTER = TextKey.of(
"iris.modded.help.entry.command.sentry",
"Send a test exception to the Iris error reporter"
);
public static final TextKey COMMAND_NETWORK_LIST_NETWORK_INTERFACES_AND_THEIR_ADDRESSES = TextKey.of(
"iris.modded.help.entry.command.network",
"List network interfaces and their addresses"
);
private static final List<MessageKey> KEYS = List.of(
COMMAND_VERSION_PRINT_VERSION_INFORMATION,
COMMAND_INFO_LIST_LOADED_IRIS_DIMENSIONS_AND_PACK_DETAILS,
COMMAND_WHAT_INSPECT_THE_IRIS_BIOME_REGION_CAVE_BIOME_SURFACE_AND_CHUNK_AT_YOUR,
GROUP_FIND_FIND_AND_TELEPORT_TO_IRIS_BIOMES_REGIONS_OBJECTS_IRIS_STRUCTURES_NATIVE_STRUCTURES,
COMMAND_TP_TELEPORT_YOURSELF_OR_A_NAMED_PLAYER_INTO_A_LOADED_IRIS_DIMENSION,
COMMAND_EVACUATE_TELEPORT_EVERY_PLAYER_OUT_OF_AN_IRIS_DIMENSION_TO_THE_PRIMARY_WORLD,
COMMAND_SEED_PRINT_WORLD_AND_ENGINE_SEED_INFORMATION,
COMMAND_DEBUG_TOGGLE_IRIS_DEBUG_LOGGING_AND_SAVE_SETTINGS_JSON,
COMMAND_RELOAD_RELOAD_SETTINGS_JSON_ALSO_HOTLOADED_AUTOMATICALLY_EVERY_3S,
COMMAND_DOWNLOAD_DOWNLOAD_A_PACK_PROJECT,
COMMAND_METRICS_PRINT_GENERATION_METRICS_FOR_YOUR_CURRENT_IRIS_DIMENSION,
COMMAND_REGEN_DELETE_AND_REGENERATE_NEARBY_CHUNKS_IN_PLACE,
GROUP_PREGEN_PREGENERATE_AN_IRIS_DIMENSION,
COMMAND_WAND_GET_AN_IRIS_OBJECT_WAND,
GROUP_OBJECT_OBJECT_WAND_SAVE_PASTE_ANALYZE_AND_UNDO_TOOLS,
GROUP_EDIT_OPEN_PACK_BIOME_REGION_AND_DIMENSION_JSON_FILES_IN_YOUR_DESKTOP_EDITOR,
COMMAND_CREATE_CREATE_AND_INJECT_A_PERSISTENT_IRIS_DIMENSION_QUOTE_PACK_DIMENSIONKEY_TO_PICK,
GROUP_STUDIO_PACK_PROJECT_CREATION_PACKAGING_AND_REPORTS,
GROUP_PACK_PACK_VALIDATION_AND_MAINTENANCE,
GROUP_WORLD_RUNTIME_IRIS_DIMENSION_CREATION_REMOVAL_AND_STATUS,
GROUP_DATAPACK_WORLD_DATAPACK_INSTALL_AND_STATUS_HELPERS,
GROUP_STRUCTURE_IRIS_STRUCTURE_INDEX_INFO_AND_PLACEMENT_TOOLS,
COMMAND_GOLDENHASH_GENERATE_DETERMINISTIC_BLOCK_HASHES_FOR_PARITY_TESTING,
GROUP_DEVELOPER_DEVELOPER_DIAGNOSTICS_SENTRY_TEST_NETWORK_INTERFACES_REGION_FILE_SCAN,
COMMAND_BIOME_FIND_AN_IRIS_BIOME,
COMMAND_REGION_FIND_AN_IRIS_REGION,
COMMAND_OBJECT_FIND_AN_OBJECT_PLACEMENT,
COMMAND_STRUCTURE_FIND_AN_IRIS_PLACED_OR_NATIVE_DATAPACK_STRUCTURE,
COMMAND_POI_FIND_A_SUPPORTED_POINT_OF_INTEREST,
COMMAND_BIOME_OPEN_A_BIOME_JSON_IN_YOUR_DESKTOP_EDITOR_NO_KEY_OPENS_THE,
COMMAND_REGION_OPEN_A_REGION_JSON_IN_YOUR_DESKTOP_EDITOR_NO_KEY_OPENS_THE,
COMMAND_DIMENSION_OPEN_THE_CURRENT_PACK_S_DIMENSION_JSON_IN_YOUR_DESKTOP_EDITOR,
COMMAND_START_START_PREGENERATION_RADIUS_IN_BLOCKS_RESUMABLE_CHECKPOINT_CACHE_ON_BY_DEFAULT_CENTER,
COMMAND_STOP_STOP_THE_ACTIVE_PREGENERATION_TASK,
COMMAND_PAUSE_PAUSE_OR_RESUME_PREGENERATION,
COMMAND_STATUS_SHOW_PREGENERATION_STATUS,
COMMAND_WAND_GET_AN_IRIS_OBJECT_WAND_2,
COMMAND_DUST_GET_DUST_THAT_REVEALS_OBJECT_PLACEMENTS,
COMMAND_SAVE_SAVE_THE_SELECTED_WAND_VOLUME_AS_AN_OBJECT,
COMMAND_PASTE_PASTE_AN_OBJECT_AT_YOUR_POSITION_OR_A_GIVEN_POSITION_OPTIONALLY_ROTATED,
COMMAND_EXPAND_EXPAND_THE_WAND_SELECTION_IN_YOUR_LOOKING_DIRECTION,
COMMAND_CONTRACT_CONTRACT_THE_WAND_SELECTION_IN_YOUR_LOOKING_DIRECTION,
COMMAND_SHIFT_SHIFT_THE_WAND_SELECTION_IN_YOUR_LOOKING_DIRECTION,
COMMAND_POSITION1_SET_SELECTION_POINT_1,
COMMAND_POSITION2_SET_SELECTION_POINT_2,
COMMAND_X_Y_AUTOSELECT_UP_AND_OUT,
COMMAND_X_Y_AUTOSELECT_UP_DOWN_AND_OUT,
COMMAND_ANALYZE_SHOW_OBJECT_COMPOSITION,
COMMAND_SHRINK_SHRINK_AN_OBJECT_TO_ITS_MINIMUM_SIZE,
COMMAND_PLAUSIBILIZE_GROW_BRANCHES_SO_TREE_LEAVES_SURVIVE_VANILLA_DECAY,
COMMAND_UNDO_UNDO_PASTED_OBJECTS,
COMMAND_CREATE_CREATE_A_NEW_PACK_PROJECT,
COMMAND_PACKAGE_PACKAGE_A_DIMENSION_INTO_A_COMPRESSED_FORMAT,
COMMAND_VERSION_PRINT_A_PACK_VERSION,
COMMAND_REGIONS_CALCULATE_NEARBY_REGION_DISTRIBUTION,
COMMAND_OPEN_OPEN_A_TEMPORARY_STUDIO_DIMENSION_FOR_A_PACK,
COMMAND_CLOSE_CLOSE_THE_OPEN_STUDIO_DIMENSION_AND_DISCARD_ITS_WORLD,
COMMAND_TPSTUDIO_TELEPORT_INTO_THE_OPEN_STUDIO_DIMENSION,
COMMAND_STATUS_SHOW_THE_OPEN_STUDIO_DIMENSION_AND_ITS_PACK,
COMMAND_NOISE_OPEN_THE_NOISE_EXPLORER_GUI_ON_THE_SERVER_DISPLAY,
COMMAND_MAP_OPEN_THE_VISION_MAP_GUI_ON_THE_SERVER_DISPLAY,
COMMAND_VSCODE_REGENERATE_THE_CODE_WORKSPACE_FOR_A_PACK_AND_OPEN_IT_IN_YOUR,
COMMAND_UPDATE_REGENERATE_THE_CODE_WORKSPACE_FOR_A_PACK,
COMMAND_IMPORTVANILLA_EXPLAIN_VANILLA_IMPORT_WORKFLOW,
COMMAND_VALIDATE_VALIDATE_A_PACK_OR_EVERY_PACK,
COMMAND_CLEANUP_PREVIEW_OR_QUARANTINE_UNUSED_RESOURCE_CANDIDATES,
COMMAND_RESTORE_PREVIEW_OR_RESTORE_THE_LATEST_QUARANTINE,
COMMAND_STATUS_SHOW_CACHED_VALIDATION_STATUS,
COMMAND_ENABLE_CREATE_AND_INJECT_A_PERSISTENT_IRIS_DIMENSION_AT_RUNTIME_DOWNLOADS_THE_PACK,
COMMAND_REPLACE_OVERWORLD_INJECT_AN_IRIS_PRIMARY_WORLD_AND_ROUTE_PLAYERS_THERE_INSTEAD_OF_THE,
COMMAND_DISABLE_EVACUATE_AND_UNLOAD_AN_IRIS_DIMENSION_WORLD_DATA_ON_DISK_IS_KEPT,
COMMAND_DELETE_DISABLE_AN_IRIS_DIMENSION_AND_WIPE_ITS_CHUNK_AND_MANTLE_DATA_FROM,
COMMAND_LIST_LIST_LOADED_IRIS_DIMENSIONS,
COMMAND_STATUS_SHOW_LOADED_IRIS_DIMENSIONS_AND_THE_CONFIGURED_PRIMARY_WORLD,
COMMAND_STATUS_CHECK_LOADED_IRIS_DIMENSION_TYPE_OVERRIDES,
COMMAND_INSTALL_INSTALL_DIMENSION_TYPE_OVERRIDES_FOR_LOADED_IRIS_DIMENSIONS,
COMMAND_LIST_LIST_CONFIGURED_AND_INSTALLED_DATAPACKS,
COMMAND_INGEST_EXPLAIN_BUKKIT_DATAPACK_INGEST_WORKFLOW,
COMMAND_REMOVE_EXPLAIN_DATAPACK_REMOVAL_WORKFLOW,
COMMAND_LIST_REGENERATE_STRUCTURE_INDEX_JSON,
COMMAND_INFO_RESOLVE_AN_IRIS_STRUCTURE_GRAPH_AND_REPORT_BOUNDS,
COMMAND_PLACE_ASSEMBLE_AND_PLACE_AN_IRIS_STRUCTURE_AT_YOUR_LOCATION,
COMMAND_IMPORT_EXPLAIN_BUKKIT_STRUCTURE_IMPORT_WORKFLOW,
COMMAND_CAPTURE_EXPLAIN_BUKKIT_STRUCTURE_CAPTURE_WORKFLOW,
COMMAND_VERIFY_REPORT_NATIVE_AND_IRIS_STRUCTURE_REACHABILITY_IN_THE_CURRENT_DIMENSION,
COMMAND_SENTRY_SEND_A_TEST_EXCEPTION_TO_THE_IRIS_ERROR_REPORTER,
COMMAND_NETWORK_LIST_NETWORK_INTERFACES_AND_THEIR_ADDRESSES
);
private ModdedHelpMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -0,0 +1,151 @@
package art.arcane.iris.core.localization;
import art.arcane.volmlib.util.localization.LinesKey;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.PluralKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
import java.util.Map;
public final class PackDownloadMessages {
public static final TextKey INVALID_PACK_NAME = TextKey.of(
"iris.runtime.pack_download.invalid_pack_name",
"Invalid pack name '{pack}' (allowed: a-z, 0-9, _ and -)"
);
public static final TextKey INVALID_BRANCH_NAME = TextKey.of(
"iris.runtime.pack_download.invalid_branch_name",
"Invalid branch name '{branch}' (allowed: letters, digits, . _ and -)"
);
public static final TextKey DOWNLOAD_FAILED = TextKey.of(
"iris.runtime.pack_download.failed",
"Pack download failed: {type}{errorMessage}"
);
public static final TextKey DOWNLOADING = TextKey.of(
"iris.runtime.pack_download.downloading",
"Downloading {url}"
);
public static final TextKey FAILED_TO_FIND = TextKey.of(
"iris.runtime.pack_download.failed_to_find",
"Failed to find pack at {url}"
);
public static final TextKey CHECK_REPOSITORY_AND_BRANCH = TextKey.of(
"iris.runtime.pack_download.check_repository_and_branch",
"Make sure you specified the correct repo and branch!"
);
public static final TextKey EXAMPLE_COMMAND = TextKey.of(
"iris.runtime.pack_download.example_command",
"For example: /iris download overworld branch=stable"
);
public static final TextKey UNPACKING = TextKey.of(
"iris.runtime.pack_download.unpacking",
"Unpacking {repository}"
);
public static final LinesKey UNPACK_FAILED = LinesKey.of(
"iris.runtime.pack_download.unpack_failed",
"Issue when unpacking. Please check/do the following:",
"1. Do you have a functioning internet connection?",
"2. Did the download corrupt?",
"3. Try deleting the */plugins/iris/packs folder and re-download.",
"4. Download the pack from the GitHub repo: https://github.com/IrisDimensions/overworld",
"5. Contact support (if all other options do not help)"
);
public static final TextKey NO_EXTRACTED_FILES = TextKey.of(
"iris.runtime.pack_download.no_extracted_files",
"No files were extracted from the zip file."
);
public static final TextKey HOME_DIRECTORY_ERROR = TextKey.of(
"iris.runtime.pack_download.home_directory_error",
"Error when finding home directory. Are there any non-text characters in the file name?"
);
public static final TextKey INVALID_ARCHIVE_FORMAT = TextKey.of(
"iris.runtime.pack_download.invalid_archive_format",
"Invalid format. Missing root folder or too many folders!"
);
public static final TextKey NO_DIMENSION_FILE = TextKey.of(
"iris.runtime.pack_download.no_dimension_file",
"No dimension file found in the extracted zip file."
);
public static final TextKey CHECK_GITHUB = TextKey.of(
"iris.runtime.pack_download.check_github",
"Check that it is present on GitHub and report this to staff!"
);
public static final TextKey ONE_DIMENSION_REQUIRED = TextKey.of(
"iris.runtime.pack_download.one_dimension_required",
"The dimensions folder must contain exactly one file."
);
public static final TextKey INVALID_DIMENSION = TextKey.of(
"iris.runtime.pack_download.invalid_dimension",
"Invalid dimension folder under dimensions/."
);
public static final TextKey IMPORTING = TextKey.of(
"iris.runtime.pack_download.importing",
"Importing {name} ({key})"
);
public static final TextKey DIMENSION_KEY_CONFLICT = TextKey.of(
"iris.runtime.pack_download.dimension_key_conflict",
"Another dimension in the packs folder is already using the key {key}. Import failed!"
);
public static final TextKey PACK_KEY_CONFLICT = TextKey.of(
"iris.runtime.pack_download.pack_key_conflict",
"Another pack is using the key {key}. Import failed!"
);
public static final TextKey ACQUIRED = TextKey.of(
"iris.runtime.pack_download.acquired",
"Successfully acquired {name}."
);
public static final TextKey VALIDATION_FAILED = TextKey.of(
"iris.runtime.pack_download.validation_failed",
"Pack '{pack}' failed validation; world and Studio creation will be refused. Reasons:"
);
public static final TextKey VALIDATION_REASON = TextKey.of(
"iris.runtime.pack_download.validation_reason",
" - {reason}"
);
public static final PluralKey VALIDATED_WITH_WARNINGS = PluralKey.of(
"iris.runtime.pack_download.validated_with_warnings",
"count",
Map.of(
"one", "Pack '{pack}' validated with {count} warning.",
"other", "Pack '{pack}' validated with {count} warnings."
)
);
public static final TextKey VALIDATED = TextKey.of(
"iris.runtime.pack_download.validated",
"Pack '{pack}' validated."
);
private static final List<MessageKey> KEYS = List.of(
INVALID_PACK_NAME,
INVALID_BRANCH_NAME,
DOWNLOAD_FAILED,
DOWNLOADING,
FAILED_TO_FIND,
CHECK_REPOSITORY_AND_BRANCH,
EXAMPLE_COMMAND,
UNPACKING,
UNPACK_FAILED,
NO_EXTRACTED_FILES,
HOME_DIRECTORY_ERROR,
INVALID_ARCHIVE_FORMAT,
NO_DIMENSION_FILE,
CHECK_GITHUB,
ONE_DIMENSION_REQUIRED,
INVALID_DIMENSION,
IMPORTING,
DIMENSION_KEY_CONFLICT,
PACK_KEY_CONFLICT,
ACQUIRED,
VALIDATION_FAILED,
VALIDATION_REASON,
VALIDATED_WITH_WARNINGS,
VALIDATED
);
private PackDownloadMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -0,0 +1,169 @@
package art.arcane.iris.core.localization;
import art.arcane.iris.util.common.format.C;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.PluralKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
import java.util.Map;
public final class RuntimeProgressMessages {
public static final TextKey STUDIO_OPENING = TextKey.of("iris.runtime.studio.opening", C.GOLD + "Studio " + C.AQUA + "OPENING");
public static final TextKey STUDIO_OPENING_PROGRESS = TextKey.of("iris.runtime.studio.opening_progress", C.GOLD + "Studio " + C.AQUA + "OPENING" + C.GRAY + " {percent}%");
public static final TextKey STUDIO_FAILED_PROGRESS = TextKey.of("iris.runtime.studio.failed_progress", C.GOLD + "Studio " + C.RED + "FAILED" + C.GRAY + " {percent}%");
public static final TextKey STUDIO_READY_PROGRESS = TextKey.of("iris.runtime.studio.ready_progress", C.GOLD + "Studio " + C.GREEN + "READY" + C.GRAY + " 100%");
public static final TextKey STUDIO_ACTION_FAILED = TextKey.of("iris.runtime.studio.action.failed", "{bar}" + C.GRAY + " " + C.RED + "FAILED" + C.GRAY + " | " + C.WHITE + "{stage}");
public static final TextKey STUDIO_ACTION_READY = TextKey.of("iris.runtime.studio.action.ready", "{bar}" + C.GRAY + " " + C.GREEN + "100%" + C.GRAY + " | " + C.GREEN + "Studio ready" + C.DARK_GRAY + " {elapsed}");
public static final TextKey STUDIO_ACTION_PROGRESS = TextKey.of("iris.runtime.studio.action.progress", "{bar}" + C.GRAY + " " + C.YELLOW + "{percent}%" + C.GRAY + " | " + C.WHITE + "{stage}" + C.DARK_GRAY + " {elapsed}");
public static final TextKey STUDIO_CONSOLE_PROGRESS = TextKey.of("iris.runtime.studio.console.progress", C.GOLD + "Studio " + C.AQUA + "{bar}" + C.YELLOW + " {percent}%" + C.GRAY + " {stage}" + C.DARK_GRAY + " ({elapsed})");
public static final TextKey STUDIO_STAGE_INITIALIZING = TextKey.of("iris.runtime.studio.stage.initializing", "Initializing");
public static final TextKey STUDIO_STAGE_QUEUED = TextKey.of("iris.runtime.studio.stage.queued", "Queued");
public static final TextKey STUDIO_STAGE_RESOLVE_DIMENSION = TextKey.of("iris.runtime.studio.stage.resolve_dimension", "Resolving dimension");
public static final TextKey STUDIO_STAGE_PREPARE_WORLD_PACK = TextKey.of("iris.runtime.studio.stage.prepare_world_pack", "Preparing world pack");
public static final TextKey STUDIO_STAGE_INSTALL_DATAPACKS = TextKey.of("iris.runtime.studio.stage.install_datapacks", "Installing datapacks");
public static final TextKey STUDIO_STAGE_CREATE_WORLD = TextKey.of("iris.runtime.studio.stage.create_world", "Creating world");
public static final TextKey STUDIO_STAGE_APPLY_WORLD_RULES = TextKey.of("iris.runtime.studio.stage.apply_world_rules", "Applying world rules");
public static final TextKey STUDIO_STAGE_PREPARE_GENERATOR = TextKey.of("iris.runtime.studio.stage.prepare_generator", "Preparing generator");
public static final TextKey STUDIO_STAGE_REQUEST_ENTRY_CHUNK = TextKey.of("iris.runtime.studio.stage.request_entry_chunk", "Loading entry chunk");
public static final TextKey STUDIO_STAGE_RESOLVE_SAFE_ENTRY = TextKey.of("iris.runtime.studio.stage.resolve_safe_entry", "Finding safe spawn");
public static final TextKey STUDIO_STAGE_TELEPORT_PLAYER = TextKey.of("iris.runtime.studio.stage.teleport_player", "Teleporting");
public static final TextKey STUDIO_STAGE_FINALIZE_OPEN = TextKey.of("iris.runtime.studio.stage.finalize_open", "Finalizing");
public static final TextKey STUDIO_STAGE_CLEANUP = TextKey.of("iris.runtime.studio.stage.cleanup", "Cleaning up");
public static final TextKey WORLD_CREATE_TELEPORT_FAILED = TextKey.of("iris.runtime.world_create.teleport_failed", C.YELLOW + "The world was created, but automatic teleport failed. Try /iris teleport world={world}");
public static final TextKey WORLD_CREATE_ACTION = TextKey.of("iris.runtime.world_create.action", "{bar}" + C.GRAY + " " + C.YELLOW + "{percent}%" + C.DARK_GRAY + " {generated}/{required} chunks");
public static final TextKey WORLD_CREATE_CONSOLE = TextKey.of("iris.runtime.world_create.console", C.GOLD + "Generating " + C.YELLOW + "{percent}%" + C.GRAY + " {generated}/{required} chunks" + C.DARK_GRAY + " ({remaining} left)");
public static final TextKey WORLD_PREGEN_ACTION = TextKey.of("iris.runtime.world_create.pregen.action", "{bar}" + C.GRAY + " " + C.YELLOW + "{percent}%" + C.GRAY + " | " + C.WHITE + "Pregenerating");
public static final TextKey WORLD_PREGEN_CONSOLE = TextKey.of("iris.runtime.world_create.pregen.console", C.GOLD + "Pregenerating " + C.YELLOW + "{percent}%");
public static final TextKey CHUNK_TITLE_REGEN = TextKey.of("iris.runtime.chunk_job.title.regen", "Regen");
public static final TextKey CHUNK_TITLE_DELETE = TextKey.of("iris.runtime.chunk_job.title.delete", "Delete");
public static final TextKey CHUNK_TITLE_GOLDEN_HASH = TextKey.of("iris.runtime.chunk_job.title.golden_hash", "GoldenHash");
public static final TextKey CHUNK_STAGE_PREPARING = TextKey.of("iris.runtime.chunk_job.stage.preparing", "Preparing");
public static final TextKey CHUNK_STAGE_CLEARING = TextKey.of("iris.runtime.chunk_job.stage.clearing", "Clearing");
public static final TextKey CHUNK_STAGE_RESETTING_MANTLE = TextKey.of("iris.runtime.chunk_job.stage.resetting_mantle", "Resetting mantle");
public static final TextKey CHUNK_STAGE_REGENERATING = TextKey.of("iris.runtime.chunk_job.stage.regenerating", "Regenerating");
public static final TextKey CHUNK_STAGE_GENERATING = TextKey.of("iris.runtime.chunk_job.stage.generating", "Generating");
public static final TextKey CHUNK_STAGE_COMPARING = TextKey.of("iris.runtime.chunk_job.stage.comparing", "Comparing");
public static final TextKey CHUNK_STAGE_DIAGNOSING = TextKey.of("iris.runtime.chunk_job.stage.diagnosing", "Diagnosing");
public static final TextKey CHUNK_BOSSBAR_WORKING = TextKey.of("iris.runtime.chunk_job.bossbar.working", C.GOLD + "{title} " + C.AQUA + "WORKING");
public static final TextKey CHUNK_BOSSBAR_PROGRESS = TextKey.of("iris.runtime.chunk_job.bossbar.progress", C.GOLD + "{title} " + C.AQUA + "{stage}" + C.GRAY + " " + C.YELLOW + "{percent}%");
public static final TextKey CHUNK_ACTION_PROGRESS = TextKey.of("iris.runtime.chunk_job.action.progress", "{bar}" + C.GRAY + " " + C.YELLOW + "{percent}%" + C.GRAY + " | " + C.WHITE + "{stage} {applied}/{total}");
public static final TextKey CHUNK_SUMMARY = TextKey.of("iris.runtime.chunk_job.summary", "{applied}/{total} chunks in {elapsed}");
public static final TextKey CHUNK_SUMMARY_FAILED = TextKey.of("iris.runtime.chunk_job.summary.failed", "{applied}/{total} chunks in {elapsed} ({failures} failed)");
public static final TextKey CHUNK_BOSSBAR_DONE = TextKey.of("iris.runtime.chunk_job.bossbar.done", C.GOLD + "{title} " + C.GREEN + "DONE" + C.GRAY + " " + C.YELLOW + "{summary}");
public static final TextKey CHUNK_BOSSBAR_FAILED = TextKey.of("iris.runtime.chunk_job.bossbar.failed", C.GOLD + "{title} " + C.RED + "FAILED" + C.GRAY + " " + C.YELLOW + "{summary}");
public static final TextKey CHUNK_ACTION_DONE = TextKey.of("iris.runtime.chunk_job.action.done", "{bar}" + C.GRAY + " " + C.GREEN + "Done" + C.GRAY + " | " + C.WHITE + "{summary}");
public static final TextKey CHUNK_ACTION_FAILED = TextKey.of("iris.runtime.chunk_job.action.failed", "{bar}" + C.GRAY + " " + C.RED + "Failed" + C.GRAY + " | " + C.WHITE + "{summary}");
public static final TextKey CHUNK_COMPLETE = TextKey.of("iris.runtime.chunk_job.complete", C.GREEN + "{title} complete: {summary}");
public static final TextKey CHUNK_FAILED = TextKey.of("iris.runtime.chunk_job.failed", C.RED + "{title} finished with errors: {summary}");
public static final TextKey GOLDEN_NO_CAPTURE = TextKey.of("iris.runtime.golden.no_capture", "No golden capture at {path}; run a capture first.");
public static final PluralKey GOLDEN_ABORTED = PluralKey.of(
"iris.runtime.golden.aborted",
"failed",
Map.of(
"one", "GoldenHash aborted: {failed} chunk failed to generate. No golden file written.",
"other", "GoldenHash aborted: {failed} chunks failed to generate. No golden file written."
)
);
public static final TextKey GOLDEN_FAILED = TextKey.of("iris.runtime.golden.failed", "GoldenHash failed: {error}");
public static final TextKey GOLDEN_MANTLE_RESET = TextKey.of("iris.runtime.golden.mantle_reset", "Mantle reset ({path})");
public static final TextKey GOLDEN_MANTLE_RESET_FAILED = TextKey.of("iris.runtime.golden.mantle_reset_failed", "Mantle reset failed ({type}); continuing with existing mantle state.");
public static final TextKey GOLDEN_CAPTURED = TextKey.of("iris.runtime.golden.captured", "Golden captured: {chunks} chunks combined={hash}");
public static final TextKey GOLDEN_WRONG_WORLD = TextKey.of("iris.runtime.golden.wrong_world", "Golden file is for dim={goldenDimension} seed={goldenSeed} but this world is dim={dimension} seed={seed}. Aborting.");
public static final TextKey GOLDEN_VERSION_WARNING = TextKey.of("iris.runtime.golden.version_warning", "Golden was captured on mc={goldenVersion}, running mc={version}. Diffs may be version-induced.");
public static final TextKey GOLDEN_MATCH = TextKey.of("iris.runtime.golden.match", "GOLDEN MATCH: {current}/{golden} chunks, combined={hash}");
public static final TextKey GOLDEN_MISMATCH = TextKey.of("iris.runtime.golden.mismatch", "GOLDEN MISMATCH: {mismatches}/{chunks} chunks differ.");
public static final TextKey GOLDEN_MISMATCH_CHUNK = TextKey.of("iris.runtime.golden.mismatch_chunk", " chunk {chunk}");
public static final TextKey GOLDEN_MISSING_IN_GOLDEN = TextKey.of("iris.runtime.golden.missing_in_golden", "{chunk} (missing in golden)");
public static final TextKey GOLDEN_MISMATCH_MORE = TextKey.of("iris.runtime.golden.mismatch_more", " ... and {count} more");
public static final TextKey GOLDEN_CURRENT_WRITTEN = TextKey.of("iris.runtime.golden.current_written", "Current hashes written to {file}");
public static final TextKey GOLDEN_DIAG_STABLE = TextKey.of("iris.runtime.golden.diag.stable", "Repeat-gen STABLE, mantle-reset {mantleStatus} -> {file}");
public static final TextKey GOLDEN_DIAG_UNSTABLE = TextKey.of("iris.runtime.golden.diag.unstable", "Repeat-gen UNSTABLE ({diffs}+ block diffs), mantle-reset {mantleStatus} -> {file}");
public static final TextKey GOLDEN_MANTLE_STABLE = TextKey.of("iris.runtime.golden.diag.mantle_stable", "STABLE (mantle rebuild reproduces scan output)");
public static final TextKey GOLDEN_MANTLE_DIVERGED = TextKey.of("iris.runtime.golden.diag.mantle_diverged", "DIVERGED ({diffs}+ diffs - mantle build is state/order dependent)");
public static final TextKey GOLDEN_MANTLE_SKIPPED = TextKey.of("iris.runtime.golden.diag.mantle_skipped", "SKIPPED ({type})");
public static final TextKey GOLDEN_DIAG_FAILED = TextKey.of("iris.runtime.golden.diag.failed", "Diagnosis failed: {error}");
public static final TextKey GOLDEN_STARTED = TextKey.of("iris.runtime.golden.started", "GoldenHash started: {chunks} chunks around 0,0 in buffers (world untouched), threads={threads} mode={mode}");
public static final TextKey GOLDEN_CHUNK_HASHED = TextKey.of("iris.runtime.golden.chunk_hashed", "[{done}/{total}] chunk {x},{z} hashed");
public static final TextKey GOLDEN_CHUNK_FAILED = TextKey.of("iris.runtime.golden.chunk_failed", "Chunk {x},{z} FAILED: {type}");
private static final List<MessageKey> KEYS = List.of(
STUDIO_OPENING,
STUDIO_OPENING_PROGRESS,
STUDIO_FAILED_PROGRESS,
STUDIO_READY_PROGRESS,
STUDIO_ACTION_FAILED,
STUDIO_ACTION_READY,
STUDIO_ACTION_PROGRESS,
STUDIO_CONSOLE_PROGRESS,
STUDIO_STAGE_INITIALIZING,
STUDIO_STAGE_QUEUED,
STUDIO_STAGE_RESOLVE_DIMENSION,
STUDIO_STAGE_PREPARE_WORLD_PACK,
STUDIO_STAGE_INSTALL_DATAPACKS,
STUDIO_STAGE_CREATE_WORLD,
STUDIO_STAGE_APPLY_WORLD_RULES,
STUDIO_STAGE_PREPARE_GENERATOR,
STUDIO_STAGE_REQUEST_ENTRY_CHUNK,
STUDIO_STAGE_RESOLVE_SAFE_ENTRY,
STUDIO_STAGE_TELEPORT_PLAYER,
STUDIO_STAGE_FINALIZE_OPEN,
STUDIO_STAGE_CLEANUP,
WORLD_CREATE_TELEPORT_FAILED,
WORLD_CREATE_ACTION,
WORLD_CREATE_CONSOLE,
WORLD_PREGEN_ACTION,
WORLD_PREGEN_CONSOLE,
CHUNK_TITLE_REGEN,
CHUNK_TITLE_DELETE,
CHUNK_TITLE_GOLDEN_HASH,
CHUNK_STAGE_PREPARING,
CHUNK_STAGE_CLEARING,
CHUNK_STAGE_RESETTING_MANTLE,
CHUNK_STAGE_REGENERATING,
CHUNK_STAGE_GENERATING,
CHUNK_STAGE_COMPARING,
CHUNK_STAGE_DIAGNOSING,
CHUNK_BOSSBAR_WORKING,
CHUNK_BOSSBAR_PROGRESS,
CHUNK_ACTION_PROGRESS,
CHUNK_SUMMARY,
CHUNK_SUMMARY_FAILED,
CHUNK_BOSSBAR_DONE,
CHUNK_BOSSBAR_FAILED,
CHUNK_ACTION_DONE,
CHUNK_ACTION_FAILED,
CHUNK_COMPLETE,
CHUNK_FAILED,
GOLDEN_NO_CAPTURE,
GOLDEN_ABORTED,
GOLDEN_FAILED,
GOLDEN_MANTLE_RESET,
GOLDEN_MANTLE_RESET_FAILED,
GOLDEN_CAPTURED,
GOLDEN_WRONG_WORLD,
GOLDEN_VERSION_WARNING,
GOLDEN_MATCH,
GOLDEN_MISMATCH,
GOLDEN_MISMATCH_CHUNK,
GOLDEN_MISSING_IN_GOLDEN,
GOLDEN_MISMATCH_MORE,
GOLDEN_CURRENT_WRITTEN,
GOLDEN_DIAG_STABLE,
GOLDEN_DIAG_UNSTABLE,
GOLDEN_MANTLE_STABLE,
GOLDEN_MANTLE_DIVERGED,
GOLDEN_MANTLE_SKIPPED,
GOLDEN_DIAG_FAILED,
GOLDEN_STARTED,
GOLDEN_CHUNK_HASHED,
GOLDEN_CHUNK_FAILED
);
private RuntimeProgressMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -0,0 +1,223 @@
package art.arcane.iris.core.localization;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.TextKey;
import java.util.List;
public final class RuntimeUiMessages {
public static final TextKey FINDING_REGIONS = TextKey.of("iris.runtime.progress.finding_regions", "Finding regions");
public static final TextKey CONVERTING = TextKey.of("iris.runtime.progress.converting", "Converting");
public static final TextKey STATUS_RUNNING = TextKey.of("iris.runtime.status.running", "Running");
public static final TextKey STATUS_STOPPED = TextKey.of("iris.runtime.status.stopped", "Stopped");
public static final TextKey STATUS_PAUSED = TextKey.of("iris.runtime.status.paused", "Paused");
public static final TextKey STATUS_PAUSED_LOWER = TextKey.of("iris.runtime.status.paused_lower", "paused");
public static final TextKey STATUS_RUNNING_LOWER = TextKey.of("iris.runtime.status.running_lower", "running");
public static final TextKey STATUS_ENABLED = TextKey.of("iris.runtime.status.enabled", "enabled.");
public static final TextKey STATUS_DISABLED = TextKey.of("iris.runtime.status.disabled", "disabled.");
public static final TextKey STATUS_UNREGISTERED = TextKey.of("iris.runtime.status.unregistered", "unregistered");
public static final TextKey STATUS_NONE = TextKey.of("iris.runtime.status.none", "none");
public static final TextKey STATUS_RANDOM = TextKey.of("iris.runtime.status.random", "random");
public static final TextKey STATUS_MATCH = TextKey.of("iris.runtime.status.match", "MATCH");
public static final TextKey STATUS_MISMATCH = TextKey.of("iris.runtime.status.mismatch", "MISMATCH");
public static final TextKey STATUS_TRUE = TextKey.of("iris.runtime.status.true", "true");
public static final TextKey STATUS_FALSE = TextKey.of("iris.runtime.status.false", "false");
public static final TextKey ERROR_DETAIL_SUFFIX = TextKey.of("iris.runtime.error.detail_suffix", " - {error}");
public static final TextKey DOWNLOAD_OVERWRITE_SUFFIX = TextKey.of("iris.runtime.download.overwrite_suffix", " overwriting");
public static final TextKey DATAPACK_OVERRIDE_SUFFIX = TextKey.of("iris.runtime.datapack.override_suffix", " (world datapack override installed)");
public static final TextKey PRIMARY_PLAYERS_ROUTED_SUFFIX = TextKey.of("iris.runtime.primary_world.players_routed_suffix", " (players routed there)");
public static final TextKey PRIMARY_ROUTING_DISABLED_SUFFIX = TextKey.of("iris.runtime.primary_world.routing_disabled_suffix", " (routing disabled)");
public static final TextKey MODDED_NO_DIMENSION_MATCH = TextKey.of("iris.runtime.modded.no_dimension_match", "No Iris dimension matches '{filter}'.");
public static final TextKey TELEPORTED_TO_WORLD = TextKey.of("iris.runtime.teleport.world", "You have been teleported to {world}.");
public static final TextKey ENGINE_HOTLOADED = TextKey.of("iris.runtime.engine.hotloaded", "Engine Hotloaded");
public static final TextKey JOB_COMPLETED = TextKey.of("iris.runtime.job.completed", "Completed {job} in {duration}");
public static final TextKey JOB_SCANNING_SELECTION = TextKey.of("iris.runtime.job.scanning_selection", "Scanning Selection");
public static final TextKey JOB_LOADING_CHUNKS = TextKey.of("iris.runtime.job.loading_chunks", "Loading Chunks");
public static final TextKey JOB_SEARCHED_CHUNKS = TextKey.of("iris.runtime.job.searched_chunks", "Searched {chunks} Chunks");
public static final TextKey JOB_COMPILE = TextKey.of("iris.runtime.job.compile", "Compile");
public static final TextKey JOB_SAVING_OBJECT = TextKey.of("iris.runtime.job.saving_object", "Saving Object");
public static final TextKey JOB_DOWNLOADING = TextKey.of("iris.runtime.job.downloading", "Downloading");
public static final TextKey JOB_EXTRACTING = TextKey.of("iris.runtime.job.extracting", "Extracting");
public static final TextKey JOB_INSTALLING = TextKey.of("iris.runtime.job.installing", "Installing");
public static final TextKey COMPILE_IOB_EMPTY = TextKey.of("iris.runtime.compile.iob_empty", "- IOB {file} has 0 blocks!");
public static final TextKey COMPILE_IOB_EMPTY_HOVER = TextKey.of("iris.runtime.compile.iob_empty_hover", "Error:\n{path}");
public static final TextKey COMPILE_IOB_NOT_3D = TextKey.of("iris.runtime.compile.iob_not_3d", "- IOB {file} is not 3D!");
public static final TextKey COMPILE_IOB_NOT_3D_HOVER = TextKey.of("iris.runtime.compile.iob_not_3d_hover", "Error:\n{path}\nThe width, height, or depth is zero (bad format)");
public static final TextKey COMPILE_JSON_ERROR = TextKey.of("iris.runtime.compile.json_error", "- JSON Error {file}");
public static final TextKey COMPILE_JSON_ERROR_HOVER = TextKey.of("iris.runtime.compile.json_error_hover", "Error:\n{path}\n{error}");
public static final TextKey COMPILE_LOADER_NOT_FOUND = TextKey.of("iris.runtime.compile.loader_not_found", "Can't find loader for {path}");
public static final TextKey FORCED_DATAPACK_NAME = TextKey.of("iris.runtime.datapack.name", "Iris World Generation");
public static final TextKey PACK_ALREADY_EXISTS = TextKey.of("iris.runtime.pack.already_exists", "Pack already exists!");
public static final TextKey TREE_DRY_SUFFIX = TextKey.of("iris.runtime.tree_plausibilize.dry_suffix", ", DRY");
public static final TextKey TREE_SKIP_LOAD = TextKey.of("iris.runtime.tree_plausibilize.skip_load", "skip {object}: failed to load");
public static final TextKey TREE_RESULT = TextKey.of("iris.runtime.tree_plausibilize.result", "{object}: +{wood} wood ({branches} branches), {converted} leaves->wood, ~{distances} distances");
public static final TextKey TREE_RESULT_PINNED = TextKey.of("iris.runtime.tree_plausibilize.result_pinned", "{object}: +{wood} wood ({branches} branches), {converted} leaves->wood, ~{distances} distances, !{pinned} pinned");
public static final TextKey TREE_PROGRESS = TextKey.of("iris.runtime.tree_plausibilize.progress", "[{current}/{total}]");
public static final TextKey TREE_FAILED = TextKey.of("iris.runtime.tree_plausibilize.failed", "fail {object}: {type}: {error}");
public static final TextKey TREE_DONE = TextKey.of("iris.runtime.tree_plausibilize.done", "Done: {processed} processed, {changed} changed, {skipped} skipped, {failed} failed");
public static final TextKey TREE_DONE_DRY = TextKey.of("iris.runtime.tree_plausibilize.done_dry", "Done: {processed} processed, {changed} changed, {skipped} skipped, {failed} failed (dry run, nothing written)");
public static final TextKey TREE_TOTALS = TextKey.of("iris.runtime.tree_plausibilize.totals", "Totals: +{wood} wood ({branches} branches), {converted} leaves->wood, ~{distances} distances, !{pinned} pinned, unreachable {before} -> {after}");
public static final TextKey WAND_NAME = TextKey.of("iris.runtime.item.wand.name", "Wand of Iris");
public static final TextKey WAND_LORE_FIRST = TextKey.of("iris.runtime.item.wand.lore.first", "Left click a block to set the first corner");
public static final TextKey WAND_LORE_SECOND = TextKey.of("iris.runtime.item.wand.lore.second", "Right click a block to set the second corner");
public static final TextKey DUST_NAME = TextKey.of("iris.runtime.item.dust.name", "Dust of Revealing");
public static final TextKey DUST_LORE = TextKey.of("iris.runtime.item.dust.lore", "Right click a block to reveal its placement structure!");
public static final TextKey WAND_POSITION_SET = TextKey.of("iris.runtime.wand.position_set", "Position {position} set to {x}, {y}, {z}");
public static final TextKey DUST_IRIS_WORLD_REQUIRED = TextKey.of("iris.runtime.dust.iris_world_required", "This dimension is not generated by Iris.");
public static final TextKey DUST_FOUND_OBJECT = TextKey.of("iris.runtime.dust.found_object", "Found object {object}");
public static final TextKey DUST_REVEALED = TextKey.of("iris.runtime.dust.revealed", "Revealed {count} block(s) of {object}");
public static final TextKey DUST_REVEALED_CAPPED = TextKey.of("iris.runtime.dust.revealed_capped", "Revealed {count} block(s) of {object} (capped)");
public static final TextKey DUST_HEADER = TextKey.of("iris.runtime.dust.header", "--- Iris Dust @ {x}, {y}, {z} ---");
public static final TextKey DUST_BLOCK = TextKey.of("iris.runtime.dust.block", "Block: {block}");
public static final TextKey DUST_POSITION_ABOVE = TextKey.of("iris.runtime.dust.position.above", "Position: +{offset} ABOVE surface (surface Y={surfaceY})");
public static final TextKey DUST_POSITION_BELOW = TextKey.of("iris.runtime.dust.position.below", "Position: {offset} below surface (surface Y={surfaceY})");
public static final TextKey DUST_POSITION_AT = TextKey.of("iris.runtime.dust.position.at", "Position: at surface (Y={surfaceY})");
public static final TextKey DUST_OBJECT_AT_BLOCK = TextKey.of("iris.runtime.dust.object_at_block", "Object @block: {object}");
public static final TextKey DUST_NONE = TextKey.of("iris.runtime.dust.none", "none");
public static final TextKey DUST_PLACED_BY_OBJECT_ABOVE = TextKey.of("iris.runtime.dust.placed_by.object_above", "Placed by: object/stilt '{object}' (above surface)");
public static final TextKey DUST_PLACED_BY_DECORATION_ABOVE = TextKey.of("iris.runtime.dust.placed_by.decoration_above", "Placed by: decoration/object/stilt (above surface)");
public static final TextKey DUST_PLACED_BY_BURIED_OBJECT = TextKey.of("iris.runtime.dust.placed_by.buried_object", "Placed by: buried object '{object}'");
public static final TextKey DUST_PLACED_BY_TERRAIN = TextKey.of("iris.runtime.dust.placed_by.terrain", "Placed by: terrain layer (depth {depth} below surface)");
public static final TextKey DUST_COLUMN_OBJECT = TextKey.of("iris.runtime.dust.column_object", "Column object: {object} -> this block is likely that object's stilt");
public static final TextKey DUST_COLUMN_OBJECT_NONE = TextKey.of("iris.runtime.dust.column_object_none", "Column object: {detail}");
public static final TextKey DUST_COLUMN_NONE = TextKey.of("iris.runtime.dust.column_none", "none within 64 (decorator or terrain, NOT an object stilt)");
public static final TextKey DUST_COLUMN_ABOVE = TextKey.of("iris.runtime.dust.column.above", "{object} @Y={y} (above)");
public static final TextKey DUST_COLUMN_BELOW = TextKey.of("iris.runtime.dust.column.below", "{object} @Y={y} (below)");
public static final TextKey DUST_SURFACE_BIOME = TextKey.of("iris.runtime.dust.surface_biome", "Surface biome: {biome}");
public static final TextKey DUST_SURFACE_BIOME_DETAIL = TextKey.of("iris.runtime.dust.surface_biome_detail", "Surface biome: {biome} ({derivative})");
public static final TextKey DUST_BIOME_AT_Y = TextKey.of("iris.runtime.dust.biome_at_y", "Biome @Y: {biome}");
public static final TextKey DUST_CAVE_BIOME = TextKey.of("iris.runtime.dust.cave_biome", "Cave/Mantle biome: {biome}");
public static final TextKey DUST_SERVER_BIOME = TextKey.of("iris.runtime.dust.server_biome", "Server biome: {biome} (ID: {id})");
public static final TextKey DUST_REGION = TextKey.of("iris.runtime.dust.region", "Region: {region} ({name})");
public static final TextKey DUST_OBJECTS_IN_CHUNK = TextKey.of("iris.runtime.dust.objects_in_chunk", "Objects in chunk: {objects}");
public static final TextKey DUST_COPY_BUTTON = TextKey.of("iris.runtime.dust.copy_button", "[Click to copy these stats]");
public static final TextKey DUST_COPY_HOVER = TextKey.of("iris.runtime.dust.copy_hover", "Copy block stats to clipboard");
public static final TextKey PREGEN_STARTING = TextKey.of("iris.runtime.pregen.starting", "Iris Pregen starting...");
public static final TextKey PREGEN_HEADER = TextKey.of("iris.runtime.pregen.header", "Iris Pregen");
public static final TextKey PREGEN_BOSSBAR_PAUSED = TextKey.of("iris.runtime.pregen.bossbar.paused", "Iris Pregen {generated}/{total} {percent}% PAUSED");
public static final TextKey PREGEN_BOSSBAR_RUNNING = TextKey.of("iris.runtime.pregen.bossbar.running", "Iris Pregen {generated}/{total} {percent}% {speed}/s{eta}{failed}");
public static final TextKey PREGEN_ETA_FRAGMENT = TextKey.of("iris.runtime.pregen.eta_fragment", " ETA {eta}");
public static final TextKey PREGEN_FAILED_FRAGMENT = TextKey.of("iris.runtime.pregen.failed_fragment", " failed {failed}");
public static final TextKey PREGEN_STATUS_CONTEXT = TextKey.of("iris.runtime.pregen.status.context", "Dimension {dimension} · Method {method}");
public static final TextKey PREGEN_STATUS_PROGRESS = TextKey.of("iris.runtime.pregen.status.progress", "{percent}%");
public static final TextKey PREGEN_STATUS_CHUNKS = TextKey.of("iris.runtime.pregen.status.chunks", "Chunks {generated}/{total} · Speed {speed}/s");
public static final TextKey PREGEN_STATUS_CHUNKS_FAILED = TextKey.of("iris.runtime.pregen.status.chunks_failed", "Chunks {generated}/{total} · Speed {speed}/s · Failed {failed}");
public static final TextKey PREGEN_STATUS_TIME = TextKey.of("iris.runtime.pregen.status.time", "ETA {eta} · Elapsed {elapsed}");
public static final TextKey PREGEN_STATUS_TIME_PAUSED = TextKey.of("iris.runtime.pregen.status.time_paused", "ETA {eta} · Elapsed {elapsed} · PAUSED");
public static final TextKey PREGEN_PAUSE_BUTTON = TextKey.of("iris.runtime.pregen.button.pause", "Pause/Resume");
public static final TextKey PREGEN_PAUSE_HOVER = TextKey.of("iris.runtime.pregen.button.pause.hover", "Toggle pregeneration pause state");
public static final TextKey PREGEN_STOP_BUTTON = TextKey.of("iris.runtime.pregen.button.stop", "Stop");
public static final TextKey PREGEN_STOP_HOVER = TextKey.of("iris.runtime.pregen.button.stop.hover", "Finish the current region and stop pregeneration");
private static final List<MessageKey> KEYS = List.of(
FINDING_REGIONS,
CONVERTING,
STATUS_RUNNING,
STATUS_STOPPED,
STATUS_PAUSED,
STATUS_PAUSED_LOWER,
STATUS_RUNNING_LOWER,
STATUS_ENABLED,
STATUS_DISABLED,
STATUS_UNREGISTERED,
STATUS_NONE,
STATUS_RANDOM,
STATUS_MATCH,
STATUS_MISMATCH,
STATUS_TRUE,
STATUS_FALSE,
ERROR_DETAIL_SUFFIX,
DOWNLOAD_OVERWRITE_SUFFIX,
DATAPACK_OVERRIDE_SUFFIX,
PRIMARY_PLAYERS_ROUTED_SUFFIX,
PRIMARY_ROUTING_DISABLED_SUFFIX,
MODDED_NO_DIMENSION_MATCH,
TELEPORTED_TO_WORLD,
ENGINE_HOTLOADED,
JOB_COMPLETED,
JOB_SCANNING_SELECTION,
JOB_LOADING_CHUNKS,
JOB_SEARCHED_CHUNKS,
JOB_COMPILE,
JOB_SAVING_OBJECT,
JOB_DOWNLOADING,
JOB_EXTRACTING,
JOB_INSTALLING,
COMPILE_IOB_EMPTY,
COMPILE_IOB_EMPTY_HOVER,
COMPILE_IOB_NOT_3D,
COMPILE_IOB_NOT_3D_HOVER,
COMPILE_JSON_ERROR,
COMPILE_JSON_ERROR_HOVER,
COMPILE_LOADER_NOT_FOUND,
FORCED_DATAPACK_NAME,
PACK_ALREADY_EXISTS,
TREE_DRY_SUFFIX,
TREE_SKIP_LOAD,
TREE_RESULT,
TREE_RESULT_PINNED,
TREE_PROGRESS,
TREE_FAILED,
TREE_DONE,
TREE_DONE_DRY,
TREE_TOTALS,
WAND_NAME,
WAND_LORE_FIRST,
WAND_LORE_SECOND,
DUST_NAME,
DUST_LORE,
WAND_POSITION_SET,
DUST_IRIS_WORLD_REQUIRED,
DUST_FOUND_OBJECT,
DUST_REVEALED,
DUST_REVEALED_CAPPED,
DUST_HEADER,
DUST_BLOCK,
DUST_POSITION_ABOVE,
DUST_POSITION_BELOW,
DUST_POSITION_AT,
DUST_OBJECT_AT_BLOCK,
DUST_NONE,
DUST_PLACED_BY_OBJECT_ABOVE,
DUST_PLACED_BY_DECORATION_ABOVE,
DUST_PLACED_BY_BURIED_OBJECT,
DUST_PLACED_BY_TERRAIN,
DUST_COLUMN_OBJECT,
DUST_COLUMN_OBJECT_NONE,
DUST_COLUMN_NONE,
DUST_COLUMN_ABOVE,
DUST_COLUMN_BELOW,
DUST_SURFACE_BIOME,
DUST_SURFACE_BIOME_DETAIL,
DUST_BIOME_AT_Y,
DUST_CAVE_BIOME,
DUST_SERVER_BIOME,
DUST_REGION,
DUST_OBJECTS_IN_CHUNK,
DUST_COPY_BUTTON,
DUST_COPY_HOVER,
PREGEN_STARTING,
PREGEN_HEADER,
PREGEN_BOSSBAR_PAUSED,
PREGEN_BOSSBAR_RUNNING,
PREGEN_ETA_FRAGMENT,
PREGEN_FAILED_FRAGMENT,
PREGEN_STATUS_CONTEXT,
PREGEN_STATUS_PROGRESS,
PREGEN_STATUS_CHUNKS,
PREGEN_STATUS_CHUNKS_FAILED,
PREGEN_STATUS_TIME,
PREGEN_STATUS_TIME_PAUSED,
PREGEN_PAUSE_BUTTON,
PREGEN_PAUSE_HOVER,
PREGEN_STOP_BUTTON,
PREGEN_STOP_HOVER
);
private RuntimeUiMessages() {
}
public static List<MessageKey> keys() {
return KEYS;
}
}
@@ -18,6 +18,8 @@
package art.arcane.iris.core.pack;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.iris.spi.IrisPlatforms;
import art.arcane.iris.core.service.StudioSVC;
import art.arcane.volmlib.util.format.Form;
@@ -117,8 +119,8 @@ public class IrisPackRepository {
File work = new File(IrisPlatforms.get().dataFolder("cache", "temp"), "extk-" + UUID.randomUUID());
new JobCollection(Form.capitalize(getRepo()),
new DownloadJob(toURL(), pack),
new SingleJob("Extracting", () -> ZipUtil.unpack(dl, work)),
new SingleJob("Installing", () -> {
new SingleJob(IrisLanguage.text(RuntimeUiMessages.JOB_EXTRACTING), () -> ZipUtil.unpack(dl, work)),
new SingleJob(IrisLanguage.text(RuntimeUiMessages.JOB_INSTALLING), () -> {
try {
FileUtils.copyDirectory(work.listFiles()[0], pack);
} catch (IOException e) {
@@ -126,7 +128,7 @@ public class IrisPackRepository {
}
})).execute(sender, whenComplete);
} else {
sender.sendMessage("Pack already exists!");
sender.sendMessage(IrisLanguage.text(RuntimeUiMessages.PACK_ALREADY_EXISTS));
}
}
}
@@ -18,11 +18,14 @@
package art.arcane.iris.core.pack;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.PackDownloadMessages;
import art.arcane.iris.core.loader.IrisData;
import art.arcane.iris.engine.object.IrisDimension;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.util.common.misc.WebCache;
import art.arcane.volmlib.util.io.IO;
import art.arcane.volmlib.util.localization.MessageArgument;
import org.zeroturnaround.zip.ZipUtil;
import org.zeroturnaround.zip.commons.FileUtils;
@@ -53,38 +56,30 @@ public final class PackDownloader {
public static String download(File packsFolder, String repo, String ref, boolean forceOverwrite, boolean directUrl, Consumer<String> feedback) throws IOException {
String url = directUrl ? ref : resolveGithubArchiveUrl(repo, ref);
feedback.accept("Downloading " + url + " "); //The extra space stops a bug in adventure API from repeating the last letter of the URL
feedback.accept(IrisLanguage.plain(PackDownloadMessages.DOWNLOADING, MessageArgument.untrusted("url", url)) + " "); //The extra space stops a bug in adventure API from repeating the last letter of the URL
File zip = WebCache.getNonCachedFile("pack-" + repo, url);
File temp = WebCache.getTemp();
File work = new File(temp, "dl-" + UUID.randomUUID());
if (zip == null || !zip.exists()) {
feedback.accept("Failed to find pack at " + url);
feedback.accept("Make sure you specified the correct repo and branch!");
feedback.accept("For example: /iris download overworld branch=stable");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.FAILED_TO_FIND, MessageArgument.untrusted("url", url)));
feedback.accept(IrisLanguage.plain(PackDownloadMessages.CHECK_REPOSITORY_AND_BRANCH));
feedback.accept(IrisLanguage.plain(PackDownloadMessages.EXAMPLE_COMMAND));
return null;
}
feedback.accept("Unpacking " + repo);
feedback.accept(IrisLanguage.plain(PackDownloadMessages.UNPACKING, MessageArgument.untrusted("repository", repo)));
try {
ZipUtil.unpack(zip, work);
} catch (Throwable e) {
IrisLogging.reportError(e);
e.printStackTrace();
feedback.accept(
"""
Issue when unpacking. Please check/do the following:
1. Do you have a functioning internet connection?
2. Did the download corrupt?
3. Try deleting the */plugins/iris/packs folder and re-download.
4. Download the pack from the GitHub repo: https://github.com/IrisDimensions/overworld
5. Contact support (if all other options do not help)"""
);
feedback.accept(IrisLanguage.plain(PackDownloadMessages.UNPACK_FAILED));
}
File dir = null;
File[] zipFiles = work.listFiles();
if (zipFiles == null) {
feedback.accept("No files were extracted from the zip file.");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.NO_EXTRACTED_FILES));
return null;
}
@@ -92,12 +87,12 @@ public final class PackDownloader {
dir = zipFiles.length > 1 ? work : zipFiles[0].isDirectory() ? zipFiles[0] : null;
} catch (NullPointerException e) {
IrisLogging.reportError(e);
feedback.accept("Error when finding home directory. Are there any non-text characters in the file name?");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.HOME_DIRECTORY_ERROR));
return null;
}
if (dir == null) {
feedback.accept("Invalid Format. Missing root folder or too many folders!");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.INVALID_ARCHIVE_FORMAT));
return null;
}
@@ -105,13 +100,13 @@ public final class PackDownloader {
String[] dimensions = data.getDimensionLoader().getPossibleKeys();
if (dimensions == null || dimensions.length == 0) {
feedback.accept("No dimension file found in the extracted zip file.");
feedback.accept("Check it is there on GitHub and report this to staff!");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.NO_DIMENSION_FILE));
feedback.accept(IrisLanguage.plain(PackDownloadMessages.CHECK_GITHUB));
return null;
}
if (dimensions.length != 1) {
feedback.accept("Dimensions folder must have 1 file in it");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.ONE_DIMENSION_REQUIRED));
return null;
}
@@ -119,12 +114,12 @@ public final class PackDownloader {
data.close();
if (d == null) {
feedback.accept("Invalid dimension (folder) in dimensions folder");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.INVALID_DIMENSION));
return null;
}
String key = d.getLoadKey();
feedback.accept("Importing " + d.getName() + " (" + key + ")");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.IMPORTING, MessageArgument.untrusted("name", d.getName()), MessageArgument.untrusted("key", key)));
File packEntry = new File(packsFolder, key);
if (forceOverwrite) {
@@ -132,13 +127,13 @@ public final class PackDownloader {
}
if (IrisData.loadAnyDimension(key, null) != null) {
feedback.accept("Another dimension in the packs folder is already using the key " + key + " IMPORT FAILED!");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.DIMENSION_KEY_CONFLICT, MessageArgument.untrusted("key", key)));
return null;
}
File[] existingEntries = packEntry.listFiles();
if (packEntry.exists() && existingEntries != null && existingEntries.length > 0) {
feedback.accept("Another pack is using the key " + key + ". IMPORT FAILED!");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.PACK_KEY_CONFLICT, MessageArgument.untrusted("key", key)));
return null;
}
@@ -147,7 +142,7 @@ public final class PackDownloader {
IrisData.getLoaded(packEntry)
.ifPresent(IrisData::hotloaded);
feedback.accept("Successfully Aquired " + d.getName());
feedback.accept(IrisLanguage.plain(PackDownloadMessages.ACQUIRED, MessageArgument.untrusted("name", d.getName())));
validateDownloaded(packEntry, feedback);
return key;
}
@@ -213,15 +208,18 @@ public final class PackDownloader {
PackValidationRegistry.publish(result);
if (!result.isLoadable()) {
feedback.accept("Pack '" + result.getPackName() + "' FAILED validation - world/studio creation will be refused. Reasons:");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.VALIDATION_FAILED, MessageArgument.untrusted("pack", result.getPackName())));
for (String reason : result.getBlockingErrors()) {
feedback.accept(" - " + reason);
feedback.accept(IrisLanguage.plain(PackDownloadMessages.VALIDATION_REASON, MessageArgument.untrusted("reason", reason)));
}
} else if (!result.getWarnings().isEmpty()) {
feedback.accept("Pack '" + result.getPackName() + "' validated ("
+ result.getWarnings().size() + " warning(s)).");
feedback.accept(IrisLanguage.plain(
PackDownloadMessages.VALIDATED_WITH_WARNINGS,
MessageArgument.untrusted("pack", result.getPackName()),
MessageArgument.trusted("count", result.getWarnings().size())
));
} else {
feedback.accept("Pack '" + result.getPackName() + "' validated.");
feedback.accept(IrisLanguage.plain(PackDownloadMessages.VALIDATED, MessageArgument.untrusted("pack", result.getPackName())));
}
} catch (Throwable e) {
IrisLogging.reportError("Pack validation failed for '" + packEntry.getName() + "'", e);
@@ -60,6 +60,9 @@ import art.arcane.iris.util.common.scheduling.jobs.Job;
import art.arcane.iris.util.common.scheduling.jobs.JobCollection;
import art.arcane.iris.util.common.scheduling.jobs.ParallelQueueJob;
import lombok.Data;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.World;
@@ -82,6 +85,11 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeProgressMessages;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.volmlib.util.localization.MessageArgument;
@SuppressWarnings("ALL")
@Data
public class IrisProject {
@@ -185,12 +193,12 @@ public class IrisProject {
{
try {
if (d == null) {
sender.sendMessage("Could not load dimension \"" + getName() + "\"");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_COULD_NOT_LOAD_DIMENSION, MessageArgument.untrusted("value", String.valueOf(getName()))));
return;
}
if (d.getLoader() == null) {
sender.sendMessage("Could not get dimension loader");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_COULD_NOT_GET_DIMENSION_LOADER));
return;
}
File f = d.getLoader().getDataFolder();
@@ -282,7 +290,7 @@ public class IrisProject {
? completionException.getCause()
: throwable;
IrisLogging.reportError("Studio open failed for project \"" + getName() + "\".", error);
sender.sendMessage(C.RED + "Studio open failed: " + error.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_STUDIO_OPEN_FAILED, MessageArgument.untrusted("error", String.valueOf(error.getMessage()))));
return;
}
@@ -316,7 +324,7 @@ public class IrisProject {
if (sender.isPlayer() && sender.player() != null) {
bossBar = Bukkit.createBossBar(
C.GOLD + "Studio " + C.AQUA + "OPENING",
IrisLanguage.text(RuntimeProgressMessages.STUDIO_OPENING),
org.bukkit.boss.BarColor.BLUE,
org.bukkit.boss.BarStyle.SEGMENTED_20
);
@@ -340,32 +348,36 @@ public class IrisProject {
if (bossBar != null) {
bossBar.setProgress(Math.max(0.0D, Math.min(1.0D, currentProgress)));
bossBar.setColor(org.bukkit.boss.BarColor.RED);
bossBar.setTitle(C.GOLD + "Studio " + C.RED + "FAILED" + C.GRAY + " " + C.YELLOW + percent + "%");
bossBar.setTitle(IrisLanguage.text(
RuntimeProgressMessages.STUDIO_FAILED_PROGRESS,
MessageArgument.trusted("percent", percent)
));
J.a(() -> { bossBar.removeAll(); bossBar.setVisible(false); }, 60);
}
if (sender.isPlayer()) {
String action = buildStudioProgressBar(currentProgress)
+ C.GRAY + " " + C.RED + "FAILED"
+ C.GRAY + " | " + C.WHITE + currentStage;
sender.sendAction(action);
sender.sendAction(IrisLanguage.text(
RuntimeProgressMessages.STUDIO_ACTION_FAILED,
MessageArgument.trusted("bar", buildStudioProgressBar(currentProgress)),
MessageArgument.trusted("stage", currentStage)
));
} else {
sender.sendMessage(C.RED + "Studio open failed.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_STUDIO_OPEN_FAILED_2));
}
} else {
if (bossBar != null) {
bossBar.setProgress(1.0D);
bossBar.setColor(org.bukkit.boss.BarColor.GREEN);
bossBar.setTitle(C.GOLD + "Studio " + C.GREEN + "READY" + C.GRAY + " " + C.YELLOW + "100%");
bossBar.setTitle(IrisLanguage.text(RuntimeProgressMessages.STUDIO_READY_PROGRESS));
J.a(() -> { bossBar.removeAll(); bossBar.setVisible(false); }, 60);
}
if (sender.isPlayer()) {
String action = buildStudioProgressBar(1.0D)
+ C.GRAY + " " + C.GREEN + "100%"
+ C.GRAY + " | " + C.GREEN + "Studio ready"
+ C.DARK_GRAY + " " + Form.duration(elapsed, 1);
sender.sendAction(action);
sender.sendAction(IrisLanguage.text(
RuntimeProgressMessages.STUDIO_ACTION_READY,
MessageArgument.trusted("bar", buildStudioProgressBar(1.0D)),
MessageArgument.trusted("elapsed", Form.duration(elapsed, 1))
));
} else {
sender.sendMessage(C.GREEN + "Studio ready " + C.GRAY + "(" + Form.duration(elapsed, 1) + ")");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_STUDIO_READY, MessageArgument.untrusted("value", String.valueOf(Form.duration(elapsed, 1)))));
}
}
return;
@@ -374,20 +386,31 @@ public class IrisProject {
if (sender.isPlayer() && sender.player() != null) {
if (bossBar != null) {
bossBar.setProgress(Math.max(0.0D, Math.min(1.0D, currentProgress)));
bossBar.setTitle(C.GOLD + "Studio " + C.AQUA + "OPENING" + C.GRAY + " " + C.YELLOW + percent + "%");
bossBar.setTitle(IrisLanguage.text(
RuntimeProgressMessages.STUDIO_OPENING_PROGRESS,
MessageArgument.trusted("percent", percent)
));
}
String action = buildStudioProgressBar(currentProgress)
+ C.GRAY + " " + C.YELLOW + percent + "%"
+ C.GRAY + " | " + C.WHITE + currentStage
+ C.DARK_GRAY + " " + Form.duration(elapsed, 0);
sender.sendAction(action);
sender.sendAction(IrisLanguage.text(
RuntimeProgressMessages.STUDIO_ACTION_PROGRESS,
MessageArgument.trusted("bar", buildStudioProgressBar(currentProgress)),
MessageArgument.trusted("percent", percent),
MessageArgument.trusted("stage", currentStage),
MessageArgument.trusted("elapsed", Form.duration(elapsed, 0))
));
} else {
long now = System.currentTimeMillis();
long nextUpdate = nextConsoleUpdate.get();
if (now >= nextUpdate) {
String bar = buildStudioConsoleBar(currentProgress);
sender.sendMessage(C.GOLD + "Studio " + C.AQUA + bar + " " + C.YELLOW + percent + "%" + C.GRAY + " " + currentStage + C.DARK_GRAY + " (" + Form.duration(elapsed, 0) + ")");
sender.sendMessage(IrisLanguage.text(
RuntimeProgressMessages.STUDIO_CONSOLE_PROGRESS,
MessageArgument.trusted("bar", bar),
MessageArgument.trusted("percent", percent),
MessageArgument.trusted("stage", currentStage),
MessageArgument.trusted("elapsed", Form.duration(elapsed, 0))
));
nextConsoleUpdate.set(now + 1500L);
}
}
@@ -420,20 +443,22 @@ public class IrisProject {
}
private static String describeStage(String stage) {
if (stage == null || stage.isBlank()) return "Initializing";
if (stage == null || stage.isBlank()) {
return IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_INITIALIZING);
}
return switch (stage) {
case "Queued" -> "Queued";
case "resolve_dimension" -> "Resolving dimension";
case "prepare_world_pack" -> "Preparing world pack";
case "install_datapacks" -> "Installing datapacks";
case "create_world" -> "Creating world";
case "apply_world_rules" -> "Applying world rules";
case "prepare_generator" -> "Preparing generator";
case "request_entry_chunk" -> "Loading entry chunk";
case "resolve_safe_entry" -> "Finding safe spawn";
case "teleport_player" -> "Teleporting";
case "finalize_open" -> "Finalizing";
case "cleanup" -> "Cleaning up";
case "Queued" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_QUEUED);
case "resolve_dimension" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_RESOLVE_DIMENSION);
case "prepare_world_pack" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_PREPARE_WORLD_PACK);
case "install_datapacks" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_INSTALL_DATAPACKS);
case "create_world" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_CREATE_WORLD);
case "apply_world_rules" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_APPLY_WORLD_RULES);
case "prepare_generator" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_PREPARE_GENERATOR);
case "request_entry_chunk" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_REQUEST_ENTRY_CHUNK);
case "resolve_safe_entry" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_RESOLVE_SAFE_ENTRY);
case "teleport_player" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_TELEPORT_PLAYER);
case "finalize_open" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_FINALIZE_OPEN);
case "cleanup" -> IrisLanguage.text(RuntimeProgressMessages.STUDIO_STAGE_CLEANUP);
default -> Form.capitalizeWords(stage.replace('_', ' '));
};
}
@@ -665,7 +690,7 @@ public class IrisProject {
String a;
StringBuilder b = new StringBuilder();
StringBuilder c = new StringBuilder();
sender.sendMessage("Serializing Objects");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_SERIALIZING_OBJECTS));
for (IrisBiome i : biomes) {
for (IrisObjectPlacement j : i.getObjects()) {
@@ -704,7 +729,7 @@ public class IrisProject {
if (cl.flip()) {
int g = ggg.get();
ggg.set(0);
sender.sendMessage("Wrote another " + g + " Objects");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_WROTE_ANOTHER_OBJECTS, MessageArgument.untrusted("g", String.valueOf(g))));
}
} catch (Throwable e) {
IrisLogging.reportError(e);
@@ -778,13 +803,13 @@ public class IrisProject {
ZipUtil.pack(folder, p, 9);
IO.delete(folder);
sender.sendMessage("Package Compiled!");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_PACKAGE_COMPILED));
return p;
} catch (Throwable e) {
IrisLogging.reportError(e);
e.printStackTrace();
}
sender.sendMessage("Failed!");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_PROJECT_FAILED));
return null;
}
@@ -827,15 +852,25 @@ public class IrisProject {
o.read(f);
if (o.getBlocks().isEmpty()) {
sender.sendMessageRaw("<hover:show_text:'Error:\n" +
"<yellow>" + f.getPath() +
"'><red>- IOB " + f.getName() + " has 0 blocks!");
sender.sendComponent(Component.text(IrisLanguage.plain(
RuntimeUiMessages.COMPILE_IOB_EMPTY,
MessageArgument.untrusted("file", f.getName())
), NamedTextColor.RED)
.hoverEvent(HoverEvent.showText(Component.text(IrisLanguage.plain(
RuntimeUiMessages.COMPILE_IOB_EMPTY_HOVER,
MessageArgument.untrusted("path", f.getPath())
), NamedTextColor.YELLOW))));
}
if (o.getW() == 0 || o.getH() == 0 || o.getD() == 0) {
sender.sendMessageRaw("<hover:show_text:'Error:\n" +
"<yellow>" + f.getPath() + "\n<red>The width height or depth has a zero in it (bad format)" +
"'><red>- IOB " + f.getName() + " is not 3D!");
sender.sendComponent(Component.text(IrisLanguage.plain(
RuntimeUiMessages.COMPILE_IOB_NOT_3D,
MessageArgument.untrusted("file", f.getName())
), NamedTextColor.RED)
.hoverEvent(HoverEvent.showText(Component.text(IrisLanguage.plain(
RuntimeUiMessages.COMPILE_IOB_NOT_3D_HOVER,
MessageArgument.untrusted("path", f.getPath())
), NamedTextColor.YELLOW))));
}
} catch (IOException e) {
e.printStackTrace();
@@ -858,10 +893,15 @@ public class IrisProject {
IO.writeAll(f, p.toString(4));
} catch (Throwable e) {
sender.sendMessageRaw("<hover:show_text:'Error:\n" +
"<yellow>" + f.getPath() +
"\n<red>" + e.getMessage() +
"'><red>- JSON Error " + f.getName());
sender.sendComponent(Component.text(IrisLanguage.plain(
RuntimeUiMessages.COMPILE_JSON_ERROR,
MessageArgument.untrusted("file", f.getName())
), NamedTextColor.RED)
.hoverEvent(HoverEvent.showText(Component.text(IrisLanguage.plain(
RuntimeUiMessages.COMPILE_JSON_ERROR_HOVER,
MessageArgument.untrusted("path", f.getPath()),
MessageArgument.untrusted("error", String.valueOf(e.getMessage()))
), NamedTextColor.YELLOW))));
}
}
@@ -871,7 +911,7 @@ public class IrisProject {
}
}.queue(files));
new JobCollection("Compile", jobs).execute(sender);
new JobCollection(IrisLanguage.text(RuntimeUiMessages.JOB_COMPILE), jobs).execute(sender);
}
private void scanForErrors(IrisData data, File f, JSONObject p, VolmitSender sender) {
@@ -879,7 +919,10 @@ public class IrisProject {
ResourceLoader<?> loader = data.getTypedLoaderFor(f);
if (loader == null) {
sender.sendMessageBasic("Can't find loader for " + f.getPath());
sender.sendMessage(IrisLanguage.text(
RuntimeUiMessages.COMPILE_LOADER_NOT_FOUND,
MessageArgument.untrusted("path", f.getPath())
));
return;
}
@@ -18,6 +18,8 @@
package art.arcane.iris.core.runtime;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeProgressMessages;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.core.nms.INMS;
import art.arcane.iris.engine.framework.Engine;
@@ -51,7 +53,7 @@ public final class ChunkClearer {
this.centerChunkX = centerChunkX;
this.centerChunkZ = centerChunkZ;
this.radius = Math.max(0, radius);
this.reporter = new ChunkJobReporter(sender, "Delete", world);
this.reporter = new ChunkJobReporter(sender, IrisLanguage.text(RuntimeProgressMessages.CHUNK_TITLE_DELETE), world);
}
public void start() {
@@ -66,7 +68,7 @@ public final class ChunkClearer {
try {
List<int[]> targets = ChunkJobReporter.orderedTargets(centerChunkX, centerChunkZ, radius);
reporter.setTotal(targets.size());
reporter.setStage("Clearing");
reporter.setStage(IrisLanguage.text(RuntimeProgressMessages.CHUNK_STAGE_CLEARING));
clear(targets);
} catch (Throwable e) {
IrisLogging.reportError(e);
@@ -18,12 +18,15 @@
package art.arcane.iris.core.runtime;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeProgressMessages;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.util.common.format.C;
import art.arcane.iris.util.common.math.ChunkSpiral;
import art.arcane.iris.util.common.plugin.VolmitSender;
import art.arcane.iris.util.common.scheduling.J;
import art.arcane.volmlib.util.format.Form;
import art.arcane.volmlib.util.localization.MessageArgument;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.boss.BarColor;
@@ -44,7 +47,9 @@ public final class ChunkJobReporter {
private final String title;
private final String worldName;
private final AtomicReference<String> stage = new AtomicReference<>("Preparing");
private final AtomicReference<String> stage = new AtomicReference<>(
IrisLanguage.text(RuntimeProgressMessages.CHUNK_STAGE_PREPARING)
);
private final AtomicReference<Double> progress = new AtomicReference<>(0.0D);
private final AtomicBoolean complete = new AtomicBoolean(false);
private final AtomicBoolean failed = new AtomicBoolean(false);
@@ -106,7 +111,10 @@ public final class ChunkJobReporter {
private void startReporter() {
boolean player = sender.isPlayer() && sender.player() != null;
BossBar bossBar = player
? Bukkit.createBossBar(C.GOLD + title + " " + C.AQUA + "WORKING", BarColor.BLUE, BarStyle.SEGMENTED_20)
? Bukkit.createBossBar(IrisLanguage.text(
RuntimeProgressMessages.CHUNK_BOSSBAR_WORKING,
MessageArgument.trusted("title", title)
), BarColor.BLUE, BarStyle.SEGMENTED_20)
: null;
if (bossBar != null) {
bossBar.setProgress(0.0D);
@@ -126,28 +134,53 @@ public final class ChunkJobReporter {
return;
}
String label = stage.get() + " " + applied.get() + "/" + (total <= 0 ? "?" : total);
if (bossBar != null) {
bossBar.setProgress(Math.min(1.0D, currentProgress));
bossBar.setTitle(C.GOLD + title + " " + C.AQUA + stage.get() + C.GRAY + " " + C.YELLOW + percent + "%");
bossBar.setTitle(IrisLanguage.text(
RuntimeProgressMessages.CHUNK_BOSSBAR_PROGRESS,
MessageArgument.trusted("title", title),
MessageArgument.trusted("stage", stage.get()),
MessageArgument.trusted("percent", percent)
));
}
if (sender.isPlayer()) {
sender.sendAction(progressBar(currentProgress) + C.GRAY + " " + C.YELLOW + percent + "%"
+ C.GRAY + " | " + C.WHITE + label);
sender.sendAction(IrisLanguage.text(
RuntimeProgressMessages.CHUNK_ACTION_PROGRESS,
MessageArgument.trusted("bar", progressBar(currentProgress)),
MessageArgument.trusted("percent", percent),
MessageArgument.trusted("stage", stage.get()),
MessageArgument.trusted("applied", applied.get()),
MessageArgument.trusted("total", total <= 0 ? "?" : total)
));
}
}, REPORT_INTERVAL_TICKS));
}
private void finishReporter(BossBar bossBar, long elapsed) {
boolean ok = !failed.get();
String summary = applied.get() + "/" + total + " chunk(s) in " + Form.duration(elapsed, 1)
+ (failures.get() > 0 ? " (" + failures.get() + " failed)" : "");
String summary = failures.get() > 0
? IrisLanguage.text(
RuntimeProgressMessages.CHUNK_SUMMARY_FAILED,
MessageArgument.trusted("applied", applied.get()),
MessageArgument.trusted("total", total),
MessageArgument.trusted("elapsed", Form.duration(elapsed, 1)),
MessageArgument.trusted("failures", failures.get())
)
: IrisLanguage.text(
RuntimeProgressMessages.CHUNK_SUMMARY,
MessageArgument.trusted("applied", applied.get()),
MessageArgument.trusted("total", total),
MessageArgument.trusted("elapsed", Form.duration(elapsed, 1))
);
if (bossBar != null) {
bossBar.setProgress(1.0D);
bossBar.setColor(ok ? BarColor.GREEN : BarColor.RED);
bossBar.setTitle(C.GOLD + title + " " + (ok ? C.GREEN + "DONE" : C.RED + "FAILED")
+ C.GRAY + " " + C.YELLOW + summary);
bossBar.setTitle(IrisLanguage.text(
ok ? RuntimeProgressMessages.CHUNK_BOSSBAR_DONE : RuntimeProgressMessages.CHUNK_BOSSBAR_FAILED,
MessageArgument.trusted("title", title),
MessageArgument.trusted("summary", summary)
));
J.a(() -> {
bossBar.removeAll();
bossBar.setVisible(false);
@@ -155,10 +188,17 @@ public final class ChunkJobReporter {
}
if (sender.isPlayer()) {
sender.sendAction(progressBar(1.0D) + C.GRAY + " " + (ok ? C.GREEN + "Done" : C.RED + "Failed")
+ C.GRAY + " | " + C.WHITE + summary);
sender.sendAction(IrisLanguage.text(
ok ? RuntimeProgressMessages.CHUNK_ACTION_DONE : RuntimeProgressMessages.CHUNK_ACTION_FAILED,
MessageArgument.trusted("bar", progressBar(1.0D)),
MessageArgument.trusted("summary", summary)
));
}
sender.sendMessage((ok ? C.GREEN + title + " complete: " : C.RED + title + " finished with errors: ") + summary);
sender.sendMessage(IrisLanguage.text(
ok ? RuntimeProgressMessages.CHUNK_COMPLETE : RuntimeProgressMessages.CHUNK_FAILED,
MessageArgument.trusted("title", title),
MessageArgument.trusted("summary", summary)
));
IrisLogging.info(title + " done: world=" + worldName + " " + summary);
}
@@ -18,6 +18,8 @@
package art.arcane.iris.core.runtime;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeProgressMessages;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.mantle.EngineMantle;
import art.arcane.iris.spi.IrisLogging;
@@ -25,6 +27,7 @@ import art.arcane.iris.spi.PlatformBiome;
import art.arcane.iris.spi.PlatformBlockState;
import art.arcane.iris.util.common.math.ChunkSpiral;
import art.arcane.iris.util.common.parallel.MultiBurst;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.volmlib.util.mantle.runtime.Mantle;
import java.io.File;
@@ -137,26 +140,32 @@ public final class GoldenHashEngine {
try {
boolean exists = goldenFile.exists();
if (request.mode() == Mode.VERIFY && !exists) {
feedback.fail("No golden capture at " + goldenFile.getAbsolutePath() + "; run a capture first.");
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_NO_CAPTURE,
MessageArgument.untrusted("path", goldenFile.getAbsolutePath())
));
return false;
}
if (request.resetMantle()) {
progress.stage("Resetting mantle");
progress.stage(IrisLanguage.plain(RuntimeProgressMessages.CHUNK_STAGE_RESETTING_MANTLE));
resetMantleFull();
}
List<int[]> targets = ChunkSpiral.centerOut(request.centerChunkX(), request.centerChunkZ(), radius);
progress.total(targets.size());
progress.stage("Generating");
progress.stage(IrisLanguage.plain(RuntimeProgressMessages.CHUNK_STAGE_GENERATING));
Map<Long, String> lines = scan(targets);
if (lines.size() != targets.size()) {
feedback.fail("GoldenHash aborted: " + (targets.size() - lines.size()) + " chunk(s) failed to generate. No golden file written.");
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_ABORTED,
MessageArgument.trusted("failed", targets.size() - lines.size())
));
return false;
}
progress.stage("Comparing");
progress.stage(IrisLanguage.plain(RuntimeProgressMessages.CHUNK_STAGE_COMPARING));
if (request.mode() == Mode.CAPTURE || (request.mode() == Mode.AUTO && !exists)) {
capture(lines);
return true;
@@ -165,7 +174,10 @@ public final class GoldenHashEngine {
return verify(lines);
} catch (Throwable e) {
IrisLogging.reportError(e);
feedback.fail("GoldenHash failed: " + e);
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_FAILED,
MessageArgument.untrusted("error", String.valueOf(e))
));
return false;
} finally {
ACTIVE_SCANS.decrementAndGet();
@@ -185,10 +197,16 @@ public final class GoldenHashEngine {
}
}
}
feedback.ok("Mantle reset (" + folder.getAbsolutePath() + ")");
feedback.ok(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MANTLE_RESET,
MessageArgument.untrusted("path", folder.getAbsolutePath())
));
} catch (Throwable e) {
IrisLogging.reportError(e);
feedback.warn("Mantle reset failed (" + e.getClass().getSimpleName() + "); continuing with existing mantle state.");
feedback.warn(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MANTLE_RESET_FAILED,
MessageArgument.untrusted("type", e.getClass().getSimpleName())
));
}
}
@@ -280,7 +298,11 @@ public final class GoldenHashEngine {
out.add("#combined=" + combined);
Files.write(goldenFile.toPath(), out, StandardCharsets.UTF_8);
feedback.ok("Golden captured: " + body.size() + " chunks combined=" + shortHash(combined));
feedback.ok(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_CAPTURED,
MessageArgument.trusted("chunks", body.size()),
MessageArgument.trusted("hash", shortHash(combined))
));
feedback.ok(goldenFile.getAbsolutePath());
IrisLogging.info("goldenhash captured: " + goldenFile.getAbsolutePath() + " combined=" + combined);
}
@@ -304,12 +326,21 @@ public final class GoldenHashEngine {
String expectedSeed = String.valueOf(request.seed());
String expectedDim = engine.getDimension().getLoadKey();
if (!expectedSeed.equals(meta.get("seed")) || !expectedDim.equals(meta.get("dim"))) {
feedback.fail("Golden file is for dim=" + meta.get("dim") + " seed=" + meta.get("seed")
+ " but this world is dim=" + expectedDim + " seed=" + expectedSeed + ". Aborting.");
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_WRONG_WORLD,
MessageArgument.untrusted("goldenDimension", String.valueOf(meta.get("dim"))),
MessageArgument.untrusted("goldenSeed", String.valueOf(meta.get("seed"))),
MessageArgument.untrusted("dimension", expectedDim),
MessageArgument.untrusted("seed", expectedSeed)
));
return false;
}
if (!request.mcVersion().equals(meta.get("mc"))) {
feedback.warn("Golden was captured on mc=" + meta.get("mc") + ", running mc=" + request.mcVersion() + ". Diffs may be version-induced.");
feedback.warn(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_VERSION_WARNING,
MessageArgument.untrusted("goldenVersion", String.valueOf(meta.get("mc"))),
MessageArgument.untrusted("version", request.mcVersion())
));
}
List<String> body = orderedBody(lines);
@@ -319,33 +350,56 @@ public final class GoldenHashEngine {
String key = line.substring(0, second);
String golden = goldenChunks.get(key);
if (!line.equals(golden)) {
mismatches.add(key + (golden == null ? " (missing in golden)" : ""));
mismatches.add(golden == null
? IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MISSING_IN_GOLDEN,
MessageArgument.untrusted("chunk", key)
)
: key);
}
}
String combined = combinedHash(body);
if (mismatches.isEmpty()) {
feedback.ok("GOLDEN MATCH: " + body.size() + "/" + goldenChunks.size() + " chunks, combined=" + shortHash(combined));
feedback.ok(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MATCH,
MessageArgument.trusted("current", body.size()),
MessageArgument.trusted("golden", goldenChunks.size()),
MessageArgument.trusted("hash", shortHash(combined))
));
IrisLogging.info("goldenhash MATCH: " + goldenFile.getName() + " combined=" + combined);
return true;
}
feedback.fail("GOLDEN MISMATCH: " + mismatches.size() + "/" + body.size() + " chunks differ.");
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MISMATCH,
MessageArgument.trusted("mismatches", mismatches.size()),
MessageArgument.trusted("chunks", body.size())
));
for (int i = 0; i < Math.min(MAX_REPORTED_MISMATCHES, mismatches.size()); i++) {
feedback.fail(" chunk " + mismatches.get(i));
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MISMATCH_CHUNK,
MessageArgument.untrusted("chunk", mismatches.get(i))
));
}
if (mismatches.size() > MAX_REPORTED_MISMATCHES) {
feedback.fail(" ... and " + (mismatches.size() - MAX_REPORTED_MISMATCHES) + " more");
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MISMATCH_MORE,
MessageArgument.trusted("count", mismatches.size() - MAX_REPORTED_MISMATCHES)
));
}
File current = new File(goldenFile.getParentFile(), goldenFile.getName() + ".new");
List<String> out = new ArrayList<>(body);
out.add("#combined=" + combined);
Files.write(current.toPath(), out, StandardCharsets.UTF_8);
feedback.warn("Current hashes written to " + current.getName());
feedback.warn(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_CURRENT_WRITTEN,
MessageArgument.untrusted("file", current.getName())
));
IrisLogging.info("goldenhash MISMATCH: " + mismatches.size() + "/" + body.size() + " -> " + current.getAbsolutePath());
progress.stage("Diagnosing");
progress.stage(IrisLanguage.plain(RuntimeProgressMessages.CHUNK_STAGE_DIAGNOSING));
diagnose(mismatches.getFirst());
return false;
}
@@ -376,6 +430,7 @@ public final class GoldenHashEngine {
List<String> mantleDiffs = new ArrayList<>();
String mantleStatus;
boolean mantleStable = false;
try {
EngineMantle engineMantle = engine.getMantle();
int margin = Math.max(engineMantle.getRadius(), engineMantle.getRealRadius()) + 1;
@@ -396,10 +451,19 @@ public final class GoldenHashEngine {
}
}
}
mantleStatus = mantleDiffs.isEmpty() ? "STABLE (mantle rebuild reproduces scan output)" : "DIVERGED (" + mantleDiffs.size() + "+ diffs - mantle build is state/order dependent)";
mantleStable = mantleDiffs.isEmpty();
mantleStatus = mantleStable
? IrisLanguage.plain(RuntimeProgressMessages.GOLDEN_MANTLE_STABLE)
: IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MANTLE_DIVERGED,
MessageArgument.trusted("diffs", mantleDiffs.size())
);
} catch (Throwable t) {
mantleDiffs.clear();
mantleStatus = "SKIPPED (" + t.getClass().getSimpleName() + ")";
mantleStatus = IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_MANTLE_SKIPPED,
MessageArgument.untrusted("type", t.getClass().getSimpleName())
);
}
List<String> report = new ArrayList<>();
@@ -422,17 +486,27 @@ public final class GoldenHashEngine {
File diag = new File(goldenFile.getParentFile(), goldenFile.getName() + ".diag-c" + chunkX + "x" + chunkZ + ".txt");
Files.write(diag.toPath(), report, StandardCharsets.UTF_8);
String repeatPart = diffs.isEmpty() ? "Repeat-gen STABLE" : "Repeat-gen UNSTABLE (" + diffs.size() + "+ block diffs)";
String mantlePart = "mantle-reset " + mantleStatus;
if (diffs.isEmpty() && mantleDiffs.isEmpty() && mantleStatus.startsWith("STABLE")) {
feedback.warn(repeatPart + ", " + mantlePart + " -> " + diag.getName());
if (diffs.isEmpty() && mantleStable) {
feedback.warn(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_DIAG_STABLE,
MessageArgument.trusted("mantleStatus", mantleStatus),
MessageArgument.untrusted("file", diag.getName())
));
} else {
feedback.fail(repeatPart + ", " + mantlePart + " -> " + diag.getName());
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_DIAG_UNSTABLE,
MessageArgument.trusted("diffs", diffs.size()),
MessageArgument.trusted("mantleStatus", mantleStatus),
MessageArgument.untrusted("file", diag.getName())
));
}
IrisLogging.info("goldenhash diag: chunk=" + chunkX + "," + chunkZ + " repeatStable=" + diffs.isEmpty() + " -> " + diag.getAbsolutePath());
} catch (Throwable e) {
IrisLogging.reportError(e);
feedback.fail("Diagnosis failed: " + e.getMessage());
feedback.fail(IrisLanguage.plain(
RuntimeProgressMessages.GOLDEN_DIAG_FAILED,
MessageArgument.untrusted("error", String.valueOf(e.getMessage()))
));
}
}
@@ -18,6 +18,8 @@
package art.arcane.iris.core.runtime;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeProgressMessages;
import art.arcane.iris.engine.data.chunk.TerrainChunk;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.spi.IrisPlatforms;
@@ -39,7 +41,7 @@ public final class GoldenHashScanner {
this.world = world;
this.engine = engine;
this.sender = sender;
this.reporter = new ChunkJobReporter(sender, "GoldenHash", world);
this.reporter = new ChunkJobReporter(sender, IrisLanguage.text(RuntimeProgressMessages.CHUNK_TITLE_GOLDEN_HASH), world);
GoldenHashEngine.Request request = new GoldenHashEngine.Request(
world.getName(),
world.getSeed(),
@@ -18,6 +18,8 @@
package art.arcane.iris.core.runtime;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeProgressMessages;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.core.nms.INMS;
import art.arcane.iris.engine.data.chunk.TerrainChunk;
@@ -60,7 +62,7 @@ public final class InPlaceChunkRegenerator {
this.centerChunkX = centerChunkX;
this.centerChunkZ = centerChunkZ;
this.radius = Math.max(0, radius);
this.reporter = new ChunkJobReporter(sender, "Regen", world);
this.reporter = new ChunkJobReporter(sender, IrisLanguage.text(RuntimeProgressMessages.CHUNK_TITLE_REGEN), world);
}
public void start() {
@@ -73,12 +75,12 @@ public final class InPlaceChunkRegenerator {
private void run() {
boolean error = false;
try {
reporter.setStage("Resetting mantle");
reporter.setStage(IrisLanguage.text(RuntimeProgressMessages.CHUNK_STAGE_RESETTING_MANTLE));
resetMantleMargin();
List<int[]> targets = ChunkJobReporter.orderedTargets(centerChunkX, centerChunkZ, radius);
reporter.setTotal(targets.size());
reporter.setStage("Regenerating");
reporter.setStage(IrisLanguage.text(RuntimeProgressMessages.CHUNK_STAGE_REGENERATING));
regenerate(targets);
} catch (Throwable e) {
IrisLogging.reportError(e);
@@ -18,6 +18,9 @@
package art.arcane.iris.core.service;
import art.arcane.iris.core.localization.BukkitUiMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.core.loader.IrisData;
@@ -28,11 +31,11 @@ import art.arcane.volmlib.util.board.Board;
import art.arcane.volmlib.util.board.BoardProvider;
import art.arcane.volmlib.util.board.BoardSettings;
import art.arcane.volmlib.util.board.ScoreDirection;
import art.arcane.iris.util.common.format.C;
import art.arcane.volmlib.util.format.Form;
import art.arcane.iris.util.common.plugin.IrisService;
import art.arcane.iris.util.common.scheduling.J;
import art.arcane.volmlib.util.matter.MatterCavern;
import art.arcane.volmlib.util.localization.MessageArgument;
import lombok.Data;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -171,7 +174,7 @@ public class BoardSVC implements IrisService, BoardProvider {
@Override
public String getTitle(Player player) {
return C.GREEN + "Iris";
return IrisLanguage.text(BukkitUiMessages.SCOREBOARD_TITLE);
}
@Override
@@ -333,20 +336,28 @@ public class BoardSVC implements IrisService, BoardProvider {
List<String> lines = new ArrayList<>(this.lines.size());
lines.add("&7&m ");
lines.add(C.GREEN + "Speed" + C.GRAY + ": " + Form.f(engine.getGeneratedPerSecond(), 0) + "/s " + Form.duration(1000D / engine.getGeneratedPerSecond(), 0));
lines.add(C.AQUA + "Cache" + C.GRAY + ": " + Form.f(IrisData.cacheSize()));
lines.add(C.AQUA + "Mantle" + C.GRAY + ": " + engine.getMantle().getLoadedRegionCount());
lines.add(IrisLanguage.text(
BukkitUiMessages.SCOREBOARD_SPEED,
MessageArgument.trusted("speed", Form.f(engine.getGeneratedPerSecond(), 0)),
MessageArgument.trusted("duration", Form.duration(1000D / engine.getGeneratedPerSecond(), 0))
));
lines.add(IrisLanguage.text(BukkitUiMessages.SCOREBOARD_CACHE, MessageArgument.trusted("count", Form.f(IrisData.cacheSize()))));
lines.add(IrisLanguage.text(BukkitUiMessages.SCOREBOARD_MANTLE, MessageArgument.trusted("count", engine.getMantle().getLoadedRegionCount())));
if (IrisSettings.get().getGeneral().debug) {
lines.add(C.LIGHT_PURPLE + "Carving" + C.GRAY + ": " + (engine.getMantle().getMantle().get(x, y, z, MatterCavern.class) != null));
boolean carving = engine.getMantle().getMantle().get(x, y, z, MatterCavern.class) != null;
lines.add(IrisLanguage.text(
BukkitUiMessages.SCOREBOARD_CARVING,
MessageArgument.trusted("state", IrisLanguage.text(carving ? RuntimeUiMessages.STATUS_TRUE : RuntimeUiMessages.STATUS_FALSE))
));
}
lines.add("&7&m ");
lines.add(C.AQUA + "Region" + C.GRAY + ": " + engine.getRegion(x, z).getName());
lines.add(C.AQUA + "Biome" + C.GRAY + ": " + engine.getBiomeOrMantle(x, y, z).getName());
lines.add(C.AQUA + "Height" + C.GRAY + ": " + Math.round(engine.getHeight(x, z)));
lines.add(C.AQUA + "Slope" + C.GRAY + ": " + Form.f(engine.getComplex().getSlopeStream().get(x, z), 2));
lines.add(C.AQUA + "BUD/s" + C.GRAY + ": " + Form.f(engine.getBlockUpdatesPerSecond()));
lines.add(IrisLanguage.text(BukkitUiMessages.SCOREBOARD_REGION, MessageArgument.untrusted("region", engine.getRegion(x, z).getName())));
lines.add(IrisLanguage.text(BukkitUiMessages.SCOREBOARD_BIOME, MessageArgument.untrusted("biome", engine.getBiomeOrMantle(x, y, z).getName())));
lines.add(IrisLanguage.text(BukkitUiMessages.SCOREBOARD_HEIGHT, MessageArgument.trusted("height", Math.round(engine.getHeight(x, z)))));
lines.add(IrisLanguage.text(BukkitUiMessages.SCOREBOARD_SLOPE, MessageArgument.trusted("slope", Form.f(engine.getComplex().getSlopeStream().get(x, z), 2))));
lines.add(IrisLanguage.text(BukkitUiMessages.SCOREBOARD_BLOCK_UPDATES, MessageArgument.trusted("updates", Form.f(engine.getBlockUpdatesPerSecond()))));
lines.add("&7&m ");
this.lines = lines;
}
@@ -52,6 +52,9 @@ import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
public class ObjectStudioSaveService implements IrisService {
private static ObjectStudioSaveService INSTANCE;
@@ -161,11 +164,11 @@ public class ObjectStudioSaveService implements IrisService {
Player player = event.getPlayer();
GridCell cell = findCellNear(studio, clicked.getX(), clicked.getZ());
if (cell == null) {
player.sendMessage(C.GRAY + "Object Studio: no cell under click (x=" + clicked.getX() + " z=" + clicked.getZ() + ").");
player.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_CELL_UNDER_CLICK_X_Z, MessageArgument.untrusted("x", String.valueOf(clicked.getX())), MessageArgument.untrusted("z", String.valueOf(clicked.getZ()))));
return;
}
player.sendMessage(C.AQUA + "Object Studio: saving " + C.WHITE + cell.pack() + "/" + cell.key() + C.GRAY + " (" + cell.w() + "x" + cell.h() + "x" + cell.d() + ")");
player.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVING_X_X, MessageArgument.untrusted("pack", String.valueOf(cell.pack())), MessageArgument.untrusted("key", String.valueOf(cell.key())), MessageArgument.untrusted("w", String.valueOf(cell.w())), MessageArgument.untrusted("h", String.valueOf(cell.h())), MessageArgument.untrusted("d", String.valueOf(cell.d()))));
IrisLogging.info("Object Studio save triggered by %s for %s/%s", player.getName(), cell.pack(), cell.key());
J.runRegion(world, cell.chunkMinX(), cell.chunkMinZ(), () -> {
try {
@@ -255,7 +258,7 @@ public class ObjectStudioSaveService implements IrisService {
Long prior = studio.hashes.get(hashKey);
if (prior != null && prior == hash) {
if (notify != null) {
notify.sendMessage(C.GRAY + "Object Studio: no changes for " + cell.pack() + "/" + cell.key() + ".");
notify.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_CHANGES, MessageArgument.untrusted("pack", String.valueOf(cell.pack())), MessageArgument.untrusted("key", String.valueOf(cell.key()))));
}
return;
}
@@ -263,7 +266,7 @@ public class ObjectStudioSaveService implements IrisService {
if (!anyBlock && prior == null) {
studio.hashes.put(hashKey, hash);
if (notify != null) {
notify.sendMessage(C.GRAY + "Object Studio: empty cell " + cell.pack() + "/" + cell.key() + " (nothing to write).");
notify.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_EMPTY_CELL_NOTHING_WRITE, MessageArgument.untrusted("pack", String.valueOf(cell.pack())), MessageArgument.untrusted("key", String.valueOf(cell.key()))));
}
return;
}
@@ -273,7 +276,7 @@ public class ObjectStudioSaveService implements IrisService {
File targetFile = objectFileFor(studio, cell);
if (targetFile == null) {
if (notify != null) {
notify.sendMessage(C.RED + "Object Studio: no target file for " + cell.pack() + "/" + cell.key() + ".");
notify.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_NO_TARGET_FILE, MessageArgument.untrusted("pack", String.valueOf(cell.pack())), MessageArgument.untrusted("key", String.valueOf(cell.key()))));
}
return;
}
@@ -288,12 +291,12 @@ public class ObjectStudioSaveService implements IrisService {
IrisLogging.info("Object Studio saved: %s/%s (%dx%dx%d)",
cell.pack(), cell.key(), cell.w(), cell.h(), cell.d());
if (notify != null) {
J.runEntity(notify, () -> notify.sendMessage(C.GREEN + "Object Studio: saved " + C.WHITE + cell.pack() + "/" + cell.key()));
J.runEntity(notify, () -> notify.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVED, MessageArgument.untrusted("pack", String.valueOf(cell.pack())), MessageArgument.untrusted("key", String.valueOf(cell.key())))));
}
} catch (Throwable e) {
IrisLogging.reportError(e);
if (notify != null) {
J.runEntity(notify, () -> notify.sendMessage(C.RED + "Object Studio: save failed for " + cell.pack() + "/" + cell.key() + " (" + e.getMessage() + ")"));
J.runEntity(notify, () -> notify.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.OBJECT_STUDIO_SAVE_SERVICE_OBJECT_STUDIO_SAVE_FAILED, MessageArgument.untrusted("pack", String.valueOf(cell.pack())), MessageArgument.untrusted("key", String.valueOf(cell.key())), MessageArgument.untrusted("error", String.valueOf(e.getMessage())))));
}
}
});
@@ -59,6 +59,9 @@ import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
public class StudioSVC implements IrisService {
public static final String LISTING = "https://raw.githubusercontent.com/IrisDimensions/_listing/main/listing-v2.json";
public static final String WORKSPACE_NAME = "packs";
@@ -137,7 +140,7 @@ public class StudioSVC implements IrisService {
public IrisDimension installIntoWorld(VolmitSender sender, IrisDimension dimension, File folder) {
File target = new File(folder, "iris/pack");
File source = dimension.getLoader().getDataFolder();
sender.sendMessage("Installing Package: " + source.getName() + ":" + dimension.getLoadKey());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_INSTALLING_PACKAGE, MessageArgument.untrusted("name", String.valueOf(source.getName())), MessageArgument.untrusted("loadKey", String.valueOf(dimension.getLoadKey()))));
try {
FileUtils.copyDirectory(source, target);
} catch (IOException e) {
@@ -148,7 +151,7 @@ public class StudioSVC implements IrisService {
}
public IrisDimension installInto(VolmitSender sender, String type, File folder) {
sender.sendMessage("Looking for Package: " + type);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_LOOKING_PACKAGE, MessageArgument.untrusted("type", String.valueOf(type))));
IrisDimension dim = IrisData.loadAnyDimension(type, null);
if (dim == null) {
@@ -156,14 +159,14 @@ public class StudioSVC implements IrisService {
if (workspaceFiles != null) {
for (File i : workspaceFiles) {
if (i.isFile() && i.getName().equals(type + ".iris")) {
sender.sendMessage("Found " + type + ".iris in " + WORKSPACE_NAME + " folder");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FOUND_IRIS_FOLDER, MessageArgument.untrusted("type", String.valueOf(type)), MessageArgument.untrusted("WORKSPACENAME", String.valueOf(WORKSPACE_NAME))));
ZipUtil.unpack(i, folder);
break;
}
}
}
} else {
sender.sendMessage("Found " + type + " dimension in " + WORKSPACE_NAME + " folder. Repackaging");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FOUND_DIMENSION_FOLDER_REPACKAGING, MessageArgument.untrusted("type", String.valueOf(type)), MessageArgument.untrusted("WORKSPACENAME", String.valueOf(WORKSPACE_NAME))));
File f = new IrisProject(new File(getWorkspaceFolder(), type)).getPath();
try {
@@ -204,7 +207,7 @@ public class StudioSVC implements IrisService {
}
if (!dimensionFile.exists() || !dimensionFile.isFile()) {
sender.sendMessage("Can't find the " + dimensionFile.getName() + " in the dimensions folder of this pack! Failed!");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_CAN_T_FIND_DIMENSIONS_FOLDER_THIS_PACK_FAILED, MessageArgument.untrusted("name", String.valueOf(dimensionFile.getName()))));
return null;
}
@@ -213,11 +216,11 @@ public class StudioSVC implements IrisService {
dim = dm.getDimensionLoader().load(type);
if (dim == null) {
sender.sendMessage("Can't load the dimension! Failed!");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_CAN_T_LOAD_DIMENSION_FAILED));
return null;
}
sender.sendMessage(folder.getName() + " type installed. ");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_TYPE_INSTALLED, MessageArgument.untrusted("name", String.valueOf(folder.getName()))));
return dim;
}
@@ -230,8 +233,8 @@ public class StudioSVC implements IrisService {
String url = getListing(false).get(key);
if (url == null) {
sender.sendMessage("Pack '" + key + "' was not found in the pack listing.");
sender.sendMessage("Use /iris download <pack> branch=<branch> to download manually.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_PACK_WAS_NOT_FOUND_PACK_LISTING, MessageArgument.untrusted("key", String.valueOf(key))));
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_USE_IRIS_DOWNLOAD_PACK_BRANCH_BRANCH_DOWNLOAD_MANUALLY));
return;
}
@@ -243,7 +246,7 @@ public class StudioSVC implements IrisService {
} catch (Throwable e) {
IrisLogging.reportError(e);
e.printStackTrace();
sender.sendMessage("Failed to download '" + key + "'.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_DOWNLOAD, MessageArgument.untrusted("key", String.valueOf(key))));
}
}
@@ -256,7 +259,7 @@ public class StudioSVC implements IrisService {
} catch (Throwable e) {
IrisLogging.reportError(e);
e.printStackTrace();
sender.sendMessage("Failed to download the IrisDimensions/overworld beta release.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_DOWNLOAD_IRISDIMENSIONS_OVERWORLD_BETA_RELEASE));
}
}
@@ -266,7 +269,7 @@ public class StudioSVC implements IrisService {
} catch (Throwable e) {
IrisLogging.reportError(e);
e.printStackTrace();
sender.sendMessage("Failed to download '" + repo + "' (branch " + branch + ").");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_DOWNLOAD_BRANCH, MessageArgument.untrusted("repo", String.valueOf(repo)), MessageArgument.untrusted("branch", String.valueOf(branch))));
}
}
@@ -317,7 +320,7 @@ public class StudioSVC implements IrisService {
});
} catch (Exception e) {
IrisLogging.reportError("Failed to open studio world \"" + dimm + "\".", e);
sender.sendMessage("Failed to open studio world: " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD, MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
}
}
@@ -326,11 +329,11 @@ public class StudioSVC implements IrisService {
if (validation == null || validation.isLoadable()) {
return false;
}
sender.sendMessage("Cannot open studio '" + dimm + "' - pack has blocking errors:");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_CANNOT_OPEN_STUDIO_PACK_HAS_BLOCKING_ERRORS, MessageArgument.untrusted("dimm", String.valueOf(dimm))));
for (String reason : validation.getBlockingErrors()) {
sender.sendMessage(" - " + reason);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_MESSAGE, MessageArgument.untrusted("reason", String.valueOf(reason))));
}
sender.sendMessage("Fix the pack and run /iris pack validate " + dimm + " to revalidate.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FIX_PACK_RUN_IRIS_PACK_VALIDATE_REVALIDATE, MessageArgument.untrusted("dimm", String.valueOf(dimm))));
return true;
}
@@ -342,14 +345,14 @@ public class StudioSVC implements IrisService {
pendingClose.whenComplete((closeResult, closeThrowable) -> {
if (closeThrowable != null) {
IrisLogging.reportError("Failed while closing an existing studio project before opening \"" + dimm + "\".", closeThrowable);
J.s(() -> sender.sendMessage("Failed to close the existing studio project: " + closeThrowable.getMessage()));
J.s(() -> sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT, MessageArgument.untrusted("error", String.valueOf(closeThrowable.getMessage())))));
return;
}
if (closeResult != null && closeResult.failureCause() != null) {
Throwable failure = closeResult.failureCause();
IrisLogging.reportError("Failed while closing an existing studio project before opening \"" + dimm + "\".", failure);
J.s(() -> sender.sendMessage("Failed to close the existing studio project: " + failure.getMessage()));
J.s(() -> sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT_2, MessageArgument.untrusted("error", String.valueOf(failure.getMessage())))));
return;
}
@@ -369,7 +372,7 @@ public class StudioSVC implements IrisService {
if (activeProject == project) {
activeProject = null;
}
J.s(() -> sender.sendMessage("Failed to open studio world: " + e.getMessage()));
J.s(() -> sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD_2, MessageArgument.untrusted("error", String.valueOf(e.getMessage())))));
}
});
}
@@ -516,18 +519,18 @@ public class StudioSVC implements IrisService {
}
if (packFiles == null || packFiles.length == 0) {
sender.sendMessage("Couldn't find the pack to create a new dimension from.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_COULDN_T_FIND_PACK_CREATE_NEW_DIMENSION_FROM));
return;
}
File importDimensionFile = new File(importPack, "dimensions/" + downloadable + ".json");
if (!importDimensionFile.exists()) {
sender.sendMessage("Missing Imported Dimension File");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_MISSING_IMPORTED_DIMENSION_FILE));
return;
}
sender.sendMessage("Importing " + downloadable + " into new Project " + s);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_IMPORTING_INTO_NEW_PROJECT, MessageArgument.untrusted("downloadable", String.valueOf(downloadable)), MessageArgument.untrusted("s", String.valueOf(s))));
createFrom(downloadable, s);
if (shouldDelete) {
importPack.delete();
@@ -34,6 +34,9 @@ import java.util.Map;
import java.util.TreeSet;
import java.util.function.Predicate;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
public final class BulkStructureImporter {
public record Report(int total, int imported, int skipped, int failed) {
}
@@ -56,13 +59,13 @@ public final class BulkStructureImporter {
int skipped = 0;
int failed = 0;
sender.sendMessage(C.GREEN + "Importing " + C.WHITE + total + C.GREEN + " vanilla & datapack structures (mode=" + mode + ", includeNonJigsaw=" + includeNonJigsaw + ")...");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_IMPORTING_VANILLA_DATAPACK_STRUCTURES_MODE_INCLUDENONJIGSAW, MessageArgument.untrusted("total", String.valueOf(total)), MessageArgument.untrusted("mode", String.valueOf(mode)), MessageArgument.untrusted("includeNonJigsaw", String.valueOf(includeNonJigsaw))));
for (String keyString : vanilla) {
NamespacedKey nk = NamespacedKey.fromString(keyString.toLowerCase());
if (nk == null) {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": invalid key");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY, MessageArgument.untrusted("keyString", String.valueOf(keyString))));
continue;
}
String name = StructureImporter.deriveName(nk);
@@ -71,7 +74,7 @@ public final class BulkStructureImporter {
VillageImporter.Result jigsaw = VillageImporter.importVillage(data, nk, name, mode);
if (jigsaw.success()) {
imported++;
sender.sendMessage(C.GRAY + "[jigsaw] " + keyString + " -> " + name);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_JIGSAW, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("name", String.valueOf(name))));
continue;
}
@@ -84,15 +87,15 @@ public final class BulkStructureImporter {
StructureImporter.Result single = StructureImporter.importStructure(data, nk, name, mode);
if (single.success()) {
imported++;
sender.sendMessage(C.GRAY + "[single] " + keyString + " -> " + name);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_SINGLE, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("name", String.valueOf(name))));
} else if (single.message() != null && single.message().startsWith("Skipped")) {
skipped++;
} else if (single.message() != null && single.message().contains("No loadable structure NBT")) {
skipped++;
sender.sendMessage(C.YELLOW + "[skip] " + keyString + ": no single-template NBT - vanilla builds this in code or from separate piece templates (imported via the templates pass); nothing to import as one structure.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_SKIP_NO_SINGLE_TEMPLATE_NBT_VANILLA_BUILDS_THIS_CODE_FROM_SEPARATE_PIECE, MessageArgument.untrusted("keyString", String.valueOf(keyString))));
} else {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + single.message());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("message", String.valueOf(single.message()))));
}
continue;
}
@@ -103,16 +106,16 @@ public final class BulkStructureImporter {
}
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + message);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_2, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("message", String.valueOf(message))));
} catch (Throwable e) {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_3, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
}
}
StructureIndexService.write(data);
sender.sendMessage(C.GREEN + "Bulk import complete: " + C.WHITE + imported + C.GREEN + " imported, " + C.WHITE + skipped + C.GREEN + " skipped, " + C.WHITE + failed + C.GREEN + " failed (" + C.WHITE + total + C.GREEN + " total).");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_BULK_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED_TOTAL, MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed)), MessageArgument.untrusted("total", String.valueOf(total))));
return new Report(total, imported, skipped, failed);
}
@@ -128,27 +131,27 @@ public final class BulkStructureImporter {
int skipped = 0;
int failed = 0;
sender.sendMessage(C.GREEN + "Building single-template structures from imported pieces (one variant placed per generation)...");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_BUILDING_SINGLE_TEMPLATE_STRUCTURES_FROM_IMPORTED_PIECES_ONE_VARIANT_PLACED_PER_GENERATION));
for (String[] g : groups) {
try {
StructureImporter.Result result = StructureImporter.importTemplateGroup(data, g[0], g[1], g[2], mode);
if (result.success()) {
imported++;
sender.sendMessage(C.GRAY + "[group] " + g[1] + " -> " + g[0] + " (" + result.blocks() + " variants)");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_GROUP_VARIANTS, MessageArgument.untrusted("value", String.valueOf(g[1])), MessageArgument.untrusted("value2", String.valueOf(g[0])), MessageArgument.untrusted("blocks", String.valueOf(result.blocks()))));
} else if (result.message() != null && result.message().startsWith("Skipped")) {
skipped++;
} else {
skipped++;
sender.sendMessage(C.YELLOW + "[skip] " + g[0] + ": " + result.message());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_SKIP, MessageArgument.untrusted("value", String.valueOf(g[0])), MessageArgument.untrusted("message", String.valueOf(result.message()))));
}
} catch (Throwable e) {
failed++;
sender.sendMessage(C.RED + "[fail] " + g[0] + ": " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_4, MessageArgument.untrusted("value", String.valueOf(g[0])), MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
}
}
StructureIndexService.write(data);
sender.sendMessage(C.GREEN + "Single-template structures: " + C.WHITE + imported + C.GREEN + " built, " + C.WHITE + skipped + C.GREEN + " skipped, " + C.WHITE + failed + C.GREEN + " failed.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_SINGLE_TEMPLATE_STRUCTURES_BUILT_SKIPPED_FAILED, MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed))));
return new Report(groups.length, imported, skipped, failed);
}
@@ -157,7 +160,7 @@ public final class BulkStructureImporter {
try {
templateKeys = enumerateTemplateKeys();
} catch (Throwable e) {
sender.sendMessage(C.RED + "Failed to enumerate structure templates via the server ResourceManager: " + e);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAILED_ENUMERATE_STRUCTURE_TEMPLATES_VIA_SERVER_RESOURCEMANAGER, MessageArgument.untrusted("e", String.valueOf(e))));
return new Report(0, 0, 0, 0);
}
@@ -175,17 +178,17 @@ public final class BulkStructureImporter {
int failed = 0;
if (total == 0) {
sender.sendMessage(C.YELLOW + "No structure templates were found under the 'structure' resource path.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_NO_STRUCTURE_TEMPLATES_WERE_FOUND_UNDER_STRUCTURE_RESOURCE_PATH));
return new Report(0, 0, 0, 0);
}
sender.sendMessage(C.GREEN + "Importing " + C.WHITE + total + C.GREEN + " structure templates (mode=" + mode + ")...");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_IMPORTING_STRUCTURE_TEMPLATES_MODE, MessageArgument.untrusted("total", String.valueOf(total)), MessageArgument.untrusted("mode", String.valueOf(mode))));
for (String keyString : all) {
NamespacedKey nk = NamespacedKey.fromString(keyString.toLowerCase());
if (nk == null) {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": invalid key");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY_2, MessageArgument.untrusted("keyString", String.valueOf(keyString))));
continue;
}
String name = templateNameFor(keyString);
@@ -198,22 +201,22 @@ public final class BulkStructureImporter {
skipped++;
} else {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + result.message());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_5, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("message", String.valueOf(result.message()))));
}
} catch (Throwable e) {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_6, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
}
int processed = imported + skipped + failed;
if (processed % 50 == 0) {
sender.sendMessage(C.GRAY + "..." + processed + "/" + total + " (" + imported + " imported, " + skipped + " skipped, " + failed + " failed)");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_IMPORTED_SKIPPED_FAILED, MessageArgument.untrusted("processed", String.valueOf(processed)), MessageArgument.untrusted("total", String.valueOf(total)), MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed))));
}
}
StructureIndexService.write(data);
sender.sendMessage(C.GREEN + "Template import complete: " + C.WHITE + imported + C.GREEN + " imported, " + C.WHITE + skipped + C.GREEN + " skipped, " + C.WHITE + failed + C.GREEN + " failed (" + C.WHITE + total + C.GREEN + " total).");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_TEMPLATE_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED_TOTAL, MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed)), MessageArgument.untrusted("total", String.valueOf(total))));
return new Report(total, imported, skipped, failed);
}
@@ -233,14 +236,14 @@ public final class BulkStructureImporter {
int failed = 0;
if (total == 0) {
sender.sendMessage(C.YELLOW + "No datapack (non-minecraft) structures are registered. Ingest a datapack and restart first, then run this again.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_NO_DATAPACK_NON_MINECRAFT_STRUCTURES_ARE_REGISTERED_INGEST_DATAPACK_RESTART_FIRST_THEN));
} else {
sender.sendMessage(C.GREEN + "Importing " + C.WHITE + total + C.GREEN + " datapack structures (mode=" + mode + ")...");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_IMPORTING_DATAPACK_STRUCTURES_MODE, MessageArgument.untrusted("total", String.valueOf(total)), MessageArgument.untrusted("mode", String.valueOf(mode))));
for (String keyString : datapack) {
NamespacedKey nk = NamespacedKey.fromString(keyString.toLowerCase());
if (nk == null) {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": invalid key");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_INVALID_KEY_3, MessageArgument.untrusted("keyString", String.valueOf(keyString))));
continue;
}
String name = StructureImporter.deriveName(nk);
@@ -249,7 +252,7 @@ public final class BulkStructureImporter {
VillageImporter.Result jigsaw = VillageImporter.importVillage(data, nk, name, mode);
if (jigsaw.success()) {
imported++;
sender.sendMessage(C.GRAY + "[jigsaw] " + keyString + " -> " + name);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_JIGSAW_2, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("name", String.valueOf(name))));
continue;
}
@@ -258,14 +261,14 @@ public final class BulkStructureImporter {
StructureImporter.Result single = StructureImporter.importStructure(data, nk, name, mode);
if (single.success()) {
imported++;
sender.sendMessage(C.GRAY + "[single] " + keyString + " -> " + name);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_SINGLE_2, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("name", String.valueOf(name))));
} else if (single.message() != null && single.message().startsWith("Skipped")) {
skipped++;
} else if (single.message() != null && single.message().contains("No loadable structure NBT")) {
skipped++;
} else {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + single.message());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_7, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("message", String.valueOf(single.message()))));
}
continue;
}
@@ -276,10 +279,10 @@ public final class BulkStructureImporter {
}
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + message);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_8, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("message", String.valueOf(message))));
} catch (Throwable e) {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_9, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
}
}
}
@@ -294,7 +297,7 @@ public final class BulkStructureImporter {
}
Collections.sort(datapackTemplates);
if (!datapackTemplates.isEmpty()) {
sender.sendMessage(C.GREEN + "Importing " + C.WHITE + datapackTemplates.size() + C.GREEN + " datapack structure templates...");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_IMPORTING_DATAPACK_STRUCTURE_TEMPLATES, MessageArgument.untrusted("size", String.valueOf(datapackTemplates.size()))));
for (String keyString : datapackTemplates) {
NamespacedKey nk = NamespacedKey.fromString(keyString.toLowerCase());
if (nk == null) {
@@ -310,20 +313,20 @@ public final class BulkStructureImporter {
skipped++;
} else {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + result.message());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_10, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("message", String.valueOf(result.message()))));
}
} catch (Throwable e) {
failed++;
sender.sendMessage(C.RED + "[fail] " + keyString + ": " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_FAIL_11, MessageArgument.untrusted("keyString", String.valueOf(keyString)), MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
}
}
}
} catch (Throwable e) {
sender.sendMessage(C.YELLOW + "Could not enumerate datapack templates via the server ResourceManager: " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_COULD_NOT_ENUMERATE_DATAPACK_TEMPLATES_VIA_SERVER_RESOURCEMANAGER, MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
}
StructureIndexService.write(data);
sender.sendMessage(C.GREEN + "Datapack structure import complete: " + C.WHITE + imported + C.GREEN + " imported, " + C.WHITE + skipped + C.GREEN + " skipped, " + C.WHITE + failed + C.GREEN + " failed.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.BULK_STRUCTURE_IMPORTER_DATAPACK_STRUCTURE_IMPORT_COMPLETE_IMPORTED_SKIPPED_FAILED, MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed))));
return new Report(total, imported, skipped, failed);
}
@@ -51,6 +51,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
public final class FeatureImporter {
public record Report(int total, int imported, int skipped, int failed) {
}
@@ -72,11 +75,11 @@ public final class FeatureImporter {
List<Row> rows = parseRows(INMS.get().getObjectFeatureKeys());
int total = rows.size();
if (total == 0) {
sender.sendMessage(C.YELLOW + "No vanilla tree/object features are exposed by the active NMS binding (importing structures only).");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.FEATURE_IMPORTER_NO_VANILLA_TREE_OBJECT_FEATURES_ARE_EXPOSED_BY_ACTIVE_NMS_BINDING_IMPORTING));
return new Report(0, 0, 0, 0);
}
sender.sendMessage(C.GREEN + "Importing " + C.WHITE + total + C.GREEN + " vanilla tree/object features (" + C.WHITE + wantVariants + C.GREEN + " variants each) into a scratch world...");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.FEATURE_IMPORTER_IMPORTING_VANILLA_TREE_OBJECT_FEATURES_VARIANTS_EACH_INTO_SCRATCH_WORLD, MessageArgument.untrusted("total", String.valueOf(total)), MessageArgument.untrusted("wantVariants", String.valueOf(wantVariants))));
World scratch = createScratchWorld(sender);
if (scratch == null) {
@@ -120,27 +123,27 @@ public final class FeatureImporter {
if (written > 0) {
imported++;
sender.sendMessage(C.GRAY + "[obj] " + row.key() + " -> objects/vanilla/" + row.group() + "/" + row.safeName() + " (" + written + ")");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.FEATURE_IMPORTER_OBJ_OBJECTS_VANILLA, MessageArgument.untrusted("key", String.valueOf(row.key())), MessageArgument.untrusted("group", String.valueOf(row.group())), MessageArgument.untrusted("safeName", String.valueOf(row.safeName())), MessageArgument.untrusted("written", String.valueOf(written))));
} else {
skipped++;
sender.sendMessage(C.YELLOW + "[skip] " + row.key() + ": feature placed nothing after retries.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.FEATURE_IMPORTER_SKIP_FEATURE_PLACED_NOTHING_AFTER_RETRIES, MessageArgument.untrusted("key", String.valueOf(row.key()))));
}
} catch (Throwable e) {
failed++;
sender.sendMessage(C.RED + "[fail] " + row.key() + ": " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.FEATURE_IMPORTER_FAIL, MessageArgument.untrusted("key", String.valueOf(row.key())), MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
IrisLogging.reportError(e);
}
int processed = imported + skipped + failed;
if (processed % 25 == 0) {
sender.sendMessage(C.GRAY + "..." + processed + "/" + total + " (" + imported + " imported, " + skipped + " skipped, " + failed + " failed)");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.FEATURE_IMPORTER_IMPORTED_SKIPPED_FAILED, MessageArgument.untrusted("processed", String.valueOf(processed)), MessageArgument.untrusted("total", String.valueOf(total)), MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed))));
}
}
} finally {
destroyScratchWorld(scratch, sender);
}
sender.sendMessage(C.GREEN + "Feature import complete: " + C.WHITE + imported + C.GREEN + " features written, " + C.WHITE + skipped + C.GREEN + " skipped, " + C.WHITE + failed + C.GREEN + " failed (" + C.WHITE + total + C.GREEN + " total).");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.FEATURE_IMPORTER_FEATURE_IMPORT_COMPLETE_FEATURES_WRITTEN_SKIPPED_FAILED_TOTAL, MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed)), MessageArgument.untrusted("total", String.valueOf(total))));
return new Report(total, imported, skipped, failed);
}
@@ -307,7 +310,7 @@ public final class FeatureImporter {
.get();
} catch (Throwable e) {
IrisLogging.reportError(e);
sender.sendMessage(C.RED + "Could not create the scratch world for feature import (" + e.getMessage() + "); skipping the tree/object pass.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.FEATURE_IMPORTER_COULD_NOT_CREATE_SCRATCH_WORLD_FEATURE_IMPORT_SKIPPING_TREE_OBJECT_PASS, MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
return null;
}
}
@@ -35,6 +35,9 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
public final class StructureCaptureImporter {
public record Report(int total, int imported, int skipped, int failed) {
}
@@ -50,7 +53,7 @@ public final class StructureCaptureImporter {
public static Report importAllStructures(IrisData data, StructureImporter.Mode mode, VolmitSender sender) {
StructureImporter.Mode activeMode = mode == null ? StructureImporter.Mode.ADD_ONLY : mode;
if (!INMS.get().supportsStructureCapture()) {
sender.sendMessage(C.YELLOW + "Structure capture is not supported by the active NMS binding; skipping the capture pass.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_STRUCTURE_CAPTURE_IS_NOT_SUPPORTED_BY_ACTIVE_NMS_BINDING_SKIPPING_CAPTURE_PASS));
return new Report(0, 0, 0, 0);
}
@@ -74,11 +77,11 @@ public final class StructureCaptureImporter {
int total = targets.size();
if (total == 0) {
sender.sendMessage(C.GRAY + "No code-generated structures left to capture (everything is already imported as a structure).");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_NO_CODE_GENERATED_STRUCTURES_LEFT_CAPTURE_EVERYTHING_IS_ALREADY_IMPORTED_AS_STRUCTURE));
return new Report(0, 0, 0, 0);
}
sender.sendMessage(C.GREEN + "Capturing " + C.WHITE + total + C.GREEN + " code-generated structures (no NBT template) into a scratch world (skipping any wider/taller than " + MAX_SPAN + " blocks)...");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_CAPTURING_CODE_GENERATED_STRUCTURES_NO_NBT_TEMPLATE_INTO_SCRATCH_WORLD_SKIPPING_ANY, MessageArgument.untrusted("total", String.valueOf(total)), MessageArgument.untrusted("MAXSPAN", String.valueOf(MAX_SPAN))));
World scratch = FeatureImporter.createScratchWorld(sender);
if (scratch == null) {
@@ -97,7 +100,7 @@ public final class StructureCaptureImporter {
IrisObject object = captureOne(scratch, key, cellIndex++);
if (object == null || object.getBlocks().isEmpty()) {
skipped++;
sender.sendMessage(C.YELLOW + "[skip] " + key + ": did not place a capturable structure here (too large, wrong dimension, or no valid placement in a flat world). Stays vanilla-generated.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_SKIP_DID_NOT_PLACE_CAPTURABLE_STRUCTURE_HERE_TOO_LARGE_WRONG_DIMENSION_NO, MessageArgument.untrusted("key", String.valueOf(key))));
continue;
}
object.shrinkwrap();
@@ -105,28 +108,28 @@ public final class StructureCaptureImporter {
data, name, key, object, "CENTER_HEIGHT", activeMode);
if (!result.success()) {
failed++;
sender.sendMessage(C.RED + "[fail] " + key + ": " + result.message());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_FAIL, MessageArgument.untrusted("key", String.valueOf(key)), MessageArgument.untrusted("message", String.valueOf(result.message()))));
continue;
}
imported++;
sender.sendMessage(C.GRAY + "[capture] " + key + " -> objects/" + name + ".iob (" + object.getW() + "x" + object.getH() + "x" + object.getD() + ")");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_CAPTURE_OBJECTS_IOB_X_X, MessageArgument.untrusted("key", String.valueOf(key)), MessageArgument.untrusted("name", String.valueOf(name)), MessageArgument.untrusted("w", String.valueOf(object.getW())), MessageArgument.untrusted("h", String.valueOf(object.getH())), MessageArgument.untrusted("d", String.valueOf(object.getD()))));
} catch (Throwable e) {
failed++;
sender.sendMessage(C.RED + "[fail] " + key + ": " + e.getMessage());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_FAIL_2, MessageArgument.untrusted("key", String.valueOf(key)), MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
IrisLogging.reportError(e);
e.printStackTrace();
}
int processed = imported + skipped + failed;
if (processed % 10 == 0) {
sender.sendMessage(C.GRAY + "..." + processed + "/" + total + " (" + imported + " captured, " + skipped + " skipped, " + failed + " failed)");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_CAPTURED_SKIPPED_FAILED, MessageArgument.untrusted("processed", String.valueOf(processed)), MessageArgument.untrusted("total", String.valueOf(total)), MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed))));
}
}
} finally {
FeatureImporter.destroyScratchWorld(scratch, sender);
}
sender.sendMessage(C.GREEN + "Structure capture complete: " + C.WHITE + imported + C.GREEN + " captured, " + C.WHITE + skipped + C.GREEN + " skipped, " + C.WHITE + failed + C.GREEN + " failed (" + C.WHITE + total + C.GREEN + " total).");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STRUCTURE_CAPTURE_IMPORTER_STRUCTURE_CAPTURE_COMPLETE_CAPTURED_SKIPPED_FAILED_TOTAL, MessageArgument.untrusted("imported", String.valueOf(imported)), MessageArgument.untrusted("skipped", String.valueOf(skipped)), MessageArgument.untrusted("failed", String.valueOf(failed)), MessageArgument.untrusted("total", String.valueOf(total))));
return new Report(total, imported, skipped, failed);
}
@@ -31,6 +31,10 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.volmlib.util.localization.MessageArgument;
public class IrisConverter {
public static void convertSchematics(VolmitSender sender) {
File folder = IrisPlatforms.get().dataFolder("convert");
@@ -38,7 +42,7 @@ public class IrisConverter {
FilenameFilter filter = (dir, name) -> name.endsWith(".schem");
File[] fileList = folder.listFiles(filter);
if (fileList == null) {
sender.sendMessage("No schematic files to convert found in " + folder.getAbsolutePath());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_CONVERTER_NO_SCHEMATIC_FILES_CONVERT_FOUND, MessageArgument.untrusted("path", String.valueOf(folder.getAbsolutePath()))));
return;
}
@@ -76,7 +80,10 @@ public class IrisConverter {
IrisLogging.info(C.GRAY + "- It may take a while");
if (sender.isPlayer()) {
i = J.ar(() -> {
sender.sendProgress((double) v.get() / mv, "Converting");
sender.sendProgress(
(double) v.get() / mv,
IrisLanguage.text(RuntimeUiMessages.CONVERTING)
);
}, 0);
}
}
@@ -117,9 +124,9 @@ public class IrisConverter {
counter.incrementAndGet();
if (sender.isPlayer()) {
if (largeObject) {
sender.sendMessage(C.IRIS + "Converted " + schem.getName() + " -> " + schem.getName().replace(".schem", ".iob") + " in " + Form.duration(p.getMillis()));
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_CONVERTER_CONVERTED, MessageArgument.untrusted("name", String.valueOf(schem.getName())), MessageArgument.untrusted("value", String.valueOf(schem.getName().replace(".schem", ".iob"))), MessageArgument.untrusted("value2", String.valueOf(Form.duration(p.getMillis())))));
} else {
sender.sendMessage(C.IRIS + "Converted " + schem.getName() + " -> " + schem.getName().replace(".schem", ".iob"));
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_CONVERTER_CONVERTED_2, MessageArgument.untrusted("name", String.valueOf(schem.getName())), MessageArgument.untrusted("value", String.valueOf(schem.getName().replace(".schem", ".iob")))));
}
}
if (largeObject) {
@@ -129,22 +136,22 @@ public class IrisConverter {
}
FileUtils.delete(schem);
} catch (IOException e) {
sender.sendMessage(C.RED + "Failed to save: " + schem.getName());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_CONVERTER_FAILED_SAVE, MessageArgument.untrusted("name", String.valueOf(schem.getName()))));
throw new IOException(e);
}
} catch (Exception e) {
sender.sendMessage(C.RED + "Failed to convert: " + schem.getName());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_CONVERTER_FAILED_CONVERT, MessageArgument.untrusted("name", String.valueOf(schem.getName()))));
e.printStackTrace();
}
}
stopwatch.end();
if (counter.get() != 0) {
sender.sendMessage(C.GRAY + "Converted: " + counter.get() + " in " + Form.duration(stopwatch.getMillis()));
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_CONVERTER_CONVERTED_3, MessageArgument.untrusted("get", String.valueOf(counter.get())), MessageArgument.untrusted("value", String.valueOf(Form.duration(stopwatch.getMillis())))));
}
if (counter.get() < fileList.length) {
sender.sendMessage(C.RED + "Some schematics failed to convert. Check the console for details.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_CONVERTER_SOME_SCHEMATICS_FAILED_CONVERT_CHECK_CONSOLE_DETAILS));
}
});
}
@@ -164,4 +171,3 @@ public class IrisConverter {
}
}
@@ -33,6 +33,8 @@ import art.arcane.iris.core.ServerConfigurator;
import art.arcane.iris.core.lifecycle.WorldLifecycleCaller;
import art.arcane.iris.core.lifecycle.WorldLifecycleRequest;
import art.arcane.iris.core.lifecycle.WorldLifecycleService;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeProgressMessages;
import art.arcane.iris.core.nms.INMS;
import art.arcane.iris.core.pregenerator.PregenTask;
import art.arcane.iris.core.service.StudioSVC;
@@ -41,6 +43,7 @@ import art.arcane.iris.engine.platform.PlatformChunkGenerator;
import art.arcane.volmlib.util.exceptions.IrisException;
import art.arcane.iris.util.common.format.C;
import art.arcane.volmlib.util.format.Form;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.iris.util.common.plugin.VolmitSender;
import art.arcane.iris.util.common.scheduling.J;
import art.arcane.volmlib.util.scheduling.FoliaScheduler;
@@ -323,8 +326,10 @@ public class IrisCreator {
private void reportSenderTeleportFailure(Player player, World world, Throwable throwable) {
IrisLogging.reportError("World \"" + world.getName()
+ "\" was created, but automatic teleport failed for player \"" + player.getName() + "\".", throwable);
J.runEntity(player, () -> new VolmitSender(player).sendMessage(C.YELLOW
+ "The world was created, but automatic teleport failed. Try /iris teleport world=" + IrisWorldStorage.logicalName(world)));
J.runEntity(player, () -> new VolmitSender(player).sendMessage(IrisLanguage.text(
RuntimeProgressMessages.WORLD_CREATE_TELEPORT_FAILED,
MessageArgument.untrusted("world", IrisWorldStorage.logicalName(world))
)));
}
private void reportStudioProgress(double progress, String stage) {
@@ -393,11 +398,23 @@ public class IrisCreator {
bar.append(bi < filled ? C.GREEN : C.DARK_GRAY).append("|");
}
bar.append(C.DARK_GRAY).append("]");
sender.sendAction(bar.toString() + C.GRAY + " " + C.YELLOW + percent + "%" + C.DARK_GRAY + " " + Form.f(generated) + "/" + Form.f(required) + " chunks");
sender.sendAction(IrisLanguage.text(
RuntimeProgressMessages.WORLD_CREATE_ACTION,
MessageArgument.trusted("bar", bar.toString()),
MessageArgument.trusted("percent", percent),
MessageArgument.trusted("generated", Form.f(generated)),
MessageArgument.trusted("required", Form.f(required))
));
return;
}
sender.sendMessage(C.GOLD + "Generating " + C.YELLOW + percent + "%" + C.GRAY + " " + Form.f(generated) + "/" + Form.f(required) + " chunks" + C.DARK_GRAY + " (" + remaining + " left)");
sender.sendMessage(IrisLanguage.text(
RuntimeProgressMessages.WORLD_CREATE_CONSOLE,
MessageArgument.trusted("percent", percent),
MessageArgument.trusted("generated", Form.f(generated)),
MessageArgument.trusted("required", Form.f(required)),
MessageArgument.trusted("remaining", remaining)
));
}, interval));
});
return taskId;
@@ -423,11 +440,18 @@ public class IrisCreator {
bar.append(bi < filled ? C.GREEN : C.DARK_GRAY).append("|");
}
bar.append(C.DARK_GRAY).append("]");
sender.sendAction(bar.toString() + C.GRAY + " " + C.YELLOW + percent + "%" + C.GRAY + " | " + C.WHITE + "Pregenerating");
sender.sendAction(IrisLanguage.text(
RuntimeProgressMessages.WORLD_PREGEN_ACTION,
MessageArgument.trusted("bar", bar.toString()),
MessageArgument.trusted("percent", percent)
));
return;
}
sender.sendMessage(C.GOLD + "Pregenerating " + C.YELLOW + percent + "%");
sender.sendMessage(IrisLanguage.text(
RuntimeProgressMessages.WORLD_PREGEN_CONSOLE,
MessageArgument.trusted("percent", percent)
));
}, interval));
return taskId;
}
@@ -60,6 +60,9 @@ import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
/**
* Something you really want to wear if working on Iris. Shit gets pretty hectic down there.
* Hope you packed snacks & road sodas.
@@ -361,7 +364,7 @@ public class IrisToolbelt {
for (World i : Bukkit.getWorlds()) {
if (!WorldIdentity.key(i).equals(WorldIdentity.key(world))) {
for (Player j : new ArrayList<>(world.getPlayers())) {
new VolmitSender(j, BukkitPlatform.volmitPlugin().getTag()).sendMessage("You have been evacuated from this world.");
new VolmitSender(j, BukkitPlatform.volmitPlugin().getTag()).sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_TOOLBELT_YOU_HAVE_BEEN_EVACUATED_FROM_THIS_WORLD));
Location target = i.getSpawnLocation();
Runnable teleportTask = () -> teleportAsyncSafely(j, target);
if (!J.runEntity(j, teleportTask)) {
@@ -391,7 +394,7 @@ public class IrisToolbelt {
for (World i : Bukkit.getWorlds()) {
if (!WorldIdentity.key(i).equals(WorldIdentity.key(world))) {
for (Player j : new ArrayList<>(world.getPlayers())) {
new VolmitSender(j, BukkitPlatform.volmitPlugin().getTag()).sendMessage("You have been evacuated from this world. " + m);
new VolmitSender(j, BukkitPlatform.volmitPlugin().getTag()).sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_TOOLBELT_YOU_HAVE_BEEN_EVACUATED_FROM_THIS_WORLD_2, MessageArgument.untrusted("m", String.valueOf(m))));
Location target = i.getSpawnLocation();
Runnable teleportTask = () -> teleportAsyncSafely(j, target);
if (!J.runEntity(j, teleportTask)) {
@@ -20,8 +20,12 @@ package art.arcane.iris.core.tools;
import art.arcane.iris.core.loader.IrisData;
import art.arcane.iris.core.loader.ResourceLoader;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.iris.engine.object.IrisObject;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.volmlib.util.localization.TextKey;
import java.io.File;
import java.io.IOException;
@@ -86,7 +90,7 @@ public final class TreePlausibilizeBatch {
}
}
public static void run(List<Target> targets, boolean dryRun, int reach, IrisData nearest, Consumer<String> out) {
public static void run(List<Target> targets, boolean dryRun, int reach, IrisData nearest, Consumer<Output> out) {
int processed = 0;
int changed = 0;
int skipped = 0;
@@ -107,7 +111,11 @@ public final class TreePlausibilizeBatch {
try {
IrisObject o = load(t, nearest);
if (o == null) {
out.accept("skip " + t.key() + ": failed to load");
out.accept(output(
RuntimeUiMessages.TREE_SKIP_LOAD,
false,
MessageArgument.untrusted("object", t.key())
));
skipped++;
continue;
}
@@ -135,27 +143,74 @@ public final class TreePlausibilizeBatch {
totalUnreachableAfter += r.unreachableAfter();
if (r.mutated() || targets.size() == 1) {
out.accept(t.key() + ": +" + r.woodPlaced() + " wood (" + r.branchesGrown() + " branches), "
+ r.leavesConvertedToWood() + " leaves->wood, ~" + r.distancesRewritten() + " distances"
+ (r.leavesPinnedPersistent() > 0 ? ", !" + r.leavesPinnedPersistent() + " pinned" : ""));
if (r.leavesPinnedPersistent() > 0) {
out.accept(output(
RuntimeUiMessages.TREE_RESULT_PINNED,
false,
MessageArgument.untrusted("object", t.key()),
MessageArgument.trusted("wood", r.woodPlaced()),
MessageArgument.trusted("branches", r.branchesGrown()),
MessageArgument.trusted("converted", r.leavesConvertedToWood()),
MessageArgument.trusted("distances", r.distancesRewritten()),
MessageArgument.trusted("pinned", r.leavesPinnedPersistent())
));
} else {
out.accept(output(
RuntimeUiMessages.TREE_RESULT,
false,
MessageArgument.untrusted("object", t.key()),
MessageArgument.trusted("wood", r.woodPlaced()),
MessageArgument.trusted("branches", r.branchesGrown()),
MessageArgument.trusted("converted", r.leavesConvertedToWood()),
MessageArgument.trusted("distances", r.distancesRewritten())
));
}
}
if (targets.size() > 1 && index % progressStep == 0) {
out.accept("[" + index + "/" + targets.size() + "]");
out.accept(output(
RuntimeUiMessages.TREE_PROGRESS,
true,
MessageArgument.trusted("current", index),
MessageArgument.trusted("total", targets.size())
));
}
} catch (Throwable e) {
out.accept("fail " + t.key() + ": " + e.getClass().getSimpleName() + ": " + e.getMessage());
out.accept(output(
RuntimeUiMessages.TREE_FAILED,
false,
MessageArgument.untrusted("object", t.key()),
MessageArgument.untrusted("type", e.getClass().getSimpleName()),
MessageArgument.untrusted("error", String.valueOf(e.getMessage()))
));
IrisLogging.reportError(e);
failed++;
}
}
out.accept("Done: " + processed + " processed, " + changed + " changed, "
+ skipped + " skipped, " + failed + " failed"
+ (dryRun ? " (dry run, nothing written)" : ""));
out.accept("Totals: +" + totalWood + " wood (" + totalBranches + " branches), "
+ totalConverted + " leaves->wood, ~" + totalRewritten + " distances, !"
+ totalPinned + " pinned, unreachable " + totalUnreachableBefore + " -> " + totalUnreachableAfter);
out.accept(output(
dryRun ? RuntimeUiMessages.TREE_DONE_DRY : RuntimeUiMessages.TREE_DONE,
true,
MessageArgument.trusted("processed", processed),
MessageArgument.trusted("changed", changed),
MessageArgument.trusted("skipped", skipped),
MessageArgument.trusted("failed", failed)
));
out.accept(output(
RuntimeUiMessages.TREE_TOTALS,
true,
MessageArgument.trusted("wood", totalWood),
MessageArgument.trusted("branches", totalBranches),
MessageArgument.trusted("converted", totalConverted),
MessageArgument.trusted("distances", totalRewritten),
MessageArgument.trusted("pinned", totalPinned),
MessageArgument.trusted("before", totalUnreachableBefore),
MessageArgument.trusted("after", totalUnreachableAfter)
));
}
private static Output output(TextKey key, boolean headline, MessageArgument... arguments) {
return new Output(IrisLanguage.plain(key, arguments), headline);
}
private static IrisObject load(Target t, IrisData nearest) throws IOException {
@@ -167,4 +222,7 @@ public final class TreePlausibilizeBatch {
}
return IrisData.loadAnyObject(t.key(), nearest);
}
public record Output(String text, boolean headline) {
}
}
@@ -18,6 +18,9 @@
package art.arcane.iris.engine;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.ClientUiMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.framework.EngineEffects;
import art.arcane.iris.engine.framework.EngineEffectsProvider;
@@ -72,6 +75,7 @@ import art.arcane.volmlib.util.format.Form;
import art.arcane.iris.util.project.hunk.Hunk;
import art.arcane.volmlib.util.io.IO;
import art.arcane.volmlib.util.mantle.flag.MantleFlag;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.volmlib.util.math.M;
import art.arcane.volmlib.util.math.RNG;
import art.arcane.volmlib.util.matter.MatterStructurePOI;
@@ -755,8 +759,8 @@ public class IrisEngine implements Engine {
protocolServer.broadcastStudioHotload(packKey, 0, failed, message);
protocolServer.broadcastToast(
failed ? IrisMessage.Toast.KIND_ERROR : IrisMessage.Toast.KIND_SUCCESS,
"Studio Hotload",
failed ? packKey + " failed" : packKey);
IrisLanguage.plain(ClientUiMessages.TOAST_STUDIO_HOTLOAD),
failed ? IrisLanguage.plain(ClientUiMessages.TOAST_PACK_FAILED, MessageArgument.untrusted("pack", packKey)) : packKey);
}
@Override
@@ -906,20 +910,20 @@ public class IrisEngine implements Engine {
weights.put(i, weights.get(i) / v);
}
sender.sendMessage("Total: " + C.BOLD + C.WHITE + Form.duration(masterWallClock, 0));
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_ENGINE_TOTAL, MessageArgument.untrusted("value", String.valueOf(Form.duration(masterWallClock, 0)))));
for (String i : totals.k()) {
sender.sendMessage(" Engine " + C.UNDERLINE + C.GREEN + i + C.RESET + ": " + C.BOLD + C.WHITE + Form.duration(totals.get(i), 0));
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_ENGINE_ENGINE, MessageArgument.untrusted("i", String.valueOf(i)), MessageArgument.untrusted("value", String.valueOf(Form.duration(totals.get(i), 0)))));
}
sender.sendMessage("Details: ");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_ENGINE_DETAILS));
for (String i : weights.sortKNumber().reverse()) {
String befb = C.UNDERLINE + "" + C.GREEN + "" + i.split("\\Q[\\E")[0] + C.RESET + C.GRAY + "[";
String num = C.GOLD + i.split("\\Q[\\E")[1].split("]")[0] + C.RESET + C.GRAY + "].";
String afb = C.ITALIC + "" + C.AQUA + i.split("\\Q]\\E")[1].substring(1) + C.RESET + C.GRAY;
sender.sendMessage(" " + befb + num + afb + ": " + C.BOLD + C.WHITE + Form.pc(weights.get(i), 0));
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.IRIS_ENGINE_MESSAGE, MessageArgument.untrusted("befb", String.valueOf(befb)), MessageArgument.untrusted("num", String.valueOf(num)), MessageArgument.untrusted("afb", String.valueOf(afb)), MessageArgument.untrusted("value", String.valueOf(Form.pc(weights.get(i), 0)))));
}
}
@@ -18,6 +18,8 @@
package art.arcane.iris.engine;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.iris.platform.bukkit.BukkitWorldBinding;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.core.gui.PregeneratorJob;
@@ -1104,7 +1106,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
@Override
public String getName() {
return "Loading Chunks";
return IrisLanguage.text(RuntimeUiMessages.JOB_LOADING_CHUNKS);
}
}.queue(futures).execute(new VolmitSender(player), true, r);
}));
@@ -18,6 +18,8 @@
package art.arcane.iris.engine.framework;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.iris.platform.bukkit.BukkitWorldBinding;
import art.arcane.iris.platform.bukkit.BukkitPlatform;
import art.arcane.iris.core.events.IrisEngineHotloadEvent;
@@ -92,7 +94,7 @@ public abstract class EngineAssignedWorldManager extends EngineAssignedComponent
for (Player i : BukkitWorldBinding.players(e.getEngine().getWorld())) {
i.playSound(i.getLocation(), Sound.BLOCK_AMETHYST_BLOCK_BREAK, 1f, 1.8f);
VolmitSender s = new VolmitSender(i);
s.sendTitle(C.IRIS + "Engine " + C.AQUA + "<font:minecraft:uniform>Hotloaded", 70, 60, 410);
s.sendTitle(C.IRIS + "<font:minecraft:uniform>" + IrisLanguage.text(RuntimeUiMessages.ENGINE_HOTLOADED), 70, 60, 410);
}
});
}
@@ -18,6 +18,8 @@
package art.arcane.iris.engine.object;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.iris.core.loader.IrisData;
import art.arcane.iris.core.loader.IrisRegistrant;
import art.arcane.iris.engine.data.cache.AtomicCache;
@@ -449,7 +451,7 @@ public class IrisObject extends IrisRegistrant {
@Override
public String getName() {
return "Saving Object";
return IrisLanguage.text(RuntimeUiMessages.JOB_SAVING_OBJECT);
}
@Override
@@ -86,6 +86,10 @@ import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import java.util.function.Predicate;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.volmlib.util.localization.MessageArgument;
public final class EngineBukkitOps {
private static final ConcurrentHashMap<UUID, CompletableFuture<Position2>> ACTIVE_LOCATE_REQUESTS = new ConcurrentHashMap<>();
@@ -541,7 +545,7 @@ public final class EngineBukkitOps {
public static void gotoRegion(Engine engine, IrisRegion r, Player player, boolean teleport) {
if (!engine.getDimension().getRegions().contains(r.getLoadKey())) {
player.sendMessage(C.RED + r.getName() + " is not defined in the dimension!");
player.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.ENGINE_BUKKIT_OPS_IS_NOT_DEFINED_DIMENSION, MessageArgument.untrusted("name", String.valueOf(r.getName()))));
return;
}
@@ -559,14 +563,14 @@ public final class EngineBukkitOps {
private static void find(Engine engine, Locator<?> locator, Player player, boolean teleport, String message) {
find(engine, locator, player, 120_000, location -> {
if (location == null) {
player.sendMessage(C.RED + "Could not find " + message + " within search range.");
player.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.ENGINE_BUKKIT_OPS_COULD_NOT_FIND_WITHIN_SEARCH_RANGE, MessageArgument.untrusted("message", String.valueOf(message))));
return;
}
if (teleport) {
J.runEntity(player, () -> teleportAsyncSafely(player, location));
player.sendMessage(C.GREEN + "Teleporting to " + message + "...");
player.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.ENGINE_BUKKIT_OPS_TELEPORTING, MessageArgument.untrusted("message", String.valueOf(message))));
} else {
player.sendMessage(C.GREEN + message + " at: " + location.getBlockX() + " " + location.getBlockY() + " " + location.getBlockZ());
player.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.ENGINE_BUKKIT_OPS_AT, MessageArgument.untrusted("message", String.valueOf(message)), MessageArgument.untrusted("blockX", String.valueOf(location.getBlockX())), MessageArgument.untrusted("blockY", String.valueOf(location.getBlockY())), MessageArgument.untrusted("blockZ", String.valueOf(location.getBlockZ()))));
}
});
}
@@ -578,7 +582,7 @@ public final class EngineBukkitOps {
Location origin = player.getLocation();
int originChunkX = origin.getBlockX() >> 4;
int originChunkZ = origin.getBlockZ() >> 4;
new SingleJob("Searching", () -> {
new SingleJob(IrisLanguage.text(RuntimeUiMessages.JOB_SEARCHED_CHUNKS, MessageArgument.trusted("chunks", 0)), () -> {
CompletableFuture<Position2> search = null;
boolean resultDispatched = false;
UUID playerId = player.getUniqueId();
@@ -619,7 +623,10 @@ public final class EngineBukkitOps {
}) {
@Override
public String getName() {
return "Searched " + Form.f(checks.get()) + " Chunks";
return IrisLanguage.text(
RuntimeUiMessages.JOB_SEARCHED_CHUNKS,
MessageArgument.trusted("chunks", Form.f(checks.get()))
);
}
@Override
@@ -28,6 +28,9 @@ import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.Comparator;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
/**
* Represents a pawn command
*
@@ -92,11 +95,11 @@ public abstract class MortarCommand implements ICommand {
b = true;
sender.sendMessage("" + C.GREEN + i.getNode() + " " + "<font:minecraft:uniform>" + (getArgsUsage().trim().isEmpty() ? "" : (C.WHITE + i.getArgsUsage())) + C.GRAY + " - " + i.getDescription());
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.MORTAR_COMMAND_FONT_MINECRAFT_UNIFORM, MessageArgument.untrusted("node", String.valueOf(i.getNode())), MessageArgument.untrusted("value", String.valueOf((getArgsUsage().trim().isEmpty() ? "" : (C.WHITE + i.getArgsUsage())))), MessageArgument.untrusted("description", String.valueOf(i.getDescription()))));
}
if (!b) {
sender.sendMessage("There are either no sub-commands or you do not have permission to use them.");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.MORTAR_COMMAND_THERE_ARE_EITHER_NO_SUB_COMMANDS_YOU_DO_NOT_HAVE_PERMISSION_USE));
}
if (sender.isPlayer() && IrisSettings.get().getGeneral().isCommandSounds()) {
@@ -145,7 +148,7 @@ public abstract class MortarCommand implements ICommand {
}
if (!m.toString().trim().isEmpty()) {
sender.sendMessage("Parameters Ignored: " + m);
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.MORTAR_COMMAND_PARAMETERS_IGNORED, MessageArgument.untrusted("m", String.valueOf(m))));
}
}
}
@@ -30,6 +30,9 @@ import org.bukkit.command.CommandSender;
import java.lang.reflect.Field;
import art.arcane.iris.core.localization.BukkitRuntimeMessages;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.volmlib.util.localization.MessageArgument;
/**
* Represents a virtual command. A chain of iterative processing through
* subcommands.
@@ -171,12 +174,12 @@ public class VirtualCommand {
for (String i : command.getRequiredPermissions()) {
if (!sender.hasPermission(i)) {
failed = true;
J.s(() -> sender.sendMessage("- " + C.WHITE + i), 0);
J.s(() -> sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.VIRTUAL_COMMAND_MESSAGE, MessageArgument.untrusted("i", String.valueOf(i)))), 0);
}
}
if (failed) {
sender.sendMessage("Insufficient Permissions");
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.VIRTUAL_COMMAND_INSUFFICIENT_PERMISSIONS));
return false;
}
@@ -18,18 +18,13 @@
package art.arcane.iris.util.common.plugin;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.spi.IrisPlatforms;
import art.arcane.iris.platform.bukkit.BukkitPlatform;
import art.arcane.iris.core.IrisSettings;
import art.arcane.volmlib.util.collection.KList;
import art.arcane.volmlib.util.collection.KMap;
import art.arcane.volmlib.util.director.visual.DirectorVisualCommand;
import art.arcane.volmlib.util.director.visual.DirectorVisualCommand.DirectorVisualParameter;
import art.arcane.iris.util.common.format.C;
import art.arcane.volmlib.util.format.Form;
import art.arcane.volmlib.util.math.M;
import art.arcane.volmlib.util.math.RNG;
import art.arcane.iris.util.common.scheduling.J;
import lombok.Getter;
import lombok.Setter;
@@ -63,8 +58,6 @@ import java.util.concurrent.atomic.AtomicReference;
* @author cyberpwn
*/
public class VolmitSender implements CommandSender {
@Getter
private static final KMap<String, String> helpCache = new KMap<>();
private final CommandSender s;
private String tag;
@Getter
@@ -519,192 +512,6 @@ public class VolmitSender implements CommandSender {
return s.spigot();
}
private String pickRandoms(int max, DirectorVisualCommand i) {
KList<String> m = new KList<>();
for (int ix = 0; ix < max; ix++) {
m.add((i.isNode()
? (i.getNode().getParameters().isNotEmpty())
? "<#c2f7d2>✦ <#5ef288>"
+ i.getParentPath()
+ " <#32bfad>"
+ i.getName() + " "
+ i.getNode().getParameters().shuffleCopy(RNG.r).convert((f)
-> (f.isRequired() || RNG.r.b(0.5)
? "<#f2e15e>" + f.getNames().getRandom() + "="
+ "<#5ef288>" + f.example()
: ""))
.toString(" ")
: ""
: ""));
}
return m.removeDuplicates().convert((iff) -> iff.replaceAll("\\Q \\E", " ")).toString("\n");
}
static String escapeMiniMessageQuotedText(String text) {
return text.replace("\\", "\\\\").replace("'", "\\'");
}
public void sendHeader(String name, int overrideLength) {
int len = overrideLength;
int h = name.length() + 2;
String s = Form.repeat(" ", len - h - 4);
String si = Form.repeat("(", 3);
String so = Form.repeat(")", 3);
String sf = "[";
String se = "]";
if (name.trim().isEmpty()) {
sendMessageRaw("<font:minecraft:uniform><strikethrough><gradient:#34eb6b:#32bfad>" + sf + s + "<reset><font:minecraft:uniform><strikethrough><gradient:#32bfad:#34eb6b>" + s + se);
} else {
sendMessageRaw("<font:minecraft:uniform><strikethrough><gradient:#34eb6b:#32bfad>" + sf + s + si + "<reset> <gradient:#32bfad:#34eb6b>" + name + "<reset> <font:minecraft:uniform><strikethrough><gradient:#32bfad:#34eb6b>" + so + s + se);
}
}
public void sendHeader(String name) {
sendHeader(name, 44);
}
public void sendDirectorHelp(DirectorVisualCommand v) {
sendDirectorHelp(v, 0);
}
public void sendDirectorHelp(DirectorVisualCommand v, int page) {
if (!isPlayer()) {
for (DirectorVisualCommand i : v.getNodes()) {
sendDirectorHelpNode(i);
}
return;
}
sendMessageRaw("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
if (v.getNodes().isNotEmpty()) {
sendHeader(v.getPath() + (page > 0 ? (" {" + (page + 1) + "}") : ""));
if (isPlayer() && v.getParent() != null) {
String backHover = escapeMiniMessageQuotedText("<#2b7a3f>Click to go back to <#32bfad>" + Form.capitalize(v.getParent().getName()) + " Help");
sendMessageRaw("<hover:show_text:'" + backHover + "'><click:run_command:" + v.getParent().getPath() + "><font:minecraft:uniform><#6fe98f>〈 Back</click></hover>");
}
AtomicBoolean next = new AtomicBoolean(false);
for (DirectorVisualCommand i : paginate(v.getNodes(), 17, page, next)) {
sendDirectorHelpNode(i);
}
String s = "";
int l = 75 - (page > 0 ? 10 : 0) - (next.get() ? 10 : 0);
if (page > 0) {
String previousPageHover = escapeMiniMessageQuotedText("<green>Click to go back to page " + page);
s += "<hover:show_text:'" + previousPageHover + "'><click:run_command:" + v.getPath() + " help=" + page + "><gradient:#34eb6b:#1f8f4d>〈 Page " + page + "</click></hover><reset> ";
}
s += "<reset><font:minecraft:uniform><strikethrough><gradient:#32bfad:#34eb6b>" + Form.repeat(" ", l) + "<reset>";
if (next.get()) {
String nextPageHover = escapeMiniMessageQuotedText("<green>Click to go to back to page " + (page + 2));
s += " <hover:show_text:'" + nextPageHover + "'><click:run_command:" + v.getPath() + " help=" + (page + 2) + "><gradient:#1f8f4d:#34eb6b>Page " + (page + 2) + " ❭</click></hover>";
}
sendMessageRaw(s);
} else {
sendMessage(C.RED + "There are no subcommands in this group! Contact support, this is a command design issue!");
}
}
public void sendDirectorHelpNode(DirectorVisualCommand i) {
if (isPlayer() || s instanceof CommandDummy) {
sendMessageRaw(helpCache.computeIfAbsent(i.getPath(), (k) -> {
String newline = "<reset>\n";
String realText = i.getPath() + " >" + "<#46826a>⇀<gradient:#5ef288:#32bfad> " + i.getName();
String hoverTitle = i.getNames().copy().reverse().convert((f) -> "<#5ef288>" + f).toString(", ");
String description = "<#3fe05a>✎ <#6ad97d><font:minecraft:uniform>" + i.getDescription();
String usage = "<#bbe03f>✒ <#a8e0a2><font:minecraft:uniform>";
String onClick;
if (i.isNode()) {
if (i.getNode().getParameters().isEmpty()) {
usage += "There are no parameters. Click to type command.";
onClick = "suggest_command";
} else {
usage += "Hover over all of the parameters to learn more.";
onClick = "suggest_command";
}
} else {
usage += "This is a command category. Click to run.";
onClick = "run_command";
}
String suggestion = "";
String suggestions = "";
if (i.isNode() && i.getNode().getParameters().isNotEmpty()) {
suggestion += newline + "<#c2f7d2>✦ <#5ef288><font:minecraft:uniform>" + i.getParentPath() + " <#32bfad>" + i.getName() + " "
+ i.getNode().getParameters().convert((f) -> "<#5ef288>" + f.example()).toString(" ");
suggestions += newline + "<font:minecraft:uniform>" + pickRandoms(Math.min(i.getNode().getParameters().size() + 1, 5), i);
}
StringBuilder nodes = new StringBuilder();
if (i.isNode()) {
for (DirectorVisualParameter p : i.getNode().getParameters()) {
String nTitle = "<gradient:#5ef288:#32bfad>" + p.getName();
String nHoverTitle = p.getNames().convert((ff) -> "<#5ef288>" + ff).toString(", ");
String nDescription = "<#3fe05a>✎ <#6ad97d><font:minecraft:uniform>" + p.getDescription();
String nUsage;
String fullTitle;
IrisLogging.debug("Contextual: " + p.isContextual() + " / player: " + isPlayer());
if (p.isContextual() && (isPlayer() || s instanceof CommandDummy)) {
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 = "<#3fbe6f>✔ <#9de5b6><font:minecraft:uniform>Defaults to \"" + p.getParam().defaultValue() + "\" if undefined.";
} else {
fullTitle = "<#4f4f4f>⊰" + nTitle + "<#4f4f4f>⊱";
nUsage = "<#3fbe6f>✔ <#9de5b6><font:minecraft:uniform>This parameter is optional.";
}
String type = "<#4fbf7f>✢ <#8ad9af><font:minecraft:uniform>This parameter is of type " + p.getType().getSimpleName() + ".";
String parameterHover = escapeMiniMessageQuotedText(nHoverTitle + newline + nDescription + newline + nUsage + newline + type);
nodes
.append("<hover:show_text:'")
.append(parameterHover)
.append("'>")
.append(fullTitle)
.append("</hover>");
}
} else {
nodes = new StringBuilder("<gradient:#b7eecb:#9de5b6> - Category of Commands");
}
String entryHover = escapeMiniMessageQuotedText(
hoverTitle + newline +
description + newline +
usage +
suggestion +
suggestions
);
return "<hover:show_text:'" +
entryHover +
"'>" +
"<click:" +
onClick +
":" +
realText +
"</click>" +
"</hover>" +
" " +
nodes;
}));
} else {
sendMessage(i.getPath());
}
}
public void playSound(Sound sound, float volume, float pitch) {
if (isPlayer()) {
player().playSound(player().getLocation(), sound, volume, pitch);
@@ -18,6 +18,8 @@
package art.arcane.iris.util.common.scheduling.jobs;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.volmlib.util.network.DL;
import art.arcane.volmlib.util.network.DownloadMonitor;
@@ -50,7 +52,7 @@ public class DownloadJob implements Job {
@Override
public String getName() {
return "Downloading";
return IrisLanguage.text(RuntimeUiMessages.JOB_DOWNLOADING);
}
@Override
@@ -18,8 +18,11 @@
package art.arcane.iris.util.common.scheduling.jobs;
import art.arcane.iris.core.localization.IrisLanguage;
import art.arcane.iris.core.localization.RuntimeUiMessages;
import art.arcane.iris.util.common.format.C;
import art.arcane.volmlib.util.format.Form;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.iris.util.common.plugin.VolmitSender;
import art.arcane.iris.util.common.scheduling.J;
import art.arcane.volmlib.util.scheduling.PrecisionStopwatch;
@@ -73,7 +76,11 @@ public interface Job {
f.whenComplete((fs, ff) -> {
J.car(c);
if (!silentMsg) {
sender.sendMessage(C.AQUA + "Completed " + getName() + " in " + Form.duration(p.getMilliseconds(), 1));
sender.sendMessage(C.AQUA + IrisLanguage.text(
RuntimeUiMessages.JOB_COMPLETED,
MessageArgument.untrusted("job", getName()),
MessageArgument.trusted("duration", Form.duration(p.getMilliseconds(), 1))
));
}
whenComplete.run();
});
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -10,6 +10,7 @@ public class PaperLibBootstrapTest {
public void isModernVersionSchemeAcceptsMajorVersionAboveOne() {
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.2-R0.1-SNAPSHOT"));
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.2"));
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.2.build.2614-stable"));
assertTrue(PaperLibBootstrap.isModernVersionScheme("27.0.0-R0.1-SNAPSHOT"));
}
@@ -0,0 +1,576 @@
package art.arcane.iris.core.localization;
import art.arcane.volmlib.util.localization.MessageArgument;
import art.arcane.volmlib.util.localization.LocaleOverlay;
import art.arcane.volmlib.util.localization.LocalizationValidationResult;
import art.arcane.volmlib.util.localization.LocalizationValidator;
import art.arcane.volmlib.util.localization.LinesValue;
import art.arcane.volmlib.util.localization.MessageKey;
import art.arcane.volmlib.util.localization.MessageValue;
import art.arcane.volmlib.util.localization.PluralValue;
import art.arcane.volmlib.util.localization.TextValue;
import art.arcane.volmlib.util.localization.VolmitLocales;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public class IrisLanguageTest {
private static final Pattern PLACEHOLDER = Pattern.compile("\\{[A-Za-z][A-Za-z0-9_]*}");
private static final Pattern COLOR_CODE = Pattern.compile("(?i)(?:§|&)[0-9A-FK-ORX]");
private static final Pattern MINI_MESSAGE_TAG = Pattern.compile("<[^<>\\n]+>");
private static final Pattern URL = Pattern.compile("\\b[a-z][a-z0-9+.-]*://\\S+");
private static final Pattern COMMAND = Pattern.compile(
"/iris(?:\\s|$).*?(?=(?:\\s+(?:to|for|from|when|or)\\s+)|(?:\\s+(?:first|again)\\b)|[.;,)\\n]|$)"
+ "|/execute(?:\\s|$)[^.;,)\\n]*"
);
private static final Pattern IDENTIFIER = Pattern.compile(
"\\b[a-z][a-z0-9_]*:[a-z0-9_./{}-]+\\b"
+ "|(?:\\*/)?(?:plugins|world|objects|dimensions|structures|jigsaw-pieces|jigsaw-pools|packs|dump|config|assets|data)(?:/[A-Za-z0-9_*{}.-]*[A-Za-z0-9_*{}-])+/?"
+ "|\\b[A-Za-z0-9_*{}.-]+\\.(?:json|toml|ya?ml|jar|nbt|iob|properties|log|zip)\\b"
);
private static final Pattern PROPER_NAME = Pattern.compile(
"\\b(?:IrisDimensions|Iris|Minecraft|CraftBukkit|Bukkit|Paper|Folia|Fabric|NeoForge|Forge|Modrinth|GitHub|VSCode|Brigadier|Mantle|MiniMessage|Adventure|Sentry|NMS|NBT|JSON|TOML|YAML|GUI|HUD|TPS|MSPT|FPS|CPU|GPU|RAM|JAR|API|UUID|BUD|ETA|HD|LQ|ms)\\b"
);
private static final List<String> IRIS_PRODUCT_NAMES = List.of(
"Iris Vision",
"Object Studio",
"Noise Explorer",
"Volmit Software",
"WorldEdit",
"ResourceManager",
"GoldenHash",
"IGenData",
"Sentry",
"TectonicPlates"
);
private static final Pattern MARKER_DEBRIS = Pattern.compile("(?:⟬|⟭|\\b(?:XQ|QZ)[A-Z0-9_]*\\b|[\\uE000-\\uF8FF])");
private static final Pattern MOJIBAKE = Pattern.compile("(?:Ã[©¨ªº§³´¼¶¢£¥]|Â[©®°±·«» ]|â(?:€|€™|€œ|€|€“|€”|€¦)|ðŸ)");
private static final Pattern CONTROL_CHARACTER = Pattern.compile("[\\p{Cc}&&[^\\n\\r\\t]]");
private static final Pattern WORD = Pattern.compile(
"[\\p{L}\\p{N}_]+"
);
private static final List<Pattern> REQUIRED_LITERAL_PATTERNS = List.of(
MINI_MESSAGE_TAG,
URL,
COMMAND,
IDENTIFIER,
PROPER_NAME
);
private static final Map<String, Pattern> FORBIDDEN_TRANSLATION_ARTIFACTS = Map.ofEntries(
Map.entry("es_ES", Pattern.compile("(?iu)\\b(?:Pónganse|sdatapackImports|TectonicPlates Conde|Iris World Director|FED 7)\\b")),
Map.entry("fr_FR", Pattern.compile("(?iu)\\b(?:sentinelle|groupe électrogène|Iris Directeur mondial|FED 7)\\b")),
Map.entry("he_IL", Pattern.compile("וניל")),
Map.entry("it_IT", Pattern.compile("(?iu)\\bMonolocale\\b")),
Map.entry("ja-JP", Pattern.compile("お問い合わせ|返品について|データパックの摂取|構成されたdatapackの輸入|§a通信|§7ログイン|包装次元|バリアフリー Iris|第一次世界|サイトマップ|コンタクトサポート|新着情報|生物医学|プレジェント|パユース|ドーワン|フィードバック|簡体中文|ジャグジー")),
Map.entry("ko_KR", Pattern.compile("회사연혁|사이트맵|뚱 베어|페이스 북|스페인 사람|이름 \\*|관련 기사|지원하다|이 모수|내 계정|세계 가족|스타트 낙하|견적 요청|포장 차원|세계 시장|제품\\s*정보|기타\\s*제품|₢")),
Map.entry("lt_LT", Pattern.compile("(?iu)\\b(?:vanilė|vanilės)\\b")),
Map.entry("fi_FI", Pattern.compile("(?iu)\\bYksiö\\b")),
Map.entry("nl_NL", Pattern.compile("(?iu)\\b(?:StudioName|Vanille)\\b")),
Map.entry("pl_PL", Pattern.compile("(?iu)\\bwanili[\\p{L}]*\\b")),
Map.entry("ru_RU", Pattern.compile("(?iu)\\bванил[\\p{L}]*\\b")),
Map.entry("tr_TR", Pattern.compile("(?iu)Studio\\s+Stüdyo|\\bvanilya\\b")),
Map.entry("zh_CN", Pattern.compile("香草|虹膜|艾里斯|爱丽丝|地幔|包装|发电机|装入|卸货|包子|快跑 /iris")),
Map.entry("zh_TW", Pattern.compile("香草|虹膜|艾里斯|愛麗絲|地幔|包裝|包装|發電機|发电机|裝入|装入|卸貨|卸货|解除安裝|包子|快跑 /iris"))
);
private static final String STRUCTURAL_CHARACTERS = "%\\[]{}<>\n";
@Rule
public TemporaryFolder temporaryFolder = new TemporaryFolder();
private File dataFolder;
@Before
public void setUp() throws Exception {
dataFolder = temporaryFolder.newFolder();
assertTrue(IrisLanguage.reload(dataFolder, "en_US"));
}
@After
public void tearDown() {
assertTrue(IrisLanguage.reload(dataFolder, "en_US"));
}
@Test
public void usesCodeOwnedEnglishWithoutLocaleFile() {
String rendered = IrisLanguage.plain(
IrisMessages.COMMAND_PERMISSION_DENIED,
MessageArgument.untrusted("permission", "iris.all")
);
assertEquals("You lack the permission 'iris.all'", rendered);
assertEquals("en_US", IrisLanguage.activeLocale());
}
@Test
public void appliesExternalOverlayAndFallsBackPerKey() throws Exception {
writeOverride("de_DE", """
{
"locale": "de_DE",
"messages": {
"iris.command.permission_denied": "Fehlende Berechtigung: {permission}"
}
}
""");
assertTrue(IrisLanguage.reload(dataFolder, "de_DE"));
assertEquals(
"Fehlende Berechtigung: iris.all",
IrisLanguage.plain(
IrisMessages.COMMAND_PERMISSION_DENIED,
MessageArgument.untrusted("permission", "iris.all")
)
);
assertFalse("Unknown Iris command".equals(IrisLanguage.plain(IrisMessages.COMMAND_UNKNOWN)));
}
@Test
public void bundledLocalesMatchSharedManifestAndCoverEntireCatalog() throws Exception {
assertEquals(17, VolmitLocales.nonEnglish().size());
for (String locale : VolmitLocales.nonEnglish()) {
LocaleOverlay overlay = IrisLanguage.loadBundledOverlay(locale);
assertEquals(locale, overlay.locale());
assertEquals(IrisLanguage.catalog().ids(), overlay.values().keySet());
LocalizationValidationResult validation = LocalizationValidator.validate(
IrisLanguage.catalog(),
List.of(overlay)
);
assertTrue(locale + " errors: " + validation.errors(), validation.errors().isEmpty());
assertTrue(locale + " warnings: " + validation.warnings(), validation.warnings().isEmpty());
int translated = 0;
for (MessageKey key : IrisLanguage.catalog().keys()) {
if (!key.englishValue().equals(overlay.value(key.id()))) {
translated++;
}
assertValueIntegrity(locale, key.id(), key.englishValue(), overlay.value(key.id()));
}
assertTrue(locale + " contains too many English placeholder values", translated >= 1050);
}
}
@Test
public void bundledServerResourcesExactlyMatchNonEnglishManifest() throws Exception {
Set<String> expected = VolmitLocales.nonEnglish().stream()
.map(locale -> locale + ".json")
.collect(Collectors.toUnmodifiableSet());
assertEquals(expected, resourceFiles("languages"));
assertFalse(expected.contains(VolmitLocales.ENGLISH + ".json"));
}
@Test
public void bundledLocalesPreserveReservedWorldNames() throws Exception {
for (String locale : VolmitLocales.nonEnglish()) {
LocaleOverlay overlay = IrisLanguage.loadBundledOverlay(locale);
TextValue irisName = (TextValue) overlay.value(
BukkitCommandMessagesExtended.COMMAND_IRIS_YOU_CANNOT_USE_WORLD_NAME_IRIS_CREATING_WORLDS_AS_IRIS.id()
);
TextValue benchmarkName = (TextValue) overlay.value(
BukkitCommandMessagesExtended.COMMAND_IRIS_YOU_CANNOT_USE_WORLD_NAME_BENCHMARK_CREATING_WORLDS_AS_IRIS.id()
);
assertTrue(locale + " must preserve the reserved iris world name", irisName.template().contains("\"iris\""));
assertTrue(locale + " must preserve the reserved benchmark world name", benchmarkName.template().contains("\"benchmark\""));
}
}
@Test
public void bundledLocaleLoadsWithoutUserOverride() {
assertTrue(IrisLanguage.reload(dataFolder, "de_DE"));
assertEquals("de_DE", IrisLanguage.activeLocale());
assertFalse("Unknown Iris command".equals(IrisLanguage.plain(IrisMessages.COMMAND_UNKNOWN)));
}
@Test
public void rejectsUnknownKeysAndPlaceholderShapeWhileRetainingLastGood() throws Exception {
writeOverride("de_DE", """
{
"locale": "de_DE",
"messages": {
"iris.command.permission_denied": "Erlaubnis {permission} fehlt"
}
}
""");
assertTrue(IrisLanguage.reload(dataFolder, "de_DE"));
writeOverride("de_DE", """
{
"locale": "de_DE",
"messages": {
"iris.command.permission_denied": "Erlaubnis fehlt",
"iris.command.not_real": "Unbekannt"
}
}
""");
assertFalse(IrisLanguage.reload(dataFolder, "de_DE"));
assertEquals(
"Erlaubnis iris.all fehlt",
IrisLanguage.plain(
IrisMessages.COMMAND_PERMISSION_DENIED,
MessageArgument.untrusted("permission", "iris.all")
)
);
}
@Test
public void untrustedArgumentsCannotInjectLegacyOrMiniMessageFormatting() throws Exception {
writeOverride("de_DE", """
{
"locale": "de_DE",
"messages": {
"iris.command.permission_denied": "&aWert: {permission}"
}
}
""");
assertTrue(IrisLanguage.reload(dataFolder, "de_DE"));
String rendered = IrisLanguage.text(
IrisMessages.COMMAND_PERMISSION_DENIED,
MessageArgument.untrusted("permission", "&c<red>Bad\u00a74Name")
);
assertTrue(rendered.startsWith("\u00a7aWert: "));
assertTrue(rendered.endsWith("credBadName"));
assertFalse(rendered.contains("\u00a7c"));
assertFalse(rendered.contains("\u00a74"));
}
@Test
public void argumentValuesCannotCascadeIntoLaterPlaceholderSentinels() {
String rendered = IrisLanguage.plain(
IrisMessages.COMMAND_RELOAD_FAILED,
MessageArgument.untrusted("locale", "\uE0001\uE001"),
MessageArgument.untrusted("activeLocale", "en_US")
);
assertEquals(
"Settings were reloaded, but locale \uE0001\uE001 was rejected; continuing with en_US.",
rendered
);
}
@Test
public void lookupsUseImmutableSnapshotWithoutReadingTheOverrideAgain() throws Exception {
File override = writeOverride("de_DE", """
{
"locale": "de_DE",
"messages": {
"iris.command.unknown": "Unbekannter Iris-Befehl"
}
}
""");
assertTrue(IrisLanguage.reload(dataFolder, "de_DE"));
Files.delete(override.toPath());
assertEquals("Unbekannter Iris-Befehl", IrisLanguage.plain(IrisMessages.COMMAND_UNKNOWN));
}
@Test
public void plainRenderingPreservesCommandSyntaxPlaceholders() {
assertEquals(
"Use /iris download <pack> branch=<branch> to download manually.",
IrisLanguage.plain(BukkitRuntimeMessages.STUDIO_S_V_C_USE_IRIS_DOWNLOAD_PACK_BRANCH_BRANCH_DOWNLOAD_MANUALLY)
);
}
@Test
public void appliesLineAndPluralOverlayShapes() throws Exception {
writeOverride("de_DE", """
{
"locale": "de_DE",
"messages": {
"iris.bukkit.runtime.commanddeveloper.update_world_warning": [
"Sicherung erstellen.",
"Mögliche Probleme:",
" - Beschädigte Chunks",
" - Neu generierte Chunks",
" - Fehlende Strukturen",
" - Nicht verbundene Höhlen",
" - Nicht verbundene Geländeschichten",
"Risiken bestätigt.",
"Welt {world}, Paket {pack}"
],
"iris.bukkit.runtime.commandpack.more_warning_s": {
"one": "Noch {count} Warnung.",
"other": "Noch {count} Warnungen."
}
}
}
""");
assertTrue(IrisLanguage.reload(dataFolder, "de_DE"));
assertEquals(
"Sicherung erstellen.\n"
+ "Mögliche Probleme:\n"
+ " - Beschädigte Chunks\n"
+ " - Neu generierte Chunks\n"
+ " - Fehlende Strukturen\n"
+ " - Nicht verbundene Höhlen\n"
+ " - Nicht verbundene Geländeschichten\n"
+ "Risiken bestätigt.\n"
+ "Welt world, Paket pack",
IrisLanguage.plain(
BukkitRuntimeMessages.COMMAND_DEVELOPER_UPDATE_WORLD_WARNING,
MessageArgument.untrusted("world", "world"),
MessageArgument.untrusted("pack", "pack")
)
);
assertEquals(
"Noch 1 Warnung.",
IrisLanguage.plain(
BukkitRuntimeMessages.COMMAND_PACK_MORE_WARNING_S,
MessageArgument.trusted("count", 1)
)
);
assertEquals(
"Noch 3 Warnungen.",
IrisLanguage.plain(
BukkitRuntimeMessages.COMMAND_PACK_MORE_WARNING_S,
MessageArgument.trusted("count", 3)
)
);
}
private File writeOverride(String locale, String json) throws Exception {
File file = new File(dataFolder, "languages/overrides/" + locale + ".json");
Files.createDirectories(file.toPath().getParent());
Files.writeString(file.toPath(), json, StandardCharsets.UTF_8);
return file;
}
private void assertValueIntegrity(String locale, String key, MessageValue english, MessageValue translated) {
if (english instanceof TextValue englishText && translated instanceof TextValue translatedText) {
assertTemplateIntegrity(locale, key, englishText.template(), translatedText.template());
return;
}
if (english instanceof LinesValue englishLines && translated instanceof LinesValue translatedLines) {
assertEquals(locale + ": " + key + " line count", englishLines.lines().size(), translatedLines.lines().size());
for (int index = 0; index < englishLines.lines().size(); index++) {
assertTemplateIntegrity(
locale,
key + "[" + index + "]",
englishLines.lines().get(index),
translatedLines.lines().get(index)
);
}
return;
}
if (english instanceof PluralValue englishPlural && translated instanceof PluralValue translatedPlural) {
assertEquals(locale + ": " + key + " plural forms", englishPlural.forms().keySet(), translatedPlural.forms().keySet());
for (String form : englishPlural.forms().keySet()) {
assertTemplateIntegrity(
locale,
key + "." + form,
englishPlural.forms().get(form),
translatedPlural.forms().get(form)
);
}
return;
}
throw new AssertionError(locale + ": " + key + " has mismatched message value types");
}
private void assertTemplateIntegrity(String locale, String key, String english, String translated) {
String context = locale + ": " + key;
assertEquals(context + " color codes", matches(COLOR_CODE, english), matches(COLOR_CODE, translated));
for (int index = 0; index < STRUCTURAL_CHARACTERS.length(); index++) {
char character = STRUCTURAL_CHARACTERS.charAt(index);
assertEquals(
context + " structural character " + character,
countCharacter(english, character),
countCharacter(translated, character)
);
}
for (Pattern pattern : REQUIRED_LITERAL_PATTERNS) {
Map<String, Integer> required = frequencies(matches(pattern, english));
for (Map.Entry<String, Integer> entry : required.entrySet()) {
assertTrue(
context + " lost literal " + entry.getKey(),
countLiteral(translated, entry.getKey()) >= entry.getValue()
);
}
}
assertFalse(context + " contains translation marker debris", MARKER_DEBRIS.matcher(translated).find());
assertFalse(context + " contains an encoded ampersand", translated.contains("&amp;"));
assertFalse(context + " contains a replacement character", translated.contains(""));
assertFalse(context + " contains mojibake", MOJIBAKE.matcher(translated).find());
assertFalse(context + " contains a control character", CONTROL_CHARACTER.matcher(translated).find());
Pattern forbiddenArtifacts = FORBIDDEN_TRANSLATION_ARTIFACTS.get(locale);
if (forbiddenArtifacts != null) {
assertFalse(context + " contains a known translation artifact", forbiddenArtifacts.matcher(translated).find());
}
assertTechnicalTermIntegrity(locale, context, english, translated);
assertTrue(
context + " is pathologically longer than English",
translated.length() <= Math.max(120, english.length() * 4 + 60)
);
assertFalse(
context + " contains pathological repetition",
hasPathologicalRepetition(translated) && !hasPathologicalRepetition(english)
);
}
private void assertTechnicalTermIntegrity(String locale, String context, String english, String translated) {
if (!locale.equals("es_ES") && !locale.equals("fr_FR")) {
return;
}
String source = PLACEHOLDER.matcher(english).replaceAll("");
String target = PLACEHOLDER.matcher(translated).replaceAll("");
for (String productName : IRIS_PRODUCT_NAMES) {
if (source.contains(productName)) {
assertTrue(context + " must preserve product name " + productName, target.contains(productName));
}
}
if (containsWord(source, "chunks?")) {
assertTrue(context + " must preserve the Minecraft term chunk", containsWord(target, "chunks?"));
assertFalse(context + " mistranslates chunk", artifact(locale, target, "pedazos?|trozos?|porciones?|tontos?|idiotas?|gorros?", "morceaux?|choux?"));
}
if (containsWord(source, "mantle")) {
assertTrue(context + " must preserve Mantle", target.contains("Mantle"));
assertFalse(context + " mistranslates Mantle", artifact(locale, target, "mantos?|manteles?", "manteaux?"));
}
String sourceWithoutDataPack = source.replaceAll("(?iu)\\bdata\\s+packs?\\b", "datapack");
if (containsWord(sourceWithoutDataPack, "packs?")) {
assertTrue(context + " must preserve the Iris term pack", containsWord(target, "packs?"));
assertFalse(context + " mistranslates pack", artifact(locale, target, "paquetes?|embalajes?|envases?", "paquets?|boîtes?|boites?|emballages?|colis"));
}
if (containsWord(source, "vanilla")) {
assertTrue(context + " must preserve the Minecraft term vanilla", containsWord(target, "vanilla"));
assertFalse(context + " mistranslates vanilla", artifact(locale, target, "vainilla", "vanille"));
}
if (containsWord(source, "studio")) {
assertTrue(context + " must preserve Studio", containsWord(target, "Studio"));
}
if (containsWord(source, "pastes?")) {
assertFalse(context + " mistranslates paste", artifact(locale, target, "pastas?|sabores?", "pâtes?|saveurs?"));
}
if (containsWord(source, "unloads?|unloaded|unloading")) {
assertFalse(context + " confuses unload with download", artifact(locale, target, "descarg(?:ar|a|ado|ando)", "télécharg(?:er|é|ement)"));
}
if (containsWord(source, "downloads?|downloaded|downloading")) {
assertFalse(context + " confuses download with unload", artifact(locale, target, "retir(?:ar|ado|ando).{0,20}memoria", "décharg(?:er|é|ement)"));
}
if (containsWord(source, "spawns?|spawned|spawning")) {
assertFalse(context + " mistranslates spawn", artifact(locale, target, "desov(?:ar|a|ado)|escup(?:ir|e|ido)", "fray(?:er|é|age)"));
}
if (containsWord(source, "benchmarks?|benchmarked|benchmarking")) {
assertTrue(context + " must preserve benchmark", containsWord(target, "benchmarks?"));
}
if (locale.equals("fr_FR") && containsWord(source, "generators?")) {
assertFalse(context + " uses the electrical sense of generator", containsWord(target, "groupes?\\s+électrogènes?"));
}
if (locale.equals("fr_FR") && containsWord(source, "caves?")) {
assertFalse(context + " uses the cellar sense of cave", containsWord(target, "caves?"));
}
if (containsWord(source, "saves?|saved|saving")) {
assertFalse(context + " uses the rescue sense of save", artifact(locale, target, "salv(?:ar|a|ado|ando)", "sauv(?:er|é)"));
}
}
private boolean artifact(String locale, String value, String spanish, String french) {
return containsWord(value, locale.equals("es_ES") ? spanish : french);
}
private boolean containsWord(String value, String expression) {
return Pattern.compile("(?iuU)\\b(?:" + expression + ")\\b").matcher(value).find();
}
private boolean hasPathologicalRepetition(String value) {
String withoutPlaceholders = PLACEHOLDER.matcher(value).replaceAll("");
List<String> words = new ArrayList<>();
Matcher matcher = WORD.matcher(withoutPlaceholders);
while (matcher.find()) {
words.add(matcher.group().toLowerCase(Locale.ROOT));
}
for (int index = 0; index + 2 < words.size(); index++) {
if (words.get(index).equals(words.get(index + 1))
&& words.get(index).equals(words.get(index + 2))) {
return true;
}
}
for (int size = 2; size <= 4; size++) {
for (int index = 0; index + size * 3 <= words.size(); index++) {
if (words.subList(index, index + size).equals(words.subList(index + size, index + size * 2))
&& words.subList(index, index + size).equals(words.subList(index + size * 2, index + size * 3))) {
return true;
}
}
}
return false;
}
private Set<String> resourceFiles(String directory) throws Exception {
URL resource = IrisLanguageTest.class.getClassLoader().getResource(directory);
assertNotNull("Missing resource directory: " + directory, resource);
assertEquals("file", resource.getProtocol());
try (Stream<Path> paths = Files.list(Path.of(resource.toURI()))) {
return paths
.filter(Files::isRegularFile)
.map(path -> path.getFileName().toString())
.collect(Collectors.toUnmodifiableSet());
}
}
private List<String> matches(Pattern pattern, String value) {
List<String> matches = new ArrayList<>();
Matcher matcher = pattern.matcher(value);
while (matcher.find()) {
matches.add(matcher.group());
}
return matches;
}
private Map<String, Integer> frequencies(List<String> values) {
Map<String, Integer> frequencies = new LinkedHashMap<>();
for (String value : values) {
frequencies.merge(value, 1, Integer::sum);
}
return frequencies;
}
private int countCharacter(String value, char character) {
int count = 0;
for (int index = 0; index < value.length(); index++) {
if (value.charAt(index) == character) {
count++;
}
}
return count;
}
private int countLiteral(String value, String literal) {
int count = 0;
int index = 0;
while ((index = value.indexOf(literal, index)) >= 0) {
count++;
index += literal.length();
}
return count;
}
}
@@ -149,7 +149,7 @@ public class GoldenHashEngineTest {
GoldenHashEngine hashEngine = new GoldenHashEngine(engine, request(GoldenHashEngine.Mode.AUTO), goldenDir, broken, feedback, progress());
assertFalse(hashEngine.run());
assertFalse(new File(goldenDir, "testdim-s1234-c0x0-r0.hashes").exists());
assertTrue(feedback.fail.stream().anyMatch((String line) -> line.startsWith("GoldenHash aborted: 1 chunk(s)")));
assertTrue(feedback.fail.stream().anyMatch((String line) -> line.startsWith("GoldenHash aborted: 1 chunk")));
}
private GoldenHashEngine.Request request(GoldenHashEngine.Mode mode) {
@@ -1,24 +0,0 @@
package art.arcane.iris.util.common.plugin;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class VolmitSenderMiniMessageEscapeTest {
@Test
public void escapesApostrophesForQuotedHoverText() {
String escaped = VolmitSender.escapeMiniMessageQuotedText("This world's dimension config");
assertEquals("This world\\'s dimension config", escaped);
MiniMessage.miniMessage().deserialize("<hover:show_text:'" + escaped + "'>ok</hover>");
}
@Test
public void escapesBackslashesBeforeQuotedHoverText() {
String escaped = VolmitSender.escapeMiniMessageQuotedText("Path \\\\ data");
assertEquals("Path \\\\\\\\ data", escaped);
MiniMessage.miniMessage().deserialize("<hover:show_text:'" + escaped + "'>ok</hover>");
}
}