diff --git a/src/main/java/com/volmit/iris/engine/object/IrisDimension.java b/src/main/java/com/volmit/iris/engine/object/IrisDimension.java index 597ba4c98..c3a539bd3 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisDimension.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisDimension.java @@ -407,18 +407,8 @@ public class IrisDimension extends IrisRegistrant { } if(!dimensionHeight.equals(new IrisRange(-64, 320)) && this.name.equalsIgnoreCase("overworld")) { - File dimType = new File(datapacks, "iris/data/minecraft/dimension_type/overworld.json"); - if(!dimType.exists()) - changed = true; - - Iris.verbose(" Installing Data Pack Dimension Type: " + dimType.getPath()); - dimType.getParentFile().mkdirs(); - try { - IO.writeAll(dimType, generateDatapackJson()); - } catch(IOException e) { - Iris.reportError(e); - e.printStackTrace(); - } + Iris.verbose(" Installing Data Pack Dimension Type: \"minecraft:overworld\""); + changed = writeDimensionType(changed, datapacks); } if(write) { @@ -457,6 +447,20 @@ public class IrisDimension extends IrisRegistrant { } + public boolean writeDimensionType(boolean changed, File datapacks) { + File dimType = new File(datapacks, "iris/data/minecraft/dimension_type/overworld.json"); + if(!dimType.exists()) + changed = true; + dimType.getParentFile().mkdirs(); + try { + IO.writeAll(dimType, generateDatapackJson()); + } catch(IOException e) { + Iris.reportError(e); + e.printStackTrace(); + } + return changed; + } + private String generateDatapackJson() { JSONObject obj = new JSONObject(DP_OVERWORLD_DEFAULT); obj.put("min_y", dimensionHeight.getMin());