This commit is contained in:
Brian Neumann-Fopiano
2026-02-15 04:49:23 -05:00
parent fc25acdea2
commit bb1c0b8f68
20 changed files with 318 additions and 132 deletions

View File

@@ -22,11 +22,13 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import art.arcane.iris.Iris;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.core.ServerConfigurator;
import art.arcane.iris.core.loader.IrisData;
import art.arcane.iris.core.nms.INMS;
import art.arcane.iris.core.nms.datapack.DataVersion;
import art.arcane.iris.core.service.IrisEngineSVC;
import art.arcane.iris.core.service.StudioSVC;
import art.arcane.iris.core.tools.IrisPackBenchmarking;
import art.arcane.iris.core.tools.IrisToolbelt;
import art.arcane.iris.engine.framework.Engine;
@@ -95,6 +97,89 @@ public class CommandDeveloper implements DecreeExecutor {
Iris.reportError(new Exception("This is a test"));
}
@Decree(description = "QOL command to open an overworld studio world", sync = true)
public void so() {
sender().sendMessage(C.GREEN + "Opening studio for the \"Overworld\" pack (seed: 1337)");
Iris.service(StudioSVC.class).open(sender(), 1337, "overworld");
}
@Decree(description = "Set aura spins")
public void aura(
@Param(description = "The h color value", defaultValue = "-20")
int h,
@Param(description = "The s color value", defaultValue = "7")
int s,
@Param(description = "The b color value", defaultValue = "8")
int b
) {
IrisSettings.get().getGeneral().setSpinh(h);
IrisSettings.get().getGeneral().setSpins(s);
IrisSettings.get().getGeneral().setSpinb(b);
IrisSettings.get().forceSave();
sender().sendMessage("<rainbow>Aura Spins updated to " + h + " " + s + " " + b);
}
@Decree(description = "Bitwise calculations")
public void bitwise(
@Param(description = "The first value to run calculations on")
int value1,
@Param(description = "The operator: | & ^ << >> %")
String operator,
@Param(description = "The second value to run calculations on")
int value2
) {
Integer v = null;
switch (operator) {
case "|" -> v = value1 | value2;
case "&" -> v = value1 & value2;
case "^" -> v = value1 ^ value2;
case "%" -> v = value1 % value2;
case ">>" -> v = value1 >> value2;
case "<<" -> v = value1 << value2;
}
if (v == null) {
sender().sendMessage(C.RED + "The operator you entered: (" + operator + ") is invalid!");
return;
}
sender().sendMessage(C.GREEN + "" + value1 + " " + C.GREEN + operator.replaceAll("<", "").replaceAll(">", "").replaceAll("%", "") + " " + C.GREEN + value2 + C.GREEN + " returns " + C.GREEN + v);
}
@Decree(description = "Update the pack of a world (UNSAFE!)", name = "update-world", aliases = "^world")
public void updateWorld(
@Param(description = "The world to update", contextual = true)
World world,
@Param(description = "The pack to install into the world", contextual = true, aliases = "dimension")
IrisDimension pack,
@Param(description = "Make sure to make a backup & read the warnings first!", defaultValue = "false", aliases = "c")
boolean confirm,
@Param(description = "Should Iris download the pack again for you", defaultValue = "false", name = "fresh-download", aliases = {"fresh", "new"})
boolean freshDownload
) {
if (!confirm) {
sender().sendMessage(new String[]{
C.RED + "You should always make a backup before using this",
C.YELLOW + "Issues caused by this can be, but are not limited to:",
C.YELLOW + " - Broken chunks (cut-offs) between old and new chunks (before & after the update)",
C.YELLOW + " - Regenerated chunks that do not fit in with the old chunks",
C.YELLOW + " - Structures not spawning again when regenerating",
C.YELLOW + " - Caves not lining up",
C.YELLOW + " - Terrain layers not lining up",
C.RED + "Now that you are aware of the risks, and have made a back-up:",
C.RED + "/iris developer update-world " + world.getName() + " " + pack.getLoadKey() + " confirm=true"
});
return;
}
File folder = world.getWorldFolder();
folder.mkdirs();
if (freshDownload) {
Iris.service(StudioSVC.class).downloadSearch(sender(), pack.getLoadKey(), false, true);
}
Iris.service(StudioSVC.class).installIntoWorld(sender(), pack.getLoadKey(), folder);
}
@Decree(description = "Dev cmd to fix all the broken objects caused by faulty shrinkwarp")
public void fixObjects(
@Param(aliases = "dimension", description = "The dimension type to create the world with")
@@ -577,4 +662,3 @@ public class CommandDeveloper implements DecreeExecutor {
}
}

