11package org .dave .compactmachines3 .misc ;
22
3+ import net .minecraftforge .common .config .ConfigElement ;
34import net .minecraftforge .common .config .Configuration ;
5+ import net .minecraftforge .fml .client .config .IConfigElement ;
46import net .minecraftforge .fml .client .event .ConfigChangedEvent ;
57import net .minecraftforge .fml .common .eventhandler .SubscribeEvent ;
68import org .dave .compactmachines3 .CompactMachines3 ;
79import org .dave .compactmachines3 .utility .Logz ;
810
911import java .io .File ;
12+ import java .util .ArrayList ;
13+ import java .util .List ;
1014
1115public class ConfigurationHandler {
1216 public static Configuration configuration ;
@@ -73,13 +77,6 @@ private static void loadConfiguration() {
7377 "Force chunk load"
7478 );
7579
76- Settings .worldgenDimensions = configuration .get (
77- CATEGORY_INTERNAL ,
78- "worldgenDimensions" ,
79- new int [] {0 },
80- "Allowed dimensions broken Compact Machine cubes can generate in."
81- ).getIntList ();
82-
8380 Settings .maximumCraftingAreaSize = configuration .getInt (
8481 "maximumCraftingAreaSize" ,
8582 CATEGORY_MINIATURIZATION ,
@@ -191,14 +188,24 @@ public static void saveConfiguration() {
191188 }
192189
193190 @ SubscribeEvent
194- public void onConfigurationChanged (ConfigChangedEvent event ) {
191+ public static void onConfigurationChanged (ConfigChangedEvent event ) {
195192 if (!event .getModID ().equalsIgnoreCase (CompactMachines3 .MODID )) {
196193 return ;
197194 }
198195
199196 loadConfiguration ();
200197 }
201198
199+ public static List <IConfigElement > getConfigElements () {
200+ List <IConfigElement > result = new ArrayList <>();
201+ result .add (new ConfigElement (configuration .getCategory (CATEGORY_MINIATURIZATION )));
202+ result .add (new ConfigElement (configuration .getCategory (CATEGORY_MACHINES )));
203+ result .add (new ConfigElement (configuration .getCategory (CATEGORY_COMPAT )));
204+ result .add (new ConfigElement (configuration .getCategory (CATEGORY_INTERNAL )));
205+
206+ return result ;
207+ }
208+
202209 public static class CompatSettings {
203210 public static boolean doesWaterVaporize ;
204211 }
@@ -219,7 +226,6 @@ public static class Settings {
219226 public static int dimensionId ;
220227 public static int dimensionTypeId ;
221228 public static boolean forceLoadChunks ;
222- public static int [] worldgenDimensions ;
223229 public static int maximumCraftingAreaSize ;
224230 public static int maximumCraftingCatalystAge ;
225231
0 commit comments