Super Secret Settings

This commit is contained in:
peytonplayz595 2023-09-03 05:42:52 -05:00
parent cb454d4b85
commit 8b49fc7aa3
13 changed files with 203 additions and 43 deletions

View File

@ -1870,20 +1870,17 @@
"music.menu": {
"category": "music",
"sounds": [
{
"name": "music/menu/menu1",
"stream": true
},
{
"name": "music/menu/menu2",
"stream": true
}
]
},
"music.menu.secret" : {
"category": "music",
"sounds": [
{
"name": "music/menu/menu3",
"stream": true
},
{
"name": "music/menu/menu4",
"name": "music/menu/secret/menu5",
"stream": true
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

@ -0,0 +1,87 @@
package net.PeytonPlayz585.shadow.gui;
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.lax1dude.eaglercraft.v1_8.profile.GuiScreenEditProfile;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiButtonLanguage;
import net.minecraft.client.gui.GuiLanguage;
import net.minecraft.client.gui.GuiMultiplayer;
import net.minecraft.client.gui.GuiOptions;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
public class GuiSecretMainMenu extends GuiScreen {
ResourceLocation mainMenuTexture = new ResourceLocation("textures/gui/title/background/secret/secret.png");
private static final ResourceLocation minecraftTitleTextures = new ResourceLocation("textures/gui/title/minecraft.png");
public void initGui() {
int i = height / 4 + 48;
this.addSingleplayerMultiplayerButtons(i, 24);
this.buttonList.add(new GuiButton(0, width / 2 - 100, i + 72 + 12, 98, 20, I18n.format("menu.options", new Object[0])));
this.buttonList.add(new GuiButton(4, width / 2 + 2, i + 72 + 12, 98, 20, I18n.format("menu.editProfile", new Object[0])));
this.buttonList.add(new GuiButtonLanguage(5, width / 2 - 124, i + 72 + 12));
super.initGui();
}
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
GlStateManager.pushMatrix();
float f = ((float) (1 % 8) / (float) 80 - 0.5F) / 64.0F;
float f1 = ((float) (1 / 8) / (float) 8 - 0.5F) / 64.0F;
float f2 = 0.0F;
short short1 = 274;
int k = width / 2 - short1 / 2;
byte b0 = 30;
GlStateManager.translate(f, f1, f2);
mc.getTextureManager().bindTexture(mainMenuTexture);
GlStateManager.translate(f, f1, f2);
drawModalRectWithCustomSizedTexture(0, 0, 0, 0, width, height, width, height);
GlStateManager.popMatrix();
drawGradientRect(0, 0, width, height, -2130706433, 16777215);
drawGradientRect(0, 0, width, height, 0, Integer.MIN_VALUE);
mc.getTextureManager().bindTexture(minecraftTitleTextures);
//GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); //no lol...
drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 99, 44);
drawTexturedModalRect(k + 99, b0 + 0, 129, 0, 27, 44);
drawTexturedModalRect(k + 99 + 26, b0 + 0, 126, 0, 3, 44);
drawTexturedModalRect(k + 99 + 26 + 3, b0 + 0, 99, 0, 26, 44);
drawTexturedModalRect(k + 154, b0 + 0, 0, 45, 155, 44);
super.drawScreen(mouseX, mouseY, partialTicks);
}
protected void actionPerformed(GuiButton button) {
if (button.id == 0) {
this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
}
if (button.id == 5) {
this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
}
if (button.id == 2) {
this.mc.displayGuiScreen(new GuiMultiplayer(this));
}
if (button.id == 4) {
this.mc.displayGuiScreen(new GuiScreenEditProfile(this));
}
if (button.id == 14) {
EagRuntime.openLink(EaglercraftVersion.projectForkURL);
}
super.actionPerformed(button);
}
private void addSingleplayerMultiplayerButtons(int parInt1, int parInt2) {
GuiButton btn;
this.buttonList.add(new GuiButton(2, width / 2 - 100, parInt1 + parInt2 * 0, I18n.format("menu.multiplayer", new Object[0])));
this.buttonList.add(btn = new GuiButton(14, width / 2 - 100, parInt1 + parInt2 * 1, I18n.format("menu.forkOnGitlab", new Object[0])));
btn.enabled = EaglercraftVersion.mainMenuEnableGithubButton;
}
}

View File

@ -19,6 +19,7 @@ import org.apache.commons.lang3.Validate;
import com.google.common.collect.Lists;
import net.FatalCodes.shadow.Shadow;
import net.PeytonPlayz585.shadow.gui.GuiSecretMainMenu;
import net.lax1dude.eaglercraft.v1_8.Display;
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
import net.lax1dude.eaglercraft.v1_8.HString;
@ -461,12 +462,19 @@ public class Minecraft implements IThreadListener {
ServerList.initServerList(this);
EaglerProfile.read();
if(!this.gameSettings.secret) {
if (this.serverName != null) {
this.displayGuiScreen(new GuiScreenEditProfile(
new GuiConnecting(new GuiMainMenu(), this, this.serverName, this.serverPort)));
this.displayGuiScreen(new GuiScreenEditProfile(new GuiConnecting(new GuiMainMenu(), this, this.serverName, this.serverPort)));
} else {
this.displayGuiScreen(new GuiScreenEditProfile(new GuiMainMenu()));
}
} else {
if (this.serverName != null) {
this.displayGuiScreen(new GuiScreenEditProfile(new GuiConnecting(new GuiSecretMainMenu(), this, this.serverName, this.serverPort)));
} else {
this.displayGuiScreen(new GuiScreenEditProfile(new GuiSecretMainMenu()));
}
}
this.renderEngine.deleteTexture(this.mojangLogo);
this.mojangLogo = null;
@ -651,20 +659,38 @@ public class Minecraft implements IThreadListener {
* screen.
*/
public void displayGuiScreen(GuiScreen guiScreenIn) {
if(guiScreenIn instanceof GuiMainMenu && this.gameSettings.secret) {
guiScreenIn = new GuiSecretMainMenu();
} else if(guiScreenIn instanceof GuiSecretMainMenu && !this.gameSettings.secret) {
guiScreenIn = new GuiMainMenu();
}
if (this.currentScreen != null) {
this.currentScreen.onGuiClosed();
}
if (guiScreenIn == null && this.theWorld == null) {
if(!this.gameSettings.secret) {
guiScreenIn = new GuiMainMenu();
} else {
guiScreenIn = new GuiSecretMainMenu();
}
} else if (guiScreenIn == null && this.thePlayer.getHealth() <= 0.0F) {
guiScreenIn = new GuiGameOver();
}
if(!this.gameSettings.secret) {
if (guiScreenIn instanceof GuiMainMenu) {
this.gameSettings.showDebugInfo = false;
this.ingameGUI.getChatGUI().clearChatMessages();
}
} else {
if (guiScreenIn instanceof GuiSecretMainMenu) {
this.gameSettings.showDebugInfo = false;
this.ingameGUI.getChatGUI().clearChatMessages();
}
}
this.currentScreen = (GuiScreen) guiScreenIn;
if (guiScreenIn != null) {
@ -2101,15 +2127,11 @@ public class Minecraft implements IThreadListener {
}
public MusicTicker.MusicType getAmbientMusicType() {
return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell
? MusicTicker.MusicType.NETHER
: (this.thePlayer.worldObj.provider instanceof WorldProviderEnd
? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS
: MusicTicker.MusicType.END)
: (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying
? MusicTicker.MusicType.CREATIVE
: MusicTicker.MusicType.GAME)))
: MusicTicker.MusicType.MENU;
if(!this.gameSettings.secret) {
return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell ? MusicTicker.MusicType.NETHER : (this.thePlayer.worldObj.provider instanceof WorldProviderEnd ? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))) : MusicTicker.MusicType.MENU;
} else {
return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell ? MusicTicker.MusicType.NETHER : (this.thePlayer.worldObj.provider instanceof WorldProviderEnd ? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))) : MusicTicker.MusicType.MENU_SECRET;
}
}
public void dispatchKeypresses() {

View File

@ -78,6 +78,7 @@ public class MusicTicker implements ITickable {
public static enum MusicType {
MENU(new ResourceLocation("minecraft:music.menu"), 20, 600),
MENU_SECRET(new ResourceLocation("minecraft:music.menu.secret"), 0, 0),
GAME(new ResourceLocation("minecraft:music.game"), 12000, 24000),
CREATIVE(new ResourceLocation("minecraft:music.game.creative"), 1200, 3600),
CREDITS(new ResourceLocation("minecraft:music.game.end.credits"), Integer.MAX_VALUE, Integer.MAX_VALUE),

View File

@ -1,5 +1,6 @@
package net.minecraft.client.gui;
import net.PeytonPlayz585.shadow.gui.GuiSecretMainMenu;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.resources.I18n;
@ -81,7 +82,11 @@ public class GuiGameOver extends GuiScreen implements GuiYesNoCallback {
if (this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled()) {
this.mc.theWorld.sendQuittingDisconnectingPacket();
this.mc.loadWorld((WorldClient) null);
if(!this.mc.gameSettings.secret) {
this.mc.displayGuiScreen(new GuiMainMenu());
} else {
this.mc.displayGuiScreen(new GuiSecretMainMenu());
}
} else {
GuiYesNo guiyesno = new GuiYesNo(this, I18n.format("deathScreen.quit.confirm", new Object[0]), "",
I18n.format("deathScreen.titleScreen", new Object[0]),
@ -97,7 +102,11 @@ public class GuiGameOver extends GuiScreen implements GuiYesNoCallback {
if (flag) {
this.mc.theWorld.sendQuittingDisconnectingPacket();
this.mc.loadWorld((WorldClient) null);
if(!this.mc.gameSettings.secret) {
this.mc.displayGuiScreen(new GuiMainMenu());
} else {
this.mc.displayGuiScreen(new GuiSecretMainMenu());
}
} else {
this.mc.thePlayer.respawnPlayer();
this.mc.displayGuiScreen((GuiScreen) null);

View File

@ -1,5 +1,6 @@
package net.minecraft.client.gui;
import net.PeytonPlayz585.shadow.gui.GuiSecretMainMenu;
import net.lax1dude.eaglercraft.v1_8.Mouse;
import net.minecraft.client.gui.achievement.GuiAchievements;
import net.minecraft.client.gui.achievement.GuiStats;
@ -69,11 +70,19 @@ public class GuiIngameMenu extends GuiScreen {
parGuiButton.enabled = false;
this.mc.theWorld.sendQuittingDisconnectingPacket();
this.mc.loadWorld((WorldClient) null);
if(!this.mc.gameSettings.secret) {
if (flag) {
this.mc.displayGuiScreen(new GuiMainMenu());
} else {
this.mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu()));
}
} else {
if (flag) {
this.mc.displayGuiScreen(new GuiSecretMainMenu());
} else {
this.mc.displayGuiScreen(new GuiMultiplayer(new GuiSecretMainMenu()));
}
}
case 2:
case 3:
default:

View File

@ -10,6 +10,7 @@ import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import net.PeytonPlayz585.shadow.gui.GuiSecretMainMenu;
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
@ -96,6 +97,11 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback {
private static ResourceLocation backgroundTexture = null;
public GuiMainMenu() {
if(Minecraft.getMinecraft().gameSettings.secret) {
this.mc.displayGuiScreen(new GuiSecretMainMenu());
return;
}
this.splashText = "missingno";
BufferedReader bufferedreader = null;

View File

@ -1,5 +1,6 @@
package net.minecraft.client.gui;
import net.PeytonPlayz585.shadow.gui.GuiSecretMainMenu;
import net.minecraft.client.resources.I18n;
/**+
@ -40,7 +41,11 @@ public class GuiMemoryErrorScreen extends GuiScreen {
*/
protected void actionPerformed(GuiButton parGuiButton) {
if (parGuiButton.id == 0) {
if(!this.mc.gameSettings.secret) {
this.mc.displayGuiScreen(new GuiMainMenu());
} else {
this.mc.displayGuiScreen(new GuiSecretMainMenu());
}
} else if (parGuiButton.id == 1) {
this.mc.shutdown();
}

View File

@ -1,6 +1,7 @@
package net.minecraft.client.gui;
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
import net.lax1dude.eaglercraft.v1_8.Keyboard;
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShaderConfig;
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShadersNotSupported;
@ -38,10 +39,15 @@ public class GuiOptions extends GuiScreen implements GuiYesNoCallback {
private GuiLockIconButton field_175356_r;
protected String field_146442_a = "Options";
private GuiButton broadcastSettings;
private boolean secret;
public GuiOptions(GuiScreen parGuiScreen, GameSettings parGameSettings) {
secret = false;
this.field_146441_g = parGuiScreen;
this.game_settings_1 = parGameSettings;
if(Keyboard.isKeyDown(42)) {
secret = true;
}
}
/**+
@ -89,8 +95,11 @@ public class GuiOptions extends GuiScreen implements GuiYesNoCallback {
this.buttonList.add(new GuiButton(110, this.width / 2 - 155, this.height / 6 + 48 - 6, 150, 20,
I18n.format("options.skinCustomisation", new Object[0])));
this.buttonList.add(new GuiButton(8675309, this.width / 2 + 5, this.height / 6 + 48 - 6, 150, 20,
I18n.format("shaders.gui.optionsButton")));
GuiButton button;
this.buttonList.add(button = new GuiButton(8675309, this.width / 2 + 5, this.height / 6 + 48 - 6, 150, 20, "Super Secret Settings"));
if(!secret) {
button.enabled = false;
}
this.buttonList.add(new GuiButton(106, this.width / 2 - 155, this.height / 6 + 72 - 6, 150, 20,
I18n.format("options.sounds", new Object[0])));
this.buttonList.add(broadcastSettings = new GuiButton(107, this.width / 2 + 5, this.height / 6 + 72 - 6, 150,
@ -174,12 +183,14 @@ public class GuiOptions extends GuiScreen implements GuiYesNoCallback {
}
if (parGuiButton.id == 8675309) {
if (EaglerDeferredPipeline.isSupported()) {
this.mc.displayGuiScreen(new GuiShaderConfig(this));
} else {
this.mc.displayGuiScreen(new GuiShadersNotSupported(this,
I18n.format(EaglerDeferredPipeline.getReasonUnsupported())));
}
// if (EaglerDeferredPipeline.isSupported()) {
// this.mc.displayGuiScreen(new GuiShaderConfig(this));
// } else {
// this.mc.displayGuiScreen(new GuiShadersNotSupported(this,
// I18n.format(EaglerDeferredPipeline.getReasonUnsupported())));
// }
mc.gameSettings.secret = !mc.gameSettings.secret;
mc.gameSettings.saveOptions();
}
if (parGuiButton.id == 101) {

View File

@ -5,6 +5,8 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import net.PeytonPlayz585.shadow.gui.GuiSecretMainMenu;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
@ -715,8 +717,11 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
this.gameController
.displayGuiScreen(new GuiDisconnected(this.guiScreenServer, "disconnect.lost", ichatcomponent));
} else {
this.gameController.displayGuiScreen(
new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.lost", ichatcomponent));
if(!Minecraft.getMinecraft().gameSettings.secret) {
this.gameController.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.lost", ichatcomponent));
} else {
this.gameController.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiSecretMainMenu()), "disconnect.lost", ichatcomponent));
}
}
}

View File

@ -225,6 +225,9 @@ public class GameSettings {
public boolean ofAnimatedTerrain = true;
public boolean ofAnimatedTextures = true;
//Super Secret Setting :>
public boolean secret = false;
public GameSettings(Minecraft mcIn) {
this.keyBindings = (KeyBinding[]) ArrayUtils.addAll(new KeyBinding[] { this.keyBindAttack, this.keyBindUseItem,
this.keyBindForward, this.keyBindLeft, this.keyBindBack, this.keyBindRight, this.keyBindJump,
@ -1221,6 +1224,10 @@ public class GameSettings {
}
}
if (astring[0].equals("secret") && astring.length >= 2) {
this.secret = Boolean.valueOf(astring[1]).booleanValue();
}
Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
for (SoundCategory soundcategory : SoundCategory.values()) {
@ -1350,6 +1357,7 @@ public class GameSettings {
printwriter.println("ofBetterGrass:" + this.ofBetterGrass);
printwriter.println("ofFogType:" + this.ofFogType);
printwriter.println("ofFogStart:" + this.ofFogStart);
printwriter.print("secret:" + this.secret);
for (KeyBinding keybinding : this.keyBindings) {
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());