本文整理汇总了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;
}
示例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;
}
}
示例3: action
import net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void action(final ActionPerformedEvent.Post e) {
this.guiHandler.action(e);
}