make it build on desktop + allow websocket urls to work even when using a proxy
This commit is contained in:
parent
51edb68a01
commit
16cffaeeec
49504
javascript/classes.js
49504
javascript/classes.js
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -46,11 +46,8 @@ public class WebsocketNetworkManager implements INetworkManager {
|
|||
this.isOutputEncrypted = false;
|
||||
String proxyUrl=Minecraft.getMinecraft().gameSettings.proxy;
|
||||
boolean stillConnect=true;
|
||||
if(!proxyUrl.equals("")){
|
||||
if(!proxyUrl.equals("")&&!uri.contains("/")){
|
||||
stillConnect=false;
|
||||
if(uri.startsWith("ws://"))uri=uri.substring(5);
|
||||
if(uri.startsWith("wss://"))uri=uri.substring(6);
|
||||
if(uri.contains("/"))uri=uri.split("/",2)[0];
|
||||
if (ipPattern.matcher(proxyUrl).matches()&&ipPattern.matcher(uri).matches()) {
|
||||
String ip = uri;
|
||||
String port = "25565";
|
||||
|
|
|
@ -64,6 +64,21 @@ import paulscode.sound.SoundSystemConfig;
|
|||
import paulscode.sound.libraries.LibraryLWJGLOpenAL;
|
||||
|
||||
public class EaglerAdapterImpl2 {
|
||||
public static final void startTitleMusic(float volume){
|
||||
|
||||
}
|
||||
|
||||
public static final void stopTitleMusic(){
|
||||
|
||||
}
|
||||
|
||||
public static final void volumeTitleMusic(float volume){
|
||||
|
||||
}
|
||||
|
||||
public static final boolean playingTitleMusic(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public static final boolean _wisWebGL() {
|
||||
return false;
|
||||
|
|
|
@ -68,7 +68,7 @@ public class GuiConnecting extends GuiScreen {
|
|||
}
|
||||
}
|
||||
|
||||
this.clientHandler = new NetClientHandler(this.mc, uri, 0);
|
||||
this.clientHandler = new NetClientHandler(this.mc, this.mc.gameSettings.proxy==""?uri:uria, 0);
|
||||
if(this.mc.gameSettings.useDefaultProtocol) {
|
||||
this.clientHandler.addToSendQueue(new Packet2ClientProtocol(61, EaglerProfile.username, uria, port));
|
||||
}else{
|
||||
|
|
|
@ -324,7 +324,7 @@ public class SoundManager {
|
|||
private float titleMusicVol = 0.5F;
|
||||
|
||||
public void playTheTitleMusic() {
|
||||
if(EaglerAdapter._wisWebGL()){
|
||||
if(EaglerAdapter.isWebGL){
|
||||
if(titleMusic == -1 || !EaglerAdapter.playingTitleMusic()) {
|
||||
titleMusic = 1;
|
||||
EaglerAdapter.startTitleMusic(this.options.musicVolume);
|
||||
|
@ -340,7 +340,7 @@ public class SoundManager {
|
|||
}
|
||||
|
||||
public void stopTheTitleMusic() {
|
||||
if(EaglerAdapter._wisWebGL()) {
|
||||
if(EaglerAdapter.isWebGL) {
|
||||
if (EaglerAdapter.playingTitleMusic()) {
|
||||
EaglerAdapter.stopTitleMusic();
|
||||
}
|
||||
|
|
|
@ -47,11 +47,8 @@ public class WebsocketNetworkManager implements INetworkManager {
|
|||
this.isOutputEncrypted = false;
|
||||
String proxyUrl=Minecraft.getMinecraft().gameSettings.proxy;
|
||||
boolean stillConnect=true;
|
||||
if(!proxyUrl.equals("")){
|
||||
if(!proxyUrl.equals("")&&!uri.contains("/")){
|
||||
stillConnect=false;
|
||||
if(uri.startsWith("ws://"))uri=uri.substring(5);
|
||||
if(uri.startsWith("wss://"))uri=uri.substring(6);
|
||||
if(uri.contains("/"))uri=uri.split("/",2)[0];
|
||||
if (ipPattern.matcher(proxyUrl).matches()&&ipPattern.matcher(uri).matches()) {
|
||||
String ip = uri;
|
||||
String port = "25565";
|
||||
|
|
Loading…
Reference in New Issue
Block a user