Skip to content

Commit 3789f4b

Browse files
committed
clean up configs a bit
1 parent 052fd4e commit 3789f4b

File tree

9 files changed

+29
-31
lines changed

9 files changed

+29
-31
lines changed

src/main/java/gregtech/api/items/crafttweaker/CTItemUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
@ZenClass("mods.gregtech.item.ItemRegistry")
1111
@ZenRegister
12+
@SuppressWarnings("unused")
1213
public class CTItemUtils {
1314

1415
@ZenMethod("registerItem")

src/main/java/gregtech/common/ConfigHolder.java

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ public class ConfigHolder {
1010
@Config.Name("Unofficial Options")
1111
public static UnofficialOptions U = new UnofficialOptions();
1212

13-
@Config.Comment("Whether to enable that Steam Multiblocks use Steel instead of Bronze. Default: false")
14-
@Config.RequiresMcRestart
15-
public static boolean steelSteamMultiblocks = false;
16-
17-
@Config.Comment("Steam to EU multiplier for Steam Multiblocks. 1.0 means 1 Steam -> 1 EU. 0.5 means 2 Steam -> 1 EU")
18-
@Config.RequiresMcRestart
19-
public static double multiblockSteamtoEU = 0.5;
20-
2113
@Config.Comment("Whether to enable more verbose logging. Default: false")
2214
public static boolean debug = false;
2315

@@ -191,10 +183,18 @@ public static class UnofficialOptions {
191183
@Config.RequiresMcRestart
192184
public boolean registerRecipesForMiningHammers = true;
193185

194-
@Config.Comment("Divisor for Recipe Duration per Overclock. This will be removed eventually, once a value is chosen. Default: 2.0")
186+
@Config.Comment("Divisor for Recipe Duration per Overclock. Default: 2.0")
195187
@Config.RangeDouble(min = 2.0, max = 3.0)
196188
public double overclockDivisor = 2.0;
197189

190+
@Config.Comment("Whether to enable that Steam Multiblocks use Steel instead of Bronze. Default: false")
191+
@Config.RequiresMcRestart
192+
public boolean steelSteamMultiblocks = false;
193+
194+
@Config.Comment("Steam to EU multiplier for Steam Multiblocks. 1.0 means 1 Steam -> 1 EU. 0.5 means 2 Steam -> 1 EU. Default: 0.5")
195+
@Config.RequiresWorldRestart
196+
public double multiblockSteamToEU = 0.5;
197+
198198
public static class GT5U {
199199

200200
@Config.Comment("Enable an extra ZPM and UV Battery (this also makes the Ultimate Battery harder to make). Default: false")
@@ -205,48 +205,45 @@ public static class GT5U {
205205
@Config.RequiresMcRestart
206206
public boolean replaceUVwithMAXBat = false;
207207

208-
@Config.Comment("This config requires 'B:Use custom machine tank sizes' = true to take effect. Changes the input tank size to the first value, and out tank size to the second value for nearly every single block machine. Units are millibuckets.")
209-
@Config.Name("Custom machine fluid tank sizes")
208+
@Config.Comment("This config requires 'B:Use custom machine tank sizes' = true to take effect. Changes the input tank size to the first value, and out tank size to the second value for nearly every single block machine. Units are millibuckets. Default: {64000, 64000}")
210209
@Config.RangeInt(min = 1)
211210
@Config.RequiresMcRestart
212211
public int[] customMachineTankSizes = new int[]{64000, 64000};
213212

214-
@Config.Comment("This config enables the customization of nearly every single block machine's input and output fluid tank sizes.")
215-
@Config.Name("Use custom machine tank sizes")
213+
@Config.Comment("This config enables the customization of nearly every single block machine's input and output fluid tank sizes. Default: false")
216214
@Config.RequiresMcRestart
217215
public boolean useCustomMachineTankSizes = false;
218216

219217
@Config.Comment("Require Wrench to break machines? Default: false")
220218
public boolean requireWrenchForMachines = false;
221219

222220
@Config.Comment("Change the recipe of rods to result in 1 stick and 2 small piles of dusts. Default: false")
221+
@Config.RequiresMcRestart
223222
public boolean harderRods = false;
224223

225224
@Config.Comment("Whether or not to use polymers instead of rare metals for Carbon Fibers. REMOVES THE CHANCED OUTPUT! Default: false")
225+
@Config.RequiresMcRestart
226226
public boolean polymerCarbonFiber = false;
227227

228228
@Config.Comment("The default color to overlay onto machines. \n16777215 (0xFFFFFF in decimal) is no coloring (default), and 13819135 (0xD2DCFF in decimal) is the classic blue from GT5. THIS IS SERVER SIDE!!!")
229-
@Config.Name("Default Machine Color")
230229
@Config.RequiresMcRestart
231230
public int defaultPaintingColor = 0xFFFFFF;
232231

233232
@Config.Comment("The default color to overlay onto cable insulation. \n7829367 (0x777777 in decimal) is no coloring (default), and 4210752 (0x404040 in decimal) is the classic black from GT5. THIS IS SERVER SIDE!!!")
234-
@Config.Name("Default Cable Color")
235233
@Config.RequiresMcRestart
236234
public int defaultInsulationColor = 0x777777;
237235

238236
@Config.Comment("Enable temperature based bonuses for the Electric Blast Furnace. Default: true")
239-
@Config.Name("Use electric blast furnace temperature bonuses")
240237
@Config.RequiresMcRestart
241238
public boolean ebfTemperatureBonuses = true;
242239

243240
@Config.Comment("Enable more challenging recipes for Electric Blast Furnace Coils. Default: true")
244-
@Config.Name("Enable harder heating coil recipes")
241+
@Config.RequiresMcRestart
245242
public boolean harderHeatingCoils = true;
246243

247244
@Config.Comment("Enable more challenging recipes for Energy Input and Output hatches. Default: false")
248-
@Config.Name("Enable harder energy hatch recipes")
249-
public boolean harderEnergyHatches = true;
245+
@Config.RequiresMcRestart
246+
public boolean harderEnergyHatches = false;
250247
}
251248

252249
public static class GT6 {

src/main/java/gregtech/common/metatileentities/multi/steam/MetaTileEntitySteamGrinder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
public class MetaTileEntitySteamGrinder extends RecipeMapSteamMultiblockController {
2727

28-
private static final double CONVERSION_RATE = ConfigHolder.multiblockSteamtoEU;
28+
private static final double CONVERSION_RATE = ConfigHolder.U.multiblockSteamToEU;
2929

3030
private static final MultiblockAbility<?>[] ALLOWED_ABILITIES = {
3131
MultiblockAbility.STEAM_IMPORT_ITEMS, MultiblockAbility.STEAM_EXPORT_ITEMS, MultiblockAbility.STEAM
@@ -56,12 +56,12 @@ protected BlockPattern createStructurePattern() {
5656
}
5757

5858
public IBlockState getCasingState() {
59-
return ConfigHolder.steelSteamMultiblocks ? MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.STEEL_SOLID) : MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.BRONZE_BRICKS);
59+
return ConfigHolder.U.steelSteamMultiblocks ? MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.STEEL_SOLID) : MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.BRONZE_BRICKS);
6060
}
6161

6262
@Override
6363
public ICubeRenderer getBaseTexture(IMultiblockPart sourcePart) {
64-
return ConfigHolder.steelSteamMultiblocks ? SOLID_STEEL_CASING : BRONZE_PLATED_BRICKS;
64+
return ConfigHolder.U.steelSteamMultiblocks ? SOLID_STEEL_CASING : BRONZE_PLATED_BRICKS;
6565
}
6666

6767
@Override

src/main/java/gregtech/common/metatileentities/multi/steam/MetaTileEntitySteamOven.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
public class MetaTileEntitySteamOven extends RecipeMapSteamMultiblockController {
2929

30-
private static final double CONVERSION_RATE = ConfigHolder.multiblockSteamtoEU;
30+
private static final double CONVERSION_RATE = ConfigHolder.U.multiblockSteamToEU;
3131
private boolean isActive;
3232

3333
public MetaTileEntitySteamOven(ResourceLocation metaTileEntityId) {
@@ -71,13 +71,13 @@ protected BlockPattern createStructurePattern() {
7171
}
7272

7373
public IBlockState getCasingState() {
74-
return ConfigHolder.steelSteamMultiblocks ?
74+
return ConfigHolder.U.steelSteamMultiblocks ?
7575
MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.STEEL_SOLID) :
7676
MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.BRONZE_BRICKS);
7777
}
7878

7979
public IBlockState getFireboxState() {
80-
return ConfigHolder.steelSteamMultiblocks ?
80+
return ConfigHolder.U.steelSteamMultiblocks ?
8181
MetaBlocks.BOILER_FIREBOX_CASING.getState(BlockFireboxCasing.FireboxCasingType.STEEL_FIREBOX) :
8282
MetaBlocks.BOILER_FIREBOX_CASING.getState(BlockFireboxCasing.FireboxCasingType.BRONZE_FIREBOX);
8383
}
@@ -88,7 +88,7 @@ private boolean isFireboxPart(IMultiblockPart sourcePart) {
8888

8989
@Override
9090
public ICubeRenderer getBaseTexture(IMultiblockPart sourcePart) {
91-
if (ConfigHolder.steelSteamMultiblocks) {
91+
if (ConfigHolder.U.steelSteamMultiblocks) {
9292
if (sourcePart != null && isFireboxPart(sourcePart)) {
9393
return isActive ? Textures.STEEL_FIREBOX_ACTIVE : Textures.STEEL_FIREBOX;
9494
}

src/main/java/gregtech/common/metatileentities/steam/multiblockpart/MetaTileEntitySteamHatch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation,
137137
public ICubeRenderer getBaseTexture() {
138138
MultiblockControllerBase controller = getController();
139139
if (controller == null)
140-
return ConfigHolder.steelSteamMultiblocks ? Textures.SOLID_STEEL_CASING : Textures.BRONZE_PLATED_BRICKS;
140+
return ConfigHolder.U.steelSteamMultiblocks ? Textures.SOLID_STEEL_CASING : Textures.BRONZE_PLATED_BRICKS;
141141
return controller.getBaseTexture(this);
142142
}
143143

src/main/java/gregtech/common/metatileentities/steam/multiblockpart/MetaTileEntitySteamItemBus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void registerAbilities(List<IItemHandlerModifiable> abilityList) {
5353
public ICubeRenderer getBaseTexture() {
5454
MultiblockControllerBase controller = getController();
5555
if (controller == null)
56-
return ConfigHolder.steelSteamMultiblocks ? Textures.SOLID_STEEL_CASING : Textures.BRONZE_PLATED_BRICKS;
56+
return ConfigHolder.U.steelSteamMultiblocks ? Textures.SOLID_STEEL_CASING : Textures.BRONZE_PLATED_BRICKS;
5757
return controller.getBaseTexture(this);
5858
}
5959

src/main/java/gregtech/integration/jei/multiblock/infos/SteamGrinderInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public MultiblockControllerBase getController() {
2626
public List<MultiblockShapeInfo> getMatchingShapes() {
2727
ArrayList<MultiblockShapeInfo> shapeInfo = new ArrayList<>();
2828

29-
if (ConfigHolder.steelSteamMultiblocks) {
29+
if (ConfigHolder.U.steelSteamMultiblocks) {
3030
shapeInfo.add(MultiblockShapeInfo.builder()
3131
.aisle("XXX", "IXX", "XXX")
3232
.aisle("HXX", "S#X", "XXX")

src/main/java/gregtech/integration/jei/multiblock/infos/SteamOvenInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public MultiblockControllerBase getController() {
2727
public List<MultiblockShapeInfo> getMatchingShapes() {
2828
ArrayList<MultiblockShapeInfo> shapeInfo = new ArrayList<>();
2929

30-
if (ConfigHolder.steelSteamMultiblocks) {
30+
if (ConfigHolder.U.steelSteamMultiblocks) {
3131
shapeInfo.add(MultiblockShapeInfo.builder()
3232
.aisle("FFF", "IXX", "###")
3333
.aisle("HFF", "S#X", "XXX")

src/main/java/gregtech/loaders/recipe/MetaTileEntityLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
public class MetaTileEntityLoader {
4444

4545
public static void init() {
46-
if (ConfigHolder.steelSteamMultiblocks) {
46+
if (ConfigHolder.U.steelSteamMultiblocks) {
4747
ModHandler.addShapedRecipe("steam_oven", MetaTileEntities.STEAM_OVEN.getStackForm(), "CGC", "FMF", "CGC", 'F', MetaBlocks.BOILER_FIREBOX_CASING.getItemVariant(STEEL_FIREBOX), 'C', MetaBlocks.METAL_CASING.getItemVariant(STEEL_SOLID), 'M', MetaTileEntities.STEAM_FURNACE_STEEL.getStackForm(), 'G', new UnificationEntry(OrePrefix.gear, Materials.Invar));
4848
ModHandler.addShapedRecipe("steam_grinder", MetaTileEntities.STEAM_GRINDER.getStackForm(), "CGC", "CFC", "CGC", 'G', new UnificationEntry(OrePrefix.gear, Materials.Potin), 'F', MetaTileEntities.STEAM_MACERATOR_STEEL.getStackForm(), 'C', MetaBlocks.METAL_CASING.getItemVariant(STEEL_SOLID));
4949
ModHandler.addShapedRecipe("steam_hatch", MetaTileEntities.STEAM_HATCH.getStackForm(), "BPB", "BTB", "BPB", 'B', new UnificationEntry(OrePrefix.plate, Materials.Steel), 'P', new UnificationEntry(OrePrefix.pipeNormalFluid, Materials.Steel), 'T', MetaTileEntities.STEEL_TANK.getStackForm());

0 commit comments

Comments
 (0)