Update source to eaglercraft.com
This commit is contained in:
parent
444d395024
commit
e66bcfa081
|
@ -89,4 +89,8 @@ public class BufferedImage {
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int[] getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
117
src/net/lax1dude/eaglercraft/EarlyLoadScreen.java
Normal file
117
src/net/lax1dude/eaglercraft/EarlyLoadScreen.java
Normal file
File diff suppressed because one or more lines are too long
|
@ -69,6 +69,7 @@ import net.lax1dude.eaglercraft.adapter.teavm.WebGLVertexArray;
|
||||||
import net.minecraft.src.MathHelper;
|
import net.minecraft.src.MathHelper;
|
||||||
import net.PeytonPlayz585.opengl.GL11;
|
import net.PeytonPlayz585.opengl.GL11;
|
||||||
import net.PeytonPlayz585.storage.LocalStorageManager;
|
import net.PeytonPlayz585.storage.LocalStorageManager;
|
||||||
|
import net.lax1dude.eaglercraft.EarlyLoadScreen;
|
||||||
import net.lax1dude.eaglercraft.AssetRepository;
|
import net.lax1dude.eaglercraft.AssetRepository;
|
||||||
import net.lax1dude.eaglercraft.Base64;
|
import net.lax1dude.eaglercraft.Base64;
|
||||||
import net.lax1dude.eaglercraft.Client;
|
import net.lax1dude.eaglercraft.Client;
|
||||||
|
@ -76,8 +77,6 @@ import net.lax1dude.eaglercraft.BufferedImage;
|
||||||
import net.lax1dude.eaglercraft.JSONObject;
|
import net.lax1dude.eaglercraft.JSONObject;
|
||||||
import net.lax1dude.eaglercraft.adapter.teavm.IndexedDBFilesystem;
|
import net.lax1dude.eaglercraft.adapter.teavm.IndexedDBFilesystem;
|
||||||
import net.lax1dude.eaglercraft.adapter.teavm.IndexedDBFilesystem.OpenState;
|
import net.lax1dude.eaglercraft.adapter.teavm.IndexedDBFilesystem.OpenState;
|
||||||
//import net.lax1dude.eaglercraft.adapter.teavm.IndexedDBFilesystem;
|
|
||||||
//import net.lax1dude.eaglercraft.adapter.teavm.IndexedDBFilesystem.OpenState;
|
|
||||||
import net.lax1dude.eaglercraft.adapter.teavm.WebGL2RenderingContext;
|
import net.lax1dude.eaglercraft.adapter.teavm.WebGL2RenderingContext;
|
||||||
import static net.lax1dude.eaglercraft.adapter.teavm.WebGL2RenderingContext.*;
|
import static net.lax1dude.eaglercraft.adapter.teavm.WebGL2RenderingContext.*;
|
||||||
|
|
||||||
|
@ -320,6 +319,8 @@ public class EaglerAdapterImpl2 {
|
||||||
dataBaseName = config.getString("dataBaseName");
|
dataBaseName = config.getString("dataBaseName");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EarlyLoadScreen.paintScreen();
|
||||||
|
|
||||||
OpenState st = IndexedDBFilesystem.initialize();
|
OpenState st = IndexedDBFilesystem.initialize();
|
||||||
if(st != OpenState.OPENED) {
|
if(st != OpenState.OPENED) {
|
||||||
if(st == OpenState.LOCKED) {
|
if(st == OpenState.LOCKED) {
|
||||||
|
|
|
@ -6,17 +6,33 @@ public class GuiConnecting extends GuiScreen {
|
||||||
private NetClientHandler clientHandler;
|
private NetClientHandler clientHandler;
|
||||||
private boolean cancelled = false;
|
private boolean cancelled = false;
|
||||||
|
|
||||||
|
private Minecraft minecraft;
|
||||||
|
private String uri;
|
||||||
|
private int timer = 0;
|
||||||
|
|
||||||
public GuiConnecting(Minecraft var1, String var2) {
|
public GuiConnecting(Minecraft var1, String var2) {
|
||||||
System.out.println("Connecting to " + var2);
|
System.out.println("Connecting to " + var2);
|
||||||
var1.changeWorld1((World)null);
|
var1.changeWorld1((World)null);
|
||||||
(new ThreadConnectToServer(this, var1, var2)).start();
|
|
||||||
|
this.minecraft = var1;
|
||||||
|
this.uri = var2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateScreen() {
|
public void updateScreen() {
|
||||||
|
/*
|
||||||
|
* Connects AFTER drawing screen, this fixes two issues
|
||||||
|
* 1. A blank background while the connection is being initialized
|
||||||
|
* 2. The connection failed screen not showing due to the connecting screen being rendered AFTER the connection failed
|
||||||
|
*/
|
||||||
|
if (timer > 2 && this.clientHandler == null) {
|
||||||
|
(new ThreadConnectToServer(this, this.minecraft, this.uri)).start();
|
||||||
|
}
|
||||||
if(this.clientHandler != null) {
|
if(this.clientHandler != null) {
|
||||||
this.clientHandler.processReadPackets();
|
this.clientHandler.processReadPackets();
|
||||||
}
|
}
|
||||||
|
if(timer >= 1) {
|
||||||
|
++timer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void keyTyped(char var1, int var2) {
|
protected void keyTyped(char var1, int var2) {
|
||||||
|
@ -41,6 +57,10 @@ public class GuiConnecting extends GuiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawScreen(int var1, int var2, float var3) {
|
public void drawScreen(int var1, int var2, float var3) {
|
||||||
|
if(timer == 0) {
|
||||||
|
timer = 1;
|
||||||
|
}
|
||||||
|
|
||||||
this.drawDefaultBackground();
|
this.drawDefaultBackground();
|
||||||
StringTranslate var4 = StringTranslate.getInstance();
|
StringTranslate var4 = StringTranslate.getInstance();
|
||||||
if(this.clientHandler == null) {
|
if(this.clientHandler == null) {
|
||||||
|
|
|
@ -15,27 +15,10 @@ public class GuiMainMenu extends GuiScreen {
|
||||||
private String splashText = "missingno";
|
private String splashText = "missingno";
|
||||||
private GuiButton multiplayerButton;
|
private GuiButton multiplayerButton;
|
||||||
|
|
||||||
|
byte[] splash = new byte[] {77, 97, 100, 101, 32, 98, 121, 32, 80, 101, 121, 116, 111, 110, 80, 108, 97, 121, 122, 53, 56, 53, 33};
|
||||||
|
|
||||||
public GuiMainMenu() {
|
public GuiMainMenu() {
|
||||||
try {
|
splashText = new String(splash);
|
||||||
ArrayList var1 = new ArrayList();
|
|
||||||
BufferedReader var2 = new BufferedReader(new InputStreamReader(GL11.getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8")));
|
|
||||||
String var3 = "";
|
|
||||||
|
|
||||||
while(true) {
|
|
||||||
var3 = var2.readLine();
|
|
||||||
if(var3 == null) {
|
|
||||||
this.splashText = (String)var1.get(rand.nextInt(var1.size()));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
var3 = var3.trim();
|
|
||||||
if(var3.length() > 0) {
|
|
||||||
var1.add(var3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception var4) {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateScreen() {
|
public void updateScreen() {
|
||||||
|
|
|
@ -21,13 +21,14 @@ class ThreadConnectToServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiConnecting.getNetClientHandler(this.connectingGui).handleHandshake();
|
GuiConnecting.getNetClientHandler(this.connectingGui).handleHandshake();
|
||||||
} catch (Exception var4) {
|
} catch (Throwable var4) {
|
||||||
|
System.out.println("yee");
|
||||||
if(GuiConnecting.isCancelled(this.connectingGui)) {
|
if(GuiConnecting.isCancelled(this.connectingGui)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var4.printStackTrace();
|
|
||||||
this.mc.displayGuiScreen(new GuiConnectFailed("connect.failed", "disconnect.genericReason", new Object[]{var4.toString()}));
|
this.mc.displayGuiScreen(new GuiConnectFailed("connect.failed", "disconnect.genericReason", new Object[]{var4.toString()}));
|
||||||
|
var4.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user