当前位置: 首页>>代码示例>>Java>>正文


Java ActionPerformedEvent.Post方法代码示例

本文整理汇总了Java中net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Post方法的典型用法代码示例。如果您正苦于以下问题:Java ActionPerformedEvent.Post方法的具体用法?Java ActionPerformedEvent.Post怎么用?Java ActionPerformedEvent.Post使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent的用法示例。


在下文中一共展示了ActionPerformedEvent.Post方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: action

import net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent; //导入方法依赖的package包/类
@CoreEvent
public void action(final ActionPerformedEvent.Post e) {
	this.targetServerStatus = null;
	final GuiScreen screen = this.mc.currentScreen;
	final int id = this.compat.getButton(e).id;
	if (screen instanceof GuiMultiplayer&&id==BUTTON_ID) {
		final GuiMultiplayer mpgui = (GuiMultiplayer) screen;
		final ServerData server = getServerData(mpgui, this.compat.getSelected(mpgui));
		if (server!=null) {
			if (!StringUtils.equals(this.target.getIP(), server.serverIP)) {
				this.autologin.set(false);
				this.target.set(server);
			} else if (!this.autologin.is()) {
				this.autologin.set(true);
				this.target.set(server);
			} else {
				this.autologin.set(false);
				this.target.set(null);
			}
		} else
			selectTarget(mpgui, this.target.getIP());
	} else if (screen instanceof GuiDisconnected&&id==DISABLE_BACK_BUTTON_ID) {
		final GuiDisconnected dcgui = (GuiDisconnected) screen;
		this.autologin.set(false);
		this.target.set(null);
		this.mc.displayGuiScreen(this.compat.getParentScreen(dcgui));
	}
	this.displayTime = "";
	reset(Config.getConfig().durationPing);
	this.manual = false;
}
 
开发者ID:Team-Fruit,项目名称:ServerObserver,代码行数:32,代码来源:GuiHandler.java

示例2: actionEvent

import net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void actionEvent(ActionPerformedEvent.Post event)
{
	if(!(event.gui instanceof GuiCreateWorld)) return;
	if(event.button.id == 11)
	{
		event.gui.mc.displayGuiScreen(new GuiApocSelect(event.gui));
	}
	else if(event.button.id == 3)
	{
		apocSelectBTN.visible = !apocSelectBTN.visible;
	}
}
 
开发者ID:Cephrus,项目名称:Elite-Armageddon,代码行数:15,代码来源:Handler.java

示例3: action

import net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void action(final ActionPerformedEvent.Post e) {
	this.guiHandler.action(e);
}
 
开发者ID:Team-Fruit,项目名称:ServerObserver,代码行数:5,代码来源:CoreHandler.java


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