本文整理汇总了Java中net.minecraftforge.fml.client.GuiModList类的典型用法代码示例。如果您正苦于以下问题:Java GuiModList类的具体用法?Java GuiModList怎么用?Java GuiModList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GuiModList类属于net.minecraftforge.fml.client包,在下文中一共展示了GuiModList类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tick
import net.minecraftforge.fml.client.GuiModList; //导入依赖的package包/类
static void tick() {
if (queued_action == 0) {
return;
}
if (queue_delay > 0) {
queue_delay--;
return;
}
switch (queued_action) {
case CLEAR_CHAT:
List cp = new ArrayList();
cp.addAll(mc.ingameGUI.getChatGUI().getSentMessages());
mc.ingameGUI.getChatGUI().clearChatMessages();
mc.ingameGUI.getChatGUI().getSentMessages().addAll(cp);
new Notice(mc.thePlayer, "").withStyle(Style.CLEAR).send(mc.thePlayer);
break;
case SHOW_MODS_LIST:
mc.displayGuiScreen(new GuiModList(null));
break;
}
queued_action = 0;
}
示例2: onPostInitGui
import net.minecraftforge.fml.client.GuiModList; //导入依赖的package包/类
@SubscribeEvent
public void onPostInitGui(GuiScreenEvent.InitGuiEvent.Post event) {
if(event.getGui() instanceof GuiIngameMenu || event.getGui() instanceof GuiModList){
int x = event.getGui().width / 2 + 105;
int y = event.getGui().height / 4 + 8;
if(event.getGui() instanceof GuiModList){
x = event.getGui().width - 110;
y = 10;
}
event.getButtonList().add(new GuiModUpdateButton(BUTTON_ID, x, y, event.getGui()));
}
}