Files
CatServer/patches/net/minecraft/client/gui/GuiCreateWorld.java.patch
2019-02-24 22:29:41 +08:00

37 lines
1.8 KiB
Diff

--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
@@ -206,6 +206,8 @@
}
}
+ WorldType.WORLD_TYPES[this.selectedIndex].onGUICreateWorldPress();
+
WorldSettings worldsettings = new WorldSettings(i, GameType.getByName(this.gameMode), this.generateStructuresEnabled, this.hardCoreMode, WorldType.WORLD_TYPES[this.selectedIndex]);
worldsettings.setGeneratorOptions(this.chunkProviderSettingsJson);
@@ -312,14 +314,7 @@
}
else if (button.id == 8)
{
- if (WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.FLAT)
- {
- this.mc.displayGuiScreen(new GuiCreateFlatWorld(this, this.chunkProviderSettingsJson));
- }
- else
- {
- this.mc.displayGuiScreen(new GuiCustomizeWorldScreen(this, this.chunkProviderSettingsJson));
- }
+ WorldType.WORLD_TYPES[this.selectedIndex].onCustomizeButton(mc, this);
}
}
}
@@ -379,7 +374,7 @@
this.btnBonusItems.visible = this.inMoreWorldOptionsDisplay;
this.btnMapType.visible = this.inMoreWorldOptionsDisplay;
this.btnAllowCommands.visible = this.inMoreWorldOptionsDisplay;
- this.btnCustomizeType.visible = this.inMoreWorldOptionsDisplay && (WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.FLAT || WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.CUSTOMIZED);
+ this.btnCustomizeType.visible = this.inMoreWorldOptionsDisplay && WorldType.WORLD_TYPES[this.selectedIndex].isCustomizable();
}
this.updateDisplayState();