fullbright

This commit is contained in:
PeytonPlayz595 2024-05-31 18:33:17 -04:00
parent 38e086fb0a
commit 35ae850a9e
4 changed files with 40 additions and 5 deletions

View File

@ -267,6 +267,7 @@ public class GameSettings {
public boolean ofSmoothBiomes = true;
public boolean ofCustomColors = true;
public boolean hidePassword = true;
public boolean fullBright = false;
public boolean enableFNAWSkins = true;
public int voiceListenRadius = 16;
@ -914,6 +915,10 @@ public class GameSettings {
this.enableVsync = !this.enableVsync;
}
if(parOptions == GameSettings.Options.FULLBRIGHT) {
this.fullBright = !this.fullBright;
}
this.saveOptions();
}
@ -1040,6 +1045,8 @@ public class GameSettings {
return this.enableFNAWSkins;
case EAGLER_VSYNC:
return this.enableVsync;
case FULLBRIGHT:
return this.fullBright;
default:
return false;
}
@ -1318,7 +1325,9 @@ public class GameSettings {
} else if (parOptions == GameSettings.Options.CUSTOM_COLORS) {
return this.ofCustomColors ? s + Lang.getOn() : s + Lang.getOff();
} else if (parOptions == GameSettings.Options.HIDE_PASSWORD) {
return hidePassword ? s + "ON" : s + "OFF";
return this.hidePassword ? s + Lang.getOn() : s + Lang.getOff();
} else if (parOptions == GameSettings.Options.FULLBRIGHT) {
return this.fullBright ? s + Lang.getOn() : s + Lang.getOff();
} else {
return s;
}
@ -1906,6 +1915,10 @@ public class GameSettings {
voicePTTKey = Integer.parseInt(astring[1]);
}
if (astring[0].equals("fullbright") && astring.length >= 2) {
fullBright = Boolean.valueOf(astring[1]).booleanValue();
}
for (SoundCategory soundcategory : SoundCategory._VALUES) {
if (astring[0].equals("soundCategory_" + soundcategory.getCategoryName())) {
this.mapSoundLevels.put(soundcategory, Float.valueOf(this.parseFloat(astring[1])));
@ -2099,6 +2112,7 @@ public class GameSettings {
printwriter.println("voiceSpeakVolume:" + this.voiceSpeakVolume);
printwriter.println("voicePTTKey:" + this.voicePTTKey);
printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
printwriter.println("fullbright:" + this.fullBright);
for (KeyBinding keybinding : this.keyBindings) {
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
@ -2310,7 +2324,8 @@ public class GameSettings {
CUSTOM_COLORS("Custom Colors", false, false),
HIDE_PASSWORD("Hide Password", false, false),
FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
EAGLER_VSYNC("options.vsync", false, true);
EAGLER_VSYNC("options.vsync", false, true),
FULLBRIGHT("Fullbright", false, true);
private final boolean enumFloat;
private final boolean enumBoolean;

View File

@ -9,7 +9,7 @@ import net.minecraft.client.settings.GameSettings;
public class GuiShadow extends GuiScreen {
private static GameSettings.Options[] enumOptions = new GameSettings.Options[] {GameSettings.Options.TOGGLE_SPRINT, GameSettings.Options.CHUNK_BORDERS, GameSettings.Options.HIDE_PASSWORD};
private static GameSettings.Options[] enumOptions = new GameSettings.Options[] {GameSettings.Options.TOGGLE_SPRINT, GameSettings.Options.CHUNK_BORDERS, GameSettings.Options.HIDE_PASSWORD, GameSettings.Options.FULLBRIGHT};
private GuiScreen parentScreen;
protected String title;

View File

@ -864,7 +864,12 @@ public class EntityRenderer implements IResourceManagerReloadListener {
f10 = 1.0F;
}
float f16 = this.mc.gameSettings.gammaSetting;
float f16;
if(this.mc.gameSettings.fullBright) {
f16 = 100F;
} else {
f16 = this.mc.gameSettings.gammaSetting;
}
float f17 = 1.0F - f8;
float f13 = 1.0F - f9;
float f14 = 1.0F - f10;

View File

@ -270,6 +270,7 @@ public class GameSettings extends ModData {
public boolean ofCustomColors = true;
public boolean hidePassword = true;
public boolean enableFNAWSkins = true;
public boolean fullBright = false;
public int voiceListenRadius = 16;
public float voiceListenVolume = 0.5f;
@ -1078,6 +1079,10 @@ public class GameSettings extends ModData {
this.enableVsync = !this.enableVsync;
}
if(parOptions == GameSettings.Options.FULLBRIGHT) {
this.fullBright = !this.fullBright;
}
this.saveOptions();
}
@ -1202,6 +1207,8 @@ public class GameSettings extends ModData {
return this.enableFNAWSkins;
case EAGLER_VSYNC:
return this.enableVsync;
case FULLBRIGHT:
return this.fullBright;
default:
return false;
}
@ -1481,6 +1488,8 @@ public class GameSettings extends ModData {
return this.ofCustomColors ? s + Lang.getOn() : s + Lang.getOff();
} else if (parOptions == GameSettings.Options.HIDE_PASSWORD) {
return hidePassword ? s + "ON" : s + "OFF";
} else if (parOptions == GameSettings.Options.FULLBRIGHT) {
return this.fullBright ? s + Lang.getOn() : s + Lang.getOff();
} else {
return s;
}
@ -2068,6 +2077,10 @@ public class GameSettings extends ModData {
voicePTTKey = Integer.parseInt(astring[1]);
}
if (astring[0].equals("fullbright") && astring.length >= 2) {
fullBright = Boolean.valueOf(astring[1]).booleanValue();
}
for (SoundCategory soundcategory : SoundCategory._VALUES) {
if (astring[0].equals("soundCategory_" + soundcategory.getCategoryName())) {
this.mapSoundLevels.put(soundcategory, Float.valueOf(this.parseFloat(astring[1])));
@ -2261,6 +2274,7 @@ public class GameSettings extends ModData {
printwriter.println("voiceSpeakVolume:" + this.voiceSpeakVolume);
printwriter.println("voicePTTKey:" + this.voicePTTKey);
printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
printwriter.println("fullbright:" + this.fullBright);
for (KeyBinding keybinding : this.keyBindings) {
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
@ -2472,7 +2486,8 @@ public class GameSettings extends ModData {
CUSTOM_COLORS("Custom Colors", false, false),
HIDE_PASSWORD("Hide Password", false, false),
FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
EAGLER_VSYNC("options.vsync", false, true);
EAGLER_VSYNC("options.vsync", false, true),
FULLBRIGHT("Fullbright", false, true);
private final boolean enumFloat;
private final boolean enumBoolean;