View File

@@ -74,8 +74,8 @@ public class CommandIris implements DecreeExecutor {
public void create(
@Param(aliases = "world-name", description = "The name of the world to create")
String name,
@Param(aliases = "dimension", description = "The dimension type to create the world with", defaultValue = "default")
IrisDimension type,
@Param(aliases = {"dimension", "pack"}, description = "The dimension/pack to create the world with", defaultValue = "default")
String type,
@Param(description = "The seed to generate the world with", defaultValue = "1337")
long seed,
@Param(aliases = "main-world", description = "Whether or not to automatically use this world as the main world", defaultValue = "false")
@@ -98,10 +98,22 @@ public class CommandIris implements DecreeExecutor {
return;
}
String resolvedType = type.equalsIgnoreCase("default")
? IrisSettings.get().getGenerator().getDefaultWorldType()
: type;
IrisDimension dimension = IrisToolbelt.getDimension(resolvedType);
if (dimension == null) {
sender().sendMessage(C.RED + "Could not find or download dimension \"" + resolvedType + "\".");
sender().sendMessage(C.YELLOW + "Try one of: overworld, vanilla, flat, theend");
sender().sendMessage(C.YELLOW + "Or download manually: /iris download IrisDimensions/" + resolvedType);
return;
}
try {
worldCreation = true;
IrisToolbelt.createWorld()
.dimension(type.getLoadKey())
.dimension(dimension.getLoadKey())
.name(name)
.seed(seed)
.sender(sender())
@@ -197,12 +209,6 @@ public class CommandIris implements DecreeExecutor {
}
}
@Decree(description = "QOL command to open a overworld studio world.", sync = true)
public void so() {
sender().sendMessage(C.GREEN + "Opening studio for the \"Overworld\" pack (seed: 1337)");
Iris.service(StudioSVC.class).open(sender(), 1337, "overworld");
}
@Decree(description = "Check access of all worlds.", aliases = {"accesslist"})
public void worlds() {
KList<World> IrisWorlds = new KList<>();
@@ -317,47 +323,6 @@ public class CommandIris implements DecreeExecutor {
return dir.delete();
}
@Decree(description = "Set aura spins")
public void aura(
@Param(description = "The h color value", defaultValue = "-20")
int h,
@Param(description = "The s color value", defaultValue = "7")
int s,
@Param(description = "The b color value", defaultValue = "8")
int b
) {
IrisSettings.get().getGeneral().setSpinh(h);
IrisSettings.get().getGeneral().setSpins(s);
IrisSettings.get().getGeneral().setSpinb(b);
IrisSettings.get().forceSave();
sender().sendMessage("<rainbow>Aura Spins updated to " + h + " " + s + " " + b);
}
@Decree(description = "Bitwise calculations")
public void bitwise(
@Param(description = "The first value to run calculations on")
int value1,
@Param(description = "The operator: | & ^ ≺≺ ≻≻ ")
String operator,
@Param(description = "The second value to run calculations on")
int value2
) {
Integer v = null;
switch (operator) {
case "|" -> v = value1 | value2;
case "&" -> v = value1 & value2;
case "^" -> v = value1 ^ value2;
case "%" -> v = value1 % value2;
case ">>" -> v = value1 >> value2;
case "<<" -> v = value1 << value2;
}
if (v == null) {
sender().sendMessage(C.RED + "The operator you entered: (" + operator + ") is invalid!");
return;
}
sender().sendMessage(C.GREEN + "" + value1 + " " + C.GREEN + operator.replaceAll("<", "").replaceAll(">", "").replaceAll("%", "") + " " + C.GREEN + value2 + C.GREEN + " returns " + C.GREEN + v);
}
@Decree(description = "Toggle debug")
public void debug(
@Param(name = "on", description = "Whether or not debug should be on", defaultValue = "other")
@@ -408,42 +373,6 @@ public class CommandIris implements DecreeExecutor {
sender().sendMessage(C.GREEN + "Hotloaded settings");
}
@Decree(description = "Update the pack of a world (UNSAFE!)", name = "^world", aliases = "update-world")
public void updateWorld(
@Param(description = "The world to update", contextual = true)
World world,
@Param(description = "The pack to install into the world", contextual = true, aliases = "dimension")
IrisDimension pack,
@Param(description = "Make sure to make a backup & read the warnings first!", defaultValue = "false", aliases = "c")
boolean confirm,
@Param(description = "Should Iris download the pack again for you", defaultValue = "false", name = "fresh-download", aliases = {"fresh", "new"})
boolean freshDownload
) {
if (!confirm) {
sender().sendMessage(new String[]{
C.RED + "You should always make a backup before using this",
C.YELLOW + "Issues caused by this can be, but are not limited to:",
C.YELLOW + " - Broken chunks (cut-offs) between old and new chunks (before & after the update)",
C.YELLOW + " - Regenerated chunks that do not fit in with the old chunks",
C.YELLOW + " - Structures not spawning again when regenerating",
C.YELLOW + " - Caves not lining up",
C.YELLOW + " - Terrain layers not lining up",
C.RED + "Now that you are aware of the risks, and have made a back-up:",
C.RED + "/iris ^world " + world.getName() + " " + pack.getLoadKey() + " confirm=true"
});
return;
}
File folder = world.getWorldFolder();
folder.mkdirs();
if (freshDownload) {
Iris.service(StudioSVC.class).downloadSearch(sender(), pack.getLoadKey(), false, true);
}
Iris.service(StudioSVC.class).installIntoWorld(sender(), pack.getLoadKey(), folder);
}
@Decree(description = "Unload an Iris World", origin = DecreeOrigin.PLAYER, sync = true)
public void unloadWorld(
@Param(description = "The world to unload")

View File

@@ -35,6 +35,8 @@ import art.arcane.volmlib.util.collection.KMap;
import art.arcane.volmlib.util.collection.KSet;
import art.arcane.iris.util.decree.DecreeContext;
import art.arcane.iris.util.decree.DecreeExecutor;
import art.arcane.iris.util.decree.handlers.DimensionHandler;
import art.arcane.iris.util.decree.specialhandlers.NullableDimensionHandler;
import art.arcane.volmlib.util.decree.DecreeOrigin;
import art.arcane.volmlib.util.decree.annotations.Decree;
import art.arcane.volmlib.util.decree.annotations.Param;
@@ -109,7 +111,7 @@ public class CommandStudio implements DecreeExecutor {
@Decree(description = "Open a new studio world", aliases = "o", sync = true)
public void open(
@Param(defaultValue = "default", description = "The dimension to open a studio for", aliases = "dim")
@Param(defaultValue = "default", description = "The dimension to open a studio for", aliases = "dim", customHandler = DimensionHandler.class)
IrisDimension dimension,
@Param(defaultValue = "1337", description = "The seed to generate the studio with", aliases = "s")
long seed) {
@@ -119,7 +121,7 @@ public class CommandStudio implements DecreeExecutor {
@Decree(description = "Open VSCode for a dimension", aliases = {"vsc", "edit"})
public void vscode(
@Param(defaultValue = "default", description = "The dimension to open VSCode for", aliases = "dim")
@Param(defaultValue = "default", description = "The dimension to open VSCode for", aliases = "dim", customHandler = DimensionHandler.class)
IrisDimension dimension
) {
sender().sendMessage(C.GREEN + "Opening VSCode for the \"" + dimension.getName() + "\" pack");
@@ -141,7 +143,11 @@ public class CommandStudio implements DecreeExecutor {
public void create(
@Param(description = "The name of this new Iris Project.")
String name,
@Param(description = "Copy the contents of an existing project in your packs folder and use it as a template in this new project.", contextual = true)
@Param(
description = "Copy the contents of an existing project in your packs folder and use it as a template in this new project.",
contextual = true,
customHandler = NullableDimensionHandler.class
)
IrisDimension template) {
if (template != null) {
Iris.service(StudioSVC.class).create(sender(), name, template.getLoadKey());
@@ -152,7 +158,7 @@ public class CommandStudio implements DecreeExecutor {
@Decree(description = "Get the version of a pack")
public void version(
@Param(defaultValue = "default", description = "The dimension get the version of", aliases = "dim", contextual = true)
@Param(defaultValue = "default", description = "The dimension get the version of", aliases = "dim", contextual = true, customHandler = DimensionHandler.class)
IrisDimension dimension
) {
sender().sendMessage(C.GREEN + "The \"" + dimension.getName() + "\" pack has version: " + dimension.getVersion());
@@ -463,7 +469,7 @@ public class CommandStudio implements DecreeExecutor {
@Decree(description = "Package a dimension into a compressed format", aliases = "package")
public void pkg(
@Param(name = "dimension", description = "The dimension pack to compress", contextual = true, defaultValue = "default")
@Param(name = "dimension", description = "The dimension pack to compress", contextual = true, defaultValue = "default", customHandler = DimensionHandler.class)
IrisDimension dimension,
@Param(name = "obfuscate", description = "Whether or not to obfuscate the pack", defaultValue = "false")
boolean obfuscate,
@@ -475,7 +481,7 @@ public class CommandStudio implements DecreeExecutor {
@Decree(description = "Profiles the performance of a dimension", origin = DecreeOrigin.PLAYER)
public void profile(
@Param(description = "The dimension to profile", contextual = true, defaultValue = "default")
@Param(description = "The dimension to profile", contextual = true, defaultValue = "default", customHandler = DimensionHandler.class)
IrisDimension dimension
) {
// Todo: Make this more accurate
@@ -700,7 +706,7 @@ public class CommandStudio implements DecreeExecutor {
@Decree(description = "Update your dimension projects VSCode workspace")
public void update(
@Param(description = "The dimension to update the workspace of", contextual = true, defaultValue = "default")
@Param(description = "The dimension to update the workspace of", contextual = true, defaultValue = "default", customHandler = DimensionHandler.class)
IrisDimension dimension
) {
sender().sendMessage(C.GOLD + "Updating Code Workspace for " + dimension.getName() + "...");

View File

@@ -61,17 +61,77 @@ public class IrisToolbelt {
* @return the IrisDimension or null
*/
public static IrisDimension getDimension(String dimension) {
File pack = Iris.instance.getDataFolder("packs", dimension);
if (dimension == null) {
return null;
}
String requested = dimension.trim();
if (requested.isEmpty()) {
return null;
}
File packsFolder = Iris.instance.getDataFolder("packs");
File pack = new File(packsFolder, requested);
if (!pack.exists()) {
File found = findCaseInsensitivePack(packsFolder, requested);
if (found != null) {
pack = found;
}
}
if (!pack.exists()) {
Iris.service(StudioSVC.class).downloadSearch(new VolmitSender(Bukkit.getConsoleSender(), Iris.instance.getTag()), dimension, false, false);
Iris.service(StudioSVC.class).downloadSearch(new VolmitSender(Bukkit.getConsoleSender(), Iris.instance.getTag()), requested, false, false);
File found = findCaseInsensitivePack(packsFolder, requested);
if (found != null) {
pack = found;
}
}
if (!pack.exists()) {
return null;
}
return IrisData.get(pack).getDimensionLoader().load(dimension);
IrisData data = IrisData.get(pack);
IrisDimension resolved = data.getDimensionLoader().load(requested, false);
if (resolved != null) {
return resolved;
}
String packName = pack.getName();
if (!packName.equals(requested)) {
resolved = data.getDimensionLoader().load(packName, false);
if (resolved != null) {
return resolved;
}
}
for (String key : data.getDimensionLoader().getPossibleKeys()) {
if (!key.equalsIgnoreCase(requested) && !key.equalsIgnoreCase(packName)) {
continue;
}
resolved = data.getDimensionLoader().load(key, false);
if (resolved != null) {
return resolved;
}
}
return null;
}
private static File findCaseInsensitivePack(File packsFolder, String requested) {
File[] children = packsFolder.listFiles();
if (children == null) {
return null;
}
for (File child : children) {
if (child.isDirectory() && child.getName().equalsIgnoreCase(requested)) {
return child;
}
}
return null;
}
/**

View File

@@ -32,7 +32,8 @@ public interface DecreeExecutor extends DecreeExecutorBase {
}
default Player player() {
return sender().player();
VolmitSender sender = sender();
return sender == null ? null : sender.player();
}
default IrisData data() {
@@ -44,8 +45,9 @@ public interface DecreeExecutor extends DecreeExecutorBase {
}
default Engine engine() {
if (sender().isPlayer() && IrisToolbelt.access(sender().player().getWorld()) != null) {
PlatformChunkGenerator gen = IrisToolbelt.access(sender().player().getWorld());
VolmitSender sender = sender();
if (sender != null && sender.isPlayer() && IrisToolbelt.access(sender.player().getWorld()) != null) {
PlatformChunkGenerator gen = IrisToolbelt.access(sender.player().getWorld());
if (gen != null) {
return gen.getEngine();
}
@@ -55,7 +57,8 @@ public interface DecreeExecutor extends DecreeExecutorBase {
}
default PlatformChunkGenerator access() {
if (sender().isPlayer()) {
VolmitSender sender = sender();
if (sender != null && sender.isPlayer()) {
return IrisToolbelt.access(world());
}
return null;

View File

@@ -19,10 +19,14 @@
package art.arcane.iris.util.decree.handlers;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.core.tools.IrisToolbelt;
import art.arcane.iris.engine.object.IrisDimension;
import art.arcane.volmlib.util.collection.KList;
import art.arcane.volmlib.util.decree.exceptions.DecreeParsingException;
import art.arcane.iris.util.decree.specialhandlers.RegistrantHandler;
import java.util.Locale;
public class DimensionHandler extends RegistrantHandler<IrisDimension> {
public DimensionHandler() {
super(IrisDimension.class, false);
@@ -30,10 +34,50 @@ public class DimensionHandler extends RegistrantHandler<IrisDimension> {
@Override
public IrisDimension parse(String in, boolean force) throws DecreeParsingException {
if (in.equalsIgnoreCase("default")) {
return parse(IrisSettings.get().getGenerator().getDefaultWorldType());
String key = in.trim();
if (key.equalsIgnoreCase("default")) {
key = IrisSettings.get().getGenerator().getDefaultWorldType();
}
return super.parse(in, force);
try {
return super.parse(key, force);
} catch (DecreeParsingException ignored) {
String normalized = key.toLowerCase(Locale.ROOT);
IrisDimension resolved = IrisToolbelt.getDimension(normalized);
if (resolved != null) {
return resolved;
}
if (!normalized.equals(key)) {
resolved = IrisToolbelt.getDimension(key);
if (resolved != null) {
return resolved;
}
}
throw ignored;
}
}
@Override
public KList<IrisDimension> getPossibilities(String input) {
KList<IrisDimension> possibilities = super.getPossibilities();
String normalizedInput = input == null ? "" : input.trim().toLowerCase(Locale.ROOT);
if (normalizedInput.isEmpty()) {
return possibilities;
}
KList<IrisDimension> filtered = new KList<>();
for (IrisDimension dimension : possibilities) {
if (dimension != null && dimension.getLoadKey() != null) {
String key = dimension.getLoadKey().toLowerCase(Locale.ROOT);
if (key.startsWith(normalizedInput)) {
filtered.add(dimension);
}
}
}
return filtered;
}
@Override

View File

@@ -19,9 +19,13 @@
package art.arcane.iris.util.decree.specialhandlers;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.core.tools.IrisToolbelt;
import art.arcane.iris.engine.object.IrisDimension;
import art.arcane.volmlib.util.collection.KList;
import art.arcane.volmlib.util.decree.exceptions.DecreeParsingException;
import java.util.Locale;
public class NullableDimensionHandler extends RegistrantHandler<IrisDimension> {
public NullableDimensionHandler() {
super(IrisDimension.class, true);
@@ -29,10 +33,50 @@ public class NullableDimensionHandler extends RegistrantHandler<IrisDimension> {
@Override
public IrisDimension parse(String in, boolean force) throws DecreeParsingException {
if (in.equalsIgnoreCase("default")) {
return parse(IrisSettings.get().getGenerator().getDefaultWorldType());
String key = in.trim();
if (key.equalsIgnoreCase("default")) {
key = IrisSettings.get().getGenerator().getDefaultWorldType();
}
return super.parse(in, force);
try {
return super.parse(key, force);
} catch (DecreeParsingException ignored) {
String normalized = key.toLowerCase(Locale.ROOT);
IrisDimension resolved = IrisToolbelt.getDimension(normalized);
if (resolved != null) {
return resolved;
}
if (!normalized.equals(key)) {
resolved = IrisToolbelt.getDimension(key);
if (resolved != null) {
return resolved;
}
}
throw ignored;
}
}
@Override
public KList<IrisDimension> getPossibilities(String input) {
KList<IrisDimension> possibilities = super.getPossibilities();
String normalizedInput = input == null ? "" : input.trim().toLowerCase(Locale.ROOT);
if (normalizedInput.isEmpty()) {
return possibilities;
}
KList<IrisDimension> filtered = new KList<>();
for (IrisDimension dimension : possibilities) {
if (dimension != null && dimension.getLoadKey() != null) {
String key = dimension.getLoadKey().toLowerCase(Locale.ROOT);
if (key.startsWith(normalizedInput)) {
filtered.add(dimension);
}
}
}
return filtered;
}
@Override

View File

@@ -17,6 +17,10 @@ public class Agent {
return ClassReloadingStrategy.of(getInstrumentation());
}
public static boolean isInstalled() {
return doGetInstrumentation() != null;
}
public static Instrumentation getInstrumentation() {
Instrumentation instrumentation = doGetInstrumentation();
if (instrumentation == null) throw new IllegalStateException("The agent is not initialized or unavailable");
@@ -24,11 +28,12 @@ public class Agent {
}
public static boolean install() {
if (doGetInstrumentation() != null)
if (isInstalled())
return true;
try {
Files.copy(Iris.instance.getResource("agent.jar"), AGENT_JAR.toPath(), StandardCopyOption.REPLACE_EXISTING);
Iris.info("Installing Java Agent...");
Iris.info("Note: JVM [Attach Listener/ERROR] [STDERR] warning lines during this step are expected and not Iris errors.");
ByteBuddyAgent.attach(AGENT_JAR, ByteBuddyAgent.ProcessProvider.ForCurrentVm.INSTANCE);
} catch (Throwable e) {
e.printStackTrace();

View File

@@ -11,6 +11,7 @@ import art.arcane.iris.core.safeguard.task.Task.Companion.of
import art.arcane.iris.util.agent.Agent
import art.arcane.iris.util.misc.getHardware
import org.bukkit.Bukkit
import java.util.Locale
import java.util.stream.Collectors
import javax.tools.ToolProvider
import kotlin.properties.PropertyDelegateProvider
@@ -75,7 +76,13 @@ private val version by task {
}
private val injection by task {
if (!Agent.install()) UNSTABLE.withDiagnostics(
if (!isPaperPreferredServer() && !Agent.isInstalled()) {
WARNING.withDiagnostics(
WARN.create("Java Agent"),
WARN.create("- Skipping dynamic Java agent attach on Spigot/Bukkit to avoid runtime agent warnings."),
WARN.create("- For full runtime injection support, run with -javaagent:" + Agent.AGENT_JAR.path + " or use Paper/Purpur.")
)
} else if (!Agent.install()) UNSTABLE.withDiagnostics(
ERROR.create("Java Agent"),
ERROR.create("- Please enable dynamic agent loading by adding -XX:+EnableDynamicAgentLoading to your jvm arguments."),
ERROR.create("- or add the jvm argument -javaagent:" + Agent.AGENT_JAR.path)
@@ -132,6 +139,10 @@ val tasks = listOf(
)
private val server get() = Bukkit.getServer()
private fun isPaperPreferredServer(): Boolean {
val name = server.name.lowercase(Locale.ROOT)
return name.contains("paper") || name.contains("purpur") || name.contains("pufferfish")
}
private fun <T> MutableList<T>.addAll(vararg values: T) = values.forEach(this::add)
fun task(action: () -> ValueWithDiagnostics<Mode>) = PropertyDelegateProvider<Any?, ReadOnlyProperty<Any?, Task>> { _, _ ->
ReadOnlyProperty { _, property -> of(property.name, action) }

View File

@@ -55,7 +55,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.getHolder(customRegistry.getResourceKey(customRegistry
.get(new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId()))).get()).get());
.get(new ResourceLocation(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT) + ":" + j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(CraftBlock.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -125,7 +125,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId());
ResourceLocation resourceLocation = new ResourceLocation(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT) + ":" + j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.get(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -54,7 +54,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.getHolder(customRegistry.getResourceKey(customRegistry
.get(new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId()))).get()).get());
.get(new ResourceLocation(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT) + ":" + j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -124,7 +124,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId());
ResourceLocation resourceLocation = new ResourceLocation(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT) + ":" + j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.get(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -54,7 +54,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.getHolder(customRegistry.getResourceKey(customRegistry
.get(new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId()))).get()).get());
.get(new ResourceLocation(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT) + ":" + j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -124,7 +124,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId());
ResourceLocation resourceLocation = new ResourceLocation(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT) + ":" + j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.get(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -54,7 +54,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.getHolder(customRegistry.getResourceKey(customRegistry
.get(new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId()))).get()).get());
.get(new ResourceLocation(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT) + ":" + j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -124,7 +124,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId());
ResourceLocation resourceLocation = new ResourceLocation(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT) + ":" + j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.get(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -54,7 +54,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.getHolder(customRegistry.getResourceKey(customRegistry
.get(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId()))).get()).get());
.get(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -124,7 +124,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId());
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.get(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -54,7 +54,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.get(customRegistry.getResourceKey(customRegistry
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId()))).get()).get());
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -124,7 +124,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId());
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.getValue(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -55,7 +55,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.get(customRegistry.getResourceKey(customRegistry
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId()))).get()).get());
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -125,7 +125,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId());
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.getValue(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -55,7 +55,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.get(customRegistry.getResourceKey(customRegistry
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId()))).get()).get());
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -125,7 +125,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId());
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.getValue(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -55,7 +55,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.get(customRegistry.getResourceKey(customRegistry
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId()))).get()).get());
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -125,7 +125,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId());
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.getValue(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -55,7 +55,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.get(customRegistry.getResourceKey(customRegistry
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId()))).get()).get());
.getValue(ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -125,7 +125,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId());
ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.getValue(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {

View File

@@ -55,7 +55,7 @@ public class CustomBiomeSource extends BiomeSource {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
b.add(customRegistry.get(customRegistry.getResourceKey(customRegistry
.getValue(Identifier.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId()))).get()).get());
.getValue(Identifier.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT)))).get()).get());
}
} else {
b.add(NMSBinding.biomeToBiomeBase(registry, i.getVanillaDerivative()));
@@ -125,7 +125,7 @@ public class CustomBiomeSource extends BiomeSource {
for (IrisBiome i : engine.getAllBiomes()) {
if (i.isCustom()) {
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
Identifier resourceLocation = Identifier.fromNamespaceAndPath(engine.getDimension().getLoadKey(), j.getId());
Identifier resourceLocation = Identifier.fromNamespaceAndPath(engine.getDimension().getLoadKey().toLowerCase(java.util.Locale.ROOT), j.getId().toLowerCase(java.util.Locale.ROOT));
Biome biome = customRegistry.getValue(resourceLocation);
Optional<ResourceKey<Biome>> optionalBiomeKey = customRegistry.getResourceKey(biome);
if (optionalBiomeKey.isEmpty()) {