• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RealmsBridge类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.realms.RealmsBridge的典型用法代码示例。如果您正苦于以下问题:Java RealmsBridge类的具体用法?Java RealmsBridge怎么用?Java RealmsBridge使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RealmsBridge类属于net.minecraft.realms包,在下文中一共展示了RealmsBridge类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onUpdate

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
@Override
public void onUpdate() {
	if(mc.thePlayer.getHealth() <= leaveHealth){
		boolean flag = this.mc.isIntegratedServerRunning();
           boolean flag1 = this.mc.isConnectedToRealms();
           this.mc.theWorld.sendQuittingDisconnectingPacket();
           this.mc.loadWorld((WorldClient)null);

           if (flag)
           {
               this.mc.displayGuiScreen(new CheataMainMenu());
           }
           else if (flag1)
           {
               RealmsBridge realmsbridge = new RealmsBridge();
               realmsbridge.switchToRealms(new CheataMainMenu());
           }
           else
           {
               this.mc.displayGuiScreen(new GuiMultiplayer(new CheataMainMenu()));
           }
	}
}
 
开发者ID:CheataClient,项目名称:CheataClientSrc,代码行数:24,代码来源:AutoDisconect.java


示例2: initGui

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called
 * when the GUI is displayed and when the window resizes, the buttonList is
 * cleared beforehand.
 */
public void initGui() {
	this.viewportTexture = new DynamicTexture(256, 256);
	this.backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation("background",
			this.viewportTexture);
	Calendar calendar = Calendar.getInstance();
	calendar.setTime(new Date());

	if (calendar.get(2) + 1 == 12 && calendar.get(5) == 24) {
		this.splashText = "Merry X-mas!";
	} else if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1) {
		this.splashText = "Happy new year!";
	} else if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31) {
		this.splashText = "OOoooOOOoooo! Spooky!";
	} else if (calendar.get(2) + 1 == 9 && calendar.get(5) == 27) {
		this.splashText = "Happy Birthday, Sgt. Pepper!";
	} else if (calendar.get(2) + 1 == 5 && calendar.get(5) == 28) {
		this.splashText = "Happy Birthday, x0XP!";
	}

	int i = 24;
	int j = this.height / 4 + 48;

	if (this.mc.isDemo()) {
		this.addDemoButtons(j, 24);
	} else {
		this.addSingleplayerMultiplayerButtons(j, 24);
	}

	this.buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 72 + 12, 98, 20,
			I18n.format("menu.options", new Object[0])));
	this.buttonList.add(
			new GuiButton(4, this.width / 2 + 2, j + 72 + 12, 98, 20, I18n.format("menu.quit", new Object[0])));
	this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, j + 72 + 12));

	synchronized (this.threadLock) {
		this.openGLWarning1Width = this.fontRendererObj.getStringWidth(this.openGLWarning1);
		this.openGLWarning2Width = this.fontRendererObj.getStringWidth(this.openGLWarning2);
		int k = Math.max(this.openGLWarning1Width, this.openGLWarning2Width);
		this.openGLWarningX1 = (this.width - k) / 2;
		this.openGLWarningY1 = ((GuiButton) this.buttonList.get(0)).yPosition - 24;
		this.openGLWarningX2 = this.openGLWarningX1 + k;
		this.openGLWarningY2 = this.openGLWarningY1 + 24;
	}

	this.mc.setConnectedToRealms(false);

	if (Minecraft.getMinecraft().gameSettings.getOptionOrdinalValue(GameSettings.Options.REALMS_NOTIFICATIONS)
			&& !this.hasCheckedForRealmsNotification) {
		RealmsBridge realmsbridge = new RealmsBridge();
		this.realmsNotification = realmsbridge.getNotificationScreen(this);
		this.hasCheckedForRealmsNotification = true;
	}

	if (this.areRealmsNotificationsEnabled()) {
		this.realmsNotification.setGuiSize(this.width, this.height);
		this.realmsNotification.initGui();
	}

	if (Reflector.NotificationModUpdateScreen_init.exists()) {
		this.modUpdateNotification = (GuiScreen) Reflector.call(Reflector.NotificationModUpdateScreen_init,
				new Object[] { this, this.modButton });
	}
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:69,代码来源:GuiMainMenu.java


示例3: actionPerformed

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException
{
    switch (button.id)
    {
        case 0:
            this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
            break;

        case 1:
            boolean flag = this.mc.isIntegratedServerRunning();
            boolean flag1 = this.mc.func_181540_al();
            button.enabled = false;
            this.mc.theWorld.sendQuittingDisconnectingPacket();
            this.mc.loadWorld((WorldClient)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()));
            }

        case 2:
        case 3:
        default:
            break;

        case 4:
            this.mc.displayGuiScreen((GuiScreen)null);
            this.mc.setIngameFocus();
            break;

        case 5:
            this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.thePlayer.getStatFileWriter()));
            break;

        case 6:
            this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter()));
            break;

        case 7:
            this.mc.displayGuiScreen(new GuiShareToLan(this));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:55,代码来源:GuiIngameMenu.java


