mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-01 23:47:21 +00:00
automatically update vanilla dimension type if present in Iris datapack
This commit is contained in:
parent
94bf530d93
commit
1c5eb8b910
@ -107,6 +107,7 @@ public class ServerConfigurator {
|
|||||||
DimensionHeight height = new DimensionHeight(fixer);
|
DimensionHeight height = new DimensionHeight(fixer);
|
||||||
|
|
||||||
allPacks().flatMap(height::merge)
|
allPacks().flatMap(height::merge)
|
||||||
|
.toList()
|
||||||
.forEach(dim -> {
|
.forEach(dim -> {
|
||||||
for (File dpack : getDatapacksFolder()) {
|
for (File dpack : getDatapacksFolder()) {
|
||||||
Iris.verbose(" Checking Dimension " + dim.getLoadFile().getPath());
|
Iris.verbose(" Checking Dimension " + dim.getLoadFile().getPath());
|
||||||
|
@ -456,6 +456,8 @@ public class IrisDimension extends IrisRegistrant {
|
|||||||
|
|
||||||
private static boolean write(boolean changed, File datapacks, String type, String json) {
|
private static boolean write(boolean changed, File datapacks, String type, String json) {
|
||||||
File dimType = new File(datapacks, "iris/data/iris/dimension_type/" + type + ".json");
|
File dimType = new File(datapacks, "iris/data/iris/dimension_type/" + type + ".json");
|
||||||
|
File dimTypeVanilla = new File(datapacks, "iris/data/minecraft/dimension_type/" + type + ".json");
|
||||||
|
|
||||||
if (!dimType.exists())
|
if (!dimType.exists())
|
||||||
changed = true;
|
changed = true;
|
||||||
dimType.getParentFile().mkdirs();
|
dimType.getParentFile().mkdirs();
|
||||||
@ -466,8 +468,7 @@ public class IrisDimension extends IrisRegistrant {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IrisSettings.get().getGeneral().adjustVanillaHeight) {
|
if (IrisSettings.get().getGeneral().adjustVanillaHeight || dimTypeVanilla.exists()) {
|
||||||
File dimTypeVanilla = new File(datapacks, "iris/data/minecraft/dimension_type/" + type + ".json");
|
|
||||||
if (!dimTypeVanilla.exists())
|
if (!dimTypeVanilla.exists())
|
||||||
changed = true;
|
changed = true;
|
||||||
dimTypeVanilla.getParentFile().mkdirs();
|
dimTypeVanilla.getParentFile().mkdirs();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user