aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/loaders/preload
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2022-01-06 15:53:10 +0800
committerGitHub <noreply@github.com>2022-01-06 08:53:10 +0100
commit8690a845534cb40802878193d5e469128d57a31d (patch)
treefcaef19c1ee384d5b3f27dc060c64cffab7a9432 /src/main/java/gregtech/loaders/preload
parent2721dd99417a48db7c96ee87adc4bc5e63e15947 (diff)
downloadGT5-Unofficial-8690a845534cb40802878193d5e469128d57a31d.tar.gz
GT5-Unofficial-8690a845534cb40802878193d5e469128d57a31d.tar.bz2
GT5-Unofficial-8690a845534cb40802878193d5e469128d57a31d.zip
Add in game GUI to configure client preference (#852)
* Add in game GUI to configure client preference * Fix backslash
Diffstat (limited to 'src/main/java/gregtech/loaders/preload')
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_PreLoad.java33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
index 15f402e062..9984b229c9 100644
--- a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
+++ b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
@@ -362,20 +362,8 @@ public class GT_PreLoad {
GregTech_API.sDrinksAlwaysDrinkable = tMainConfig.get(GT_Mod.aTextGeneral, "drinks_always_drinkable", false).getBoolean(false);
GregTech_API.sDoShowAllItemsInCreative = tMainConfig.get(GT_Mod.aTextGeneral, "show_all_metaitems_in_creative_and_NEI", false).getBoolean(false);
GregTech_API.sMultiThreadedSounds = tMainConfig.get(GT_Mod.aTextGeneral, "sound_multi_threading", false).getBoolean(false);
- String SBdye0 = "ColorModulation.";
- Arrays.stream(Dyes.values()).filter(tDye -> (tDye != Dyes._NULL) && (tDye.mIndex < 0)).forEach(tDye -> {
- String SBdye1 = SBdye0 + tDye;
- tDye.mRGBa[0] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "R", tDye.mRGBa[0]))));
- tDye.mRGBa[1] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "G", tDye.mRGBa[1]))));
- tDye.mRGBa[2] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "B", tDye.mRGBa[2]))));
- }
- );
- GT_Mod.gregtechproxy.mRenderTileAmbientOcclusion = GregTech_API.sClientDataFile.get("render", "TileAmbientOcclusion", true);
- GT_Mod.gregtechproxy.mRenderGlowTextures = GregTech_API.sClientDataFile.get("render", "GlowTextures", true);
- GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped = GregTech_API.sClientDataFile.get("render", "RenderFlippedMachinesFlipped", true);
- GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch = GregTech_API.sClientDataFile.get("render", "RenderIndicatorsOnHatch", true);
- GT_Mod.gregtechproxy.mRenderDirtParticles = GregTech_API.sClientDataFile.get("render", "RenderDirtParticles", true);
- GT_Mod.gregtechproxy.mRenderPollutionFog = GregTech_API.sClientDataFile.get("render", "RenderPollutionFog", true);
+
+ loadClientConfig();
GT_Mod.gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get(GT_Mod.aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3).getInt(3);
GT_Mod.gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get(GT_Mod.aTextGeneral, "SkeletonsShootGTArrows", 16).getInt(16);
@@ -524,4 +512,21 @@ public class GT_PreLoad {
}
}
}
+
+ public static void loadClientConfig() {
+ String SBdye0 = "ColorModulation.";
+ Arrays.stream(Dyes.values()).filter(tDye -> (tDye != Dyes._NULL) && (tDye.mIndex < 0)).forEach(tDye -> {
+ String SBdye1 = SBdye0 + tDye;
+ tDye.mRGBa[0] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "R", tDye.mOriginalRGBa[0]))));
+ tDye.mRGBa[1] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "G", tDye.mOriginalRGBa[1]))));
+ tDye.mRGBa[2] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "B", tDye.mOriginalRGBa[2]))));
+ }
+ );
+ GT_Mod.gregtechproxy.mRenderTileAmbientOcclusion = GregTech_API.sClientDataFile.get("render", "TileAmbientOcclusion", true);
+ GT_Mod.gregtechproxy.mRenderGlowTextures = GregTech_API.sClientDataFile.get("render", "GlowTextures", true);
+ GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped = GregTech_API.sClientDataFile.get("render", "RenderFlippedMachinesFlipped", true);
+ GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch = GregTech_API.sClientDataFile.get("render", "RenderIndicatorsOnHatch", true);
+ GT_Mod.gregtechproxy.mRenderDirtParticles = GregTech_API.sClientDataFile.get("render", "RenderDirtParticles", true);
+ GT_Mod.gregtechproxy.mRenderPollutionFog = GregTech_API.sClientDataFile.get("render", "RenderPollutionFog", true);
+ }
}