commit
7b5e336606
|
@ -1,5 +1,7 @@
|
||||||
package net.lax1dude.eaglercraft;
|
package net.lax1dude.eaglercraft;
|
||||||
|
|
||||||
|
import net.minecraft.src.NBTTagList;
|
||||||
|
|
||||||
public class ConfigConstants {
|
public class ConfigConstants {
|
||||||
|
|
||||||
public static boolean profanity = false;
|
public static boolean profanity = false;
|
||||||
|
@ -18,5 +20,6 @@ public class ConfigConstants {
|
||||||
public static String mainMenuItemLine1 = null;
|
public static String mainMenuItemLine1 = null;
|
||||||
public static String mainMenuItemLine2 = null;
|
public static String mainMenuItemLine2 = null;
|
||||||
public static String mainMenuItemLink = null;
|
public static String mainMenuItemLink = null;
|
||||||
|
public static NBTTagList splashTexts = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package net.minecraft.src;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.ConfigConstants;
|
import net.lax1dude.eaglercraft.ConfigConstants;
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
@ -11,13 +13,16 @@ import net.lax1dude.eaglercraft.GuiScreenEditProfile;
|
||||||
import net.lax1dude.eaglercraft.LocalStorageManager;
|
import net.lax1dude.eaglercraft.LocalStorageManager;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.lax1dude.eaglercraft.Base64;
|
||||||
|
|
||||||
public class GuiMainMenu extends GuiScreen {
|
public class GuiMainMenu extends GuiScreen {
|
||||||
|
|
||||||
/** The RNG used by the Main Menu Screen. */
|
/** The RNG used by the Main Menu Screen. */
|
||||||
private static final EaglercraftRandom rand = new EaglercraftRandom();
|
private static final EaglercraftRandom rand = new EaglercraftRandom();
|
||||||
|
|
||||||
/** The splash message. */
|
/** The splash message. */
|
||||||
private String splashText = "missingno";
|
public String splashText = "missingno";
|
||||||
private GuiButton buttonResetDemo;
|
private GuiButton buttonResetDemo;
|
||||||
|
|
||||||
private static boolean showingEndian = true;
|
private static boolean showingEndian = true;
|
||||||
|
@ -89,6 +94,11 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
* RunnableTitleScreen(this), "1.6 Update Check Thread")).start(); }
|
* RunnableTitleScreen(this), "1.6 Update Check Thread")).start(); }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (enableSplash) {
|
||||||
|
EaglercraftRandom rand = new EaglercraftRandom();
|
||||||
|
NBTTagList splashesList = ConfigConstants.splashTexts;
|
||||||
|
this.splashText = ((NBTTagString) splashesList.tagAt(rand.nextInt(splashesList.tagCount()))).data;
|
||||||
|
}
|
||||||
this.field_92025_p = EaglerAdapter._wisWebGL() ? ("eaglercraft javascript runtime") : ("eaglercraft desktop runtime");
|
this.field_92025_p = EaglerAdapter._wisWebGL() ? ("eaglercraft javascript runtime") : ("eaglercraft desktop runtime");
|
||||||
this.start = System.currentTimeMillis() + System.currentTimeMillis() % 10000l;
|
this.start = System.currentTimeMillis() + System.currentTimeMillis() % 10000l;
|
||||||
this.ackLines = new ArrayList();
|
this.ackLines = new ArrayList();
|
||||||
|
@ -146,8 +156,6 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
Calendar var1 = Calendar.getInstance();
|
Calendar var1 = Calendar.getInstance();
|
||||||
var1.setTime(new Date());
|
var1.setTime(new Date());
|
||||||
|
|
||||||
this.splashText = "darviglet!";
|
|
||||||
|
|
||||||
StringTranslate var2 = StringTranslate.getInstance();
|
StringTranslate var2 = StringTranslate.getInstance();
|
||||||
int var4 = this.height / 4 + 48;
|
int var4 = this.height / 4 + 48;
|
||||||
|
|
||||||
|
@ -207,6 +215,9 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static boolean enableSplash = false;
|
||||||
|
|
||||||
protected void mouseClicked(int par1, int par2, int par3) {
|
protected void mouseClicked(int par1, int par2, int par3) {
|
||||||
if(!showAck) {
|
if(!showAck) {
|
||||||
super.mouseClicked(par1, par2, par3);
|
super.mouseClicked(par1, par2, par3);
|
||||||
|
@ -470,17 +481,6 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
this.drawTexturedModalRect(var6 + 99 + 26 + 3, var7 + 0, 99, 0, 26, 44);
|
this.drawTexturedModalRect(var6 + 99 + 26 + 3, var7 + 0, 99, 0, 26, 44);
|
||||||
this.drawTexturedModalRect(var6 + 154, var7 + 0, 0, 45, 155, 44);
|
this.drawTexturedModalRect(var6 + 154, var7 + 0, 0, 45, 155, 44);
|
||||||
|
|
||||||
/*
|
|
||||||
* var4.setColorOpaque_I(16777215); EaglerAdapter.glPushMatrix();
|
|
||||||
* EaglerAdapter.glTranslatef((float)(this.width / 2 + 90), 70.0F, 0.0F);
|
|
||||||
* EaglerAdapter.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F); float var8 = 1.8F -
|
|
||||||
* MathHelper.abs(MathHelper.sin((float)(Minecraft.getSystemTime() % 1000L) /
|
|
||||||
* 1000.0F * (float)Math.PI * 2.0F) * 0.1F); var8 = var8 * 100.0F /
|
|
||||||
* (float)(this.fontRenderer.getStringWidth(this.splashText) + 32);
|
|
||||||
* EaglerAdapter.glScalef(var8, var8, var8); this.drawCenteredString(this.fontRenderer,
|
|
||||||
* this.splashText, 0, -8, 16776960); EaglerAdapter.glPopMatrix();
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.drawString(this.fontRenderer, "minecraft 1.5.2", 2, this.height - 20, 16777215);
|
this.drawString(this.fontRenderer, "minecraft 1.5.2", 2, this.height - 20, 16777215);
|
||||||
this.drawString(this.fontRenderer, ConfigConstants.mainMenuString + EnumChatFormatting.GRAY + " (cracked)", 2, this.height - 10, 16777215);
|
this.drawString(this.fontRenderer, ConfigConstants.mainMenuString + EnumChatFormatting.GRAY + " (cracked)", 2, this.height - 10, 16777215);
|
||||||
|
|
||||||
|
@ -502,6 +502,17 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
// this.field_92024_r) / 2, ((GuiButton)this.buttonList.get(0)).yPosition - 12,
|
// this.field_92024_r) / 2, ((GuiButton)this.buttonList.get(0)).yPosition - 12,
|
||||||
// 16777215);
|
// 16777215);
|
||||||
}
|
}
|
||||||
|
if (enableSplash) {
|
||||||
|
var4.setColorOpaque_I(16777215);
|
||||||
|
EaglerAdapter.glPushMatrix();
|
||||||
|
EaglerAdapter.glTranslatef((float) (this.width / 2 + 90), 70.0F, 0.0F);
|
||||||
|
EaglerAdapter.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||||
|
float var8 = 1.8F - MathHelper.abs(MathHelper.sin((float) (Minecraft.getSystemTime() % 1000L) / 1000.0F * (float) Math.PI * 2.0F) * 0.1F);
|
||||||
|
var8 = var8 * 100.0F / (float) (this.fontRenderer.getStringWidth(this.splashText) + 32);
|
||||||
|
EaglerAdapter.glScalef(var8, var8, var8);
|
||||||
|
this.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
|
||||||
|
EaglerAdapter.glPopMatrix();
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
String lid = "(login is disabled, this copy violates Mojang's terms of service)";
|
String lid = "(login is disabled, this copy violates Mojang's terms of service)";
|
||||||
int sl = this.fontRenderer.getStringWidth(lid);
|
int sl = this.fontRenderer.getStringWidth(lid);
|
||||||
|
|
|
@ -7,10 +7,7 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.Base64;
|
import net.lax1dude.eaglercraft.*;
|
||||||
import net.lax1dude.eaglercraft.ConfigConstants;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
import net.lax1dude.eaglercraft.LocalStorageManager;
|
|
||||||
import net.lax1dude.eaglercraft.ServerQuery.QueryResponse;
|
import net.lax1dude.eaglercraft.ServerQuery.QueryResponse;
|
||||||
import net.lax1dude.eaglercraft.adapter.EaglerAdapterImpl2.RateLimit;
|
import net.lax1dude.eaglercraft.adapter.EaglerAdapterImpl2.RateLimit;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -36,6 +33,10 @@ public class ServerList {
|
||||||
public static void loadDefaultServers(String base64) {
|
public static void loadDefaultServers(String base64) {
|
||||||
try {
|
try {
|
||||||
NBTTagCompound nbt = CompressedStreamTools.readUncompressed(Base64.decodeBase64(base64));
|
NBTTagCompound nbt = CompressedStreamTools.readUncompressed(Base64.decodeBase64(base64));
|
||||||
|
GuiMainMenu.enableSplash = nbt.getBoolean("enableSplash");
|
||||||
|
if (GuiMainMenu.enableSplash) {
|
||||||
|
ConfigConstants.splashTexts = nbt.getTagList("splashes");
|
||||||
|
}
|
||||||
ConfigConstants.profanity = nbt.getBoolean("profanity");
|
ConfigConstants.profanity = nbt.getBoolean("profanity");
|
||||||
hideDownDefaultServers = nbt.getBoolean("hide_down");
|
hideDownDefaultServers = nbt.getBoolean("hide_down");
|
||||||
ConfigConstants.ayonullTitle = nbt.hasKey("serverListTitle") ? nbt.getString("serverListTitle") : null;
|
ConfigConstants.ayonullTitle = nbt.hasKey("serverListTitle") ? nbt.getString("serverListTitle") : null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user