net.minecraft.realms.RealmsBridge Java Examples

The following examples show how to use net.minecraft.realms.RealmsBridge. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MixinGuiDownloadTerrain.java    From LiquidBounce with GNU General Public License v3.0 7 votes vote down vote up
@Override
protected void injectedActionPerformed(GuiButton button) {
    if (button.id == 0) {
        boolean flag = this.mc.isIntegratedServerRunning();
        boolean flag1 = this.mc.isConnectedToRealms();
        button.enabled = false;
        this.mc.theWorld.sendQuittingDisconnectingPacket();
        this.mc.loadWorld(null);

        if (flag) {
            this.mc.displayGuiScreen(new GuiMainMenu());
        } else if (flag1) {
            RealmsBridge realmsbridge = new RealmsBridge();
            realmsbridge.switchToRealms(new GuiMainMenu());
        } else {
            this.mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu()));
        }
    }

}
 
Example #2
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().D();
	boolean isConnectedToRealms = getMinecraft().ah();
	if (getWorld() != null) {
		getWorld().M();
	}
	getMinecraft().a((bln) null);
	if (isOnIntegratedServer) {
		displayScreen(new bga());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new bga());
	} else {
		displayScreen(new bhj(new bga()));
	}
}
 
Example #3
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().w();
	boolean isConnectedToRealms = getMinecraft().Z();
	if (getWorld() != null) {
		getWorld().S();
	}
	getMinecraft().a((cqv) null);
	if (isOnIntegratedServer) {
		displayScreen(new cjx());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new cjx());
	} else {
		displayScreen(new clm(new cjx()));
	}
}
 
Example #4
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().E();
	boolean isConnectedToRealms = getMinecraft().al();
	if (getWorld() != null) {
		getWorld().H();
	}
	getMinecraft().a((bdb) null);
	if (isOnIntegratedServer) {
		displayScreen(new aya());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new aya());
	} else {
		displayScreen(new azh(new aya()));
	}
}
 
Example #5
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().D();
	boolean isConnectedToRealms = getMinecraft().ai();
	if (getWorld() != null) {
		getWorld().M();
	}
	getMinecraft().a((bks) null);
	if (isOnIntegratedServer) {
		displayScreen(new bfg());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new bfg());
	} else {
		displayScreen(new bgp(new bfg()));
	}
}
 
Example #6
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().D();
	boolean isConnectedToRealms = getMinecraft().ah();
	if (getWorld() != null) {
		getWorld().M();
	}
	getMinecraft().a((bnq) null);
	if (isOnIntegratedServer) {
		displayScreen(new bhv());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new bhv());
	} else {
		displayScreen(new bjf(new bhv()));
	}
}
 
Example #7
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().D();
	boolean isConnectedToRealms = getMinecraft().ah();
	if (getWorld() != null) {
		getWorld().O();
	}
	getMinecraft().a((brz) null);
	if (isOnIntegratedServer) {
		displayScreen(new blp());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new blp());
	} else {
		displayScreen(new bnd(new blp()));
	}
}
 
Example #8
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().E();
	boolean isConnectedToRealms = getMinecraft().al();
	if (getWorld() != null) {
		getWorld().H();
	}
	getMinecraft().a((bdb) null);
	if (isOnIntegratedServer) {
		displayScreen(new aya());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new aya());
	} else {
		displayScreen(new azh(new aya()));
	}
}
 
Example #9
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().D();
	boolean isConnectedToRealms = getMinecraft().ah();
	if (getWorld() != null) {
		getWorld().M();
	}
	getMinecraft().a((bno) null);
	if (isOnIntegratedServer) {
		displayScreen(new bht());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new bht());
	} else {
		displayScreen(new bjd(new bht()));
	}
}
 
Example #10
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().D();
	boolean isConnectedToRealms = getMinecraft().ah();
	if (getWorld() != null) {
		getWorld().M();
	}
	getMinecraft().a((bln) null);
	if (isOnIntegratedServer) {
		displayScreen(new bga());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new bga());
	} else {
		displayScreen(new bhj(new bga()));
	}
}
 
Example #11
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().D();
	boolean isConnectedToRealms = getMinecraft().ai();
	if (getWorld() != null) {
		getWorld().M();
	}
	getMinecraft().a((bku) null);
	if (isOnIntegratedServer) {
		displayScreen(new bfi());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new bfi());
	} else {
		displayScreen(new bgr(new bfi()));
	}
}
 
Example #12
Source File: Variables.java    From The-5zig-Mod with MIT License 6 votes vote down vote up
@Override
public void disconnectFromWorld() {
	boolean isOnIntegratedServer = getMinecraft().D();
	boolean isConnectedToRealms = getMinecraft().ah();
	if (getWorld() != null) {
		getWorld().O();
	}
	getMinecraft().a((bsb) null);
	if (isOnIntegratedServer) {
		displayScreen(new blr());
	} else if (isConnectedToRealms) {
		RealmsBridge realmsBridge = new RealmsBridge();
		realmsBridge.switchToRealms(new blr());
	} else {
		displayScreen(new bnf(new blr()));
	}
}
 
Example #13
Source File: DisconnectCommand.java    From seppuku with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void exec(String input) {
    if (!this.clamp(input, 1, 1)) {
        this.printUsage();
        return;
    }

    final Minecraft mc = Minecraft.getMinecraft();

    boolean flag = mc.isIntegratedServerRunning();
    boolean flag1 = mc.isConnectedToRealms();
    mc.world.sendQuittingDisconnectingPacket();
    mc.loadWorld(null);

    if (flag) {
        mc.displayGuiScreen(new GuiMainMenu());
    }
    else if (flag1) {
        RealmsBridge realmsbridge = new RealmsBridge();
        realmsbridge.switchToRealms(new GuiMainMenu());
    } else {
        mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu()));
    }
}
 
Example #14
Source File: MixinGuiDownloadTerrain.java    From LiquidBounce with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void injectedActionPerformed(GuiButton button) {
    if (button.id == 0) {
        boolean flag = this.mc.isIntegratedServerRunning();
        boolean flag1 = this.mc.isConnectedToRealms();
        button.enabled = false;
        this.mc.theWorld.sendQuittingDisconnectingPacket();
        this.mc.loadWorld(null);

        if (flag) {
            this.mc.displayGuiScreen(new GuiMainMenu());
        } else if (flag1) {
            RealmsBridge realmsbridge = new RealmsBridge();
            realmsbridge.switchToRealms(new GuiMainMenu());
        } else {
            this.mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu()));
        }
    }

}