mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-01 15:36:45 +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);
|
||||
|
||||
allPacks().flatMap(height::merge)
|
||||
.toList()
|
||||
.forEach(dim -> {
|
||||
for (File dpack : getDatapacksFolder()) {
|
||||
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) {
|
||||
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())
|
||||
changed = true;
|
||||
dimType.getParentFile().mkdirs();
|
||||
@ -466,8 +468,7 @@ public class IrisDimension extends IrisRegistrant {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (IrisSettings.get().getGeneral().adjustVanillaHeight) {
|
||||
File dimTypeVanilla = new File(datapacks, "iris/data/minecraft/dimension_type/" + type + ".json");
|
||||
if (IrisSettings.get().getGeneral().adjustVanillaHeight || dimTypeVanilla.exists()) {
|
||||
if (!dimTypeVanilla.exists())
|
||||
changed = true;
|
||||
dimTypeVanilla.getParentFile().mkdirs();
|
||||
|
Loading…
x
Reference in New Issue
Block a user