示例4: switchToRealms

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
private void switchToRealms()
{
    RealmsBridge realmsbridge = new RealmsBridge();
    realmsbridge.switchToRealms(this);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:GuiMainMenu.java


示例5: switchToRealms

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
public static void switchToRealms(IGuiScreen parent) {
	RealmsBridge realmsbridge = new RealmsBridge();
	realmsbridge.switchToRealms(parent);
}
 
开发者ID:Moudoux,项目名称:EMC,代码行数:5,代码来源:IScreens.java


示例6: actionPerformed

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException
{
    switch (button.id)
    {
        case 0:
            this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
            break;

        case 1:
            boolean flag = this.mc.isIntegratedServerRunning();
            boolean flag1 = this.mc.isConnectedToRealms();
            button.enabled = false;
            this.mc.world.sendQuittingDisconnectingPacket();
            this.mc.loadWorld((WorldClient)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()));
            }

        case 2:
        case 3:
        default:
            break;

        case 4:
            this.mc.displayGuiScreen((GuiScreen)null);
            this.mc.setIngameFocus();
            break;

        case 5:
            this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.player.getStatFileWriter()));
            break;

        case 6:
            this.mc.displayGuiScreen(new GuiStats(this, this.mc.player.getStatFileWriter()));
            break;

        case 7:
            this.mc.displayGuiScreen(new GuiShareToLan(this));
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:55,代码来源:GuiIngameMenu.java


示例7: switchToRealms

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
private void switchToRealms() {
	RealmsBridge realmsbridge = new RealmsBridge();
	realmsbridge.switchToRealms(this);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:GuiMainMenu.java


示例8: actionPerformed

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException
{
    switch (button.id)
    {
        case 0:
            this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
            break;
        case 1:
            boolean flag = this.mc.isIntegratedServerRunning();
            boolean flag1 = this.mc.isConnectedToRealms();
            button.enabled = false;
            this.mc.theWorld.sendQuittingDisconnectingPacket();
            this.mc.loadWorld((WorldClient)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()));
            }

        case 2:
        case 3:
        default:
            break;
        case 4:
            this.mc.displayGuiScreen((GuiScreen)null);
            this.mc.setIngameFocus();
            break;
        case 5:
            if (this.mc.thePlayer != null)
            this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.thePlayer.getStatFileWriter()));
            break;
        case 6:
            if (this.mc.thePlayer != null)
            this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter()));
            break;
        case 7:
            this.mc.displayGuiScreen(new GuiShareToLan(this));
            break;
        case 12:
            net.minecraftforge.fml.client.FMLClientHandler.instance().showInGameModOptions(this);
            break;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:56,代码来源:GuiIngameMenu.java


示例9: initGui

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    this.viewportTexture = new DynamicTexture(256, 256);
    this.backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation("background", this.viewportTexture);
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(new Date());

    if (calendar.get(2) + 1 == 12 && calendar.get(5) == 24)
    {
        this.splashText = "Merry X-mas!";
    }
    else if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1)
    {
        this.splashText = "Happy new year!";
    }
    else if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31)
    {
        this.splashText = "OOoooOOOoooo! Spooky!";
    }

    int i = 24;
    int j = this.height / 4 + 48;

    if (this.mc.isDemo())
    {
        this.addDemoButtons(j, 24);
    }
    else
    {
        this.addSingleplayerMultiplayerButtons(j, 24);
    }

    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 72 + 12, 98, 20, I18n.format("menu.options", new Object[0])));
    this.buttonList.add(new GuiButton(4, this.width / 2 + 2, j + 72 + 12, 98, 20, I18n.format("menu.quit", new Object[0])));
    this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, j + 72 + 12));

    synchronized (this.threadLock)
    {
        this.openGLWarning1Width = this.fontRendererObj.getStringWidth(this.openGLWarning1);
        this.openGLWarning2Width = this.fontRendererObj.getStringWidth(this.openGLWarning2);
        int k = Math.max(this.openGLWarning1Width, this.openGLWarning2Width);
        this.openGLWarningX1 = (this.width - k) / 2;
        this.openGLWarningY1 = ((GuiButton)this.buttonList.get(0)).yPosition - 24;
        this.openGLWarningX2 = this.openGLWarningX1 + k;
        this.openGLWarningY2 = this.openGLWarningY1 + 24;
    }

    this.mc.setConnectedToRealms(false);

    if (Minecraft.getMinecraft().gameSettings.getOptionOrdinalValue(GameSettings.Options.REALMS_NOTIFICATIONS) && !this.hasCheckedForRealmsNotification)
    {
        RealmsBridge realmsbridge = new RealmsBridge();
        this.realmsNotification = realmsbridge.getNotificationScreen(this);
        this.hasCheckedForRealmsNotification = true;
    }

    if (this.areRealmsNotificationsEnabled())
    {
        this.realmsNotification.setGuiSize(this.width, this.height);
        this.realmsNotification.initGui();
    }
    modUpdateNotification = net.minecraftforge.client.gui.NotificationModUpdateScreen.init(this, modButton);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:68,代码来源:GuiMainMenu.java


示例10: func_140005_i

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
private void func_140005_i()
{
    RealmsBridge realmsbridge = new RealmsBridge();
    realmsbridge.switchToRealms(this);
}
 
开发者ID:yeyaowei,项目名称:New-Menu,代码行数:6,代码来源:NewMenu.java


示例11: switchToRealms

import net.minecraft.realms.RealmsBridge; //导入依赖的package包/类
private void switchToRealms()
{
	RealmsBridge realmsbridge = new RealmsBridge();
	realmsbridge.switchToRealms(this);
}
 
开发者ID:Archiving,项目名称:ARKCraft-Code,代码行数:6,代码来源:GuiMainMenuOverride.java



注:本文中的net.minecraft.realms.RealmsBridge类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TException类代码示例发布时间:2022-05-22
下一篇:
Java TasksInfo类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap