2 Bug Fixes

- Fixed #552 by making sure the biome saved in datapacks is all lowercase
- Fixed extra character showing when Iris downloads a pack
This commit is contained in:
StrangeOne101 2021-08-17 23:20:09 +12:00
parent d79af8fcc2
commit b55bf6e6c1
4 changed files with 8 additions and 4 deletions

View File

@ -228,7 +228,7 @@ public class NMSBinding17_1 implements INMSBinding {
@Override
public Object getCustomBiomeBaseFor(String mckey) {
try {
return getCustomBiomeRegistry().d(ResourceKey.a(IRegistry.aO, new MinecraftKey(mckey)));
return getCustomBiomeRegistry().d(ResourceKey.a(IRegistry.aO, new MinecraftKey(mckey.toLowerCase())));
} catch (Throwable e) {
Iris.reportError(e);
}

View File

@ -189,7 +189,7 @@ public class StudioSVC implements IrisService {
public void download(VolmitSender sender, String repo, String branch, boolean trim, boolean forceOverwrite) throws JsonSyntaxException, IOException {
String url = "https://codeload.github.com/" + repo + "/zip/refs/heads/" + branch;
sender.sendMessage("Downloading " + url);
sender.sendMessage("Downloading " + url + " "); //The extra space stops a bug in adventure API from repeating the last letter of the URL
File zip = Iris.getNonCachedFile("pack-" + trim + "-" + repo, url);
File temp = Iris.getTemp();
File work = new File(temp, "dl-" + UUID.randomUUID());

View File

@ -167,4 +167,8 @@ public class IrisBiomeCustom {
return 0;
}
public String getId() {
return id.toLowerCase();
}
}

View File

@ -472,14 +472,14 @@ public class IrisDimension extends IrisRegistrant {
boolean write = false;
boolean changed = false;
IO.delete(new File(datapacks, "iris/data/" + getLoadKey()));
IO.delete(new File(datapacks, "iris/data/" + getLoadKey().toLowerCase()));
for (IrisBiome i : getAllBiomes(data)) {
if (i.isCustom()) {
write = true;
for (IrisBiomeCustom j : i.getCustomDerivitives()) {
File output = new File(datapacks, "iris/data/" + getLoadKey() + "/worldgen/biome/" + j.getId() + ".json");
File output = new File(datapacks, "iris/data/" + getLoadKey().toLowerCase() + "/worldgen/biome/" + j.getId() + ".json");
if (!output.exists()) {
changed = true;