本文整理汇总了Java中net.minecraftforge.client.GuiIngameForge.renderHotbar方法的典型用法代码示例。如果您正苦于以下问题:Java GuiIngameForge.renderHotbar方法的具体用法?Java GuiIngameForge.renderHotbar怎么用?Java GuiIngameForge.renderHotbar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.client.GuiIngameForge
的用法示例。
在下文中一共展示了GuiIngameForge.renderHotbar方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onKeyInput
import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
@SubscribeEvent
public void onKeyInput(InputEvent.KeyInputEvent event) {
Minecraft mc = Minecraft.getMinecraft();
for(ToolPage page : WigMod.Pages) {
if (page.shouldToggle()) {
if (page == WigMod.ActivePage) {
if (WigMod.ActiveTool == null) {
WigMod.ActivePage = null;
GuiIngameForge.renderHotbar = true;
mc.ingameGUI.remainingHighlightTicks = 40;
} else {
WigMod.ActiveTool = null;
}
} else {
WigMod.ActivePage = page;
GuiIngameForge.renderHotbar = false;
mc.ingameGUI.remainingHighlightTicks = 0;
}
}
}
}
示例2: onMouseInput
import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
@SubscribeEvent
public void onMouseInput(MouseEvent event) {
if (WigMod.ActivePage == null || WigMod.ActiveTool != null) {
return;
}
event.setCanceled(true);
Minecraft mc = Minecraft.getMinecraft();
if (event.dwheel != 0) {
int diff = (event.dwheel > 0)?-1:1;
WigMod.ActivePage.setToolIndex(Math.floorMod(WigMod.ActivePage.getToolIndex() + diff, 9));
} else if (event.button == 0 && WigMod.ActivePage.getSelectedTool() != null && event.buttonstate) {
WigMod.ActiveTool = WigMod.ActivePage.getSelectedTool();
} else if (event.button == 1 && event.buttonstate) {
WigMod.ActivePage = null;
GuiIngameForge.renderHotbar = true;
mc.ingameGUI.remainingHighlightTicks = 40;
}
}
示例3: getGuiElementState
import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
public static boolean getGuiElementState(GuiElements element) {
switch (element) {
case OVERLAY:
return GuiIngameForge.renderHelmet;
case PORTAL:
return GuiIngameForge.renderPortal;
case HOTBAR:
return GuiIngameForge.renderHotbar;
case CROSSHAIRS:
return GuiIngameForge.renderCrosshairs;
case BOSS_HEALTH:
return GuiIngameForge.renderBossHealth;
case HEALTH:
return GuiIngameForge.renderHealth;
case ARMOR:
return GuiIngameForge.renderArmor;
case FOOD:
return GuiIngameForge.renderFood;
case MOUNT_HEALTH:
return GuiIngameForge.renderHealthMount;
case AIR:
return GuiIngameForge.renderAir;
case EXPERIENCE:
return GuiIngameForge.renderExperiance;
case JUMP_BAR:
return GuiIngameForge.renderJumpBar;
case OBJECTIVES:
return GuiIngameForge.renderObjective;
default:
return false;
}
}
示例4: renderOverlay
import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
@ForgeSubscribe
public void renderOverlay(RenderGameOverlayEvent ev) {
if (guiHidden) {
GuiIngameForge.renderHelmet = false;
GuiIngameForge.renderPortal = false;
GuiIngameForge.renderHotbar = false;
GuiIngameForge.renderCrosshairs = false;
GuiIngameForge.renderBossHealth = false;
GuiIngameForge.renderHealth = false;
GuiIngameForge.renderArmor = false;
GuiIngameForge.renderFood = false;
GuiIngameForge.renderHealthMount = false;
GuiIngameForge.renderAir = false;
GuiIngameForge.renderExperiance = false;
GuiIngameForge.renderJumpBar = false;
GuiIngameForge.renderObjective = false;
}
if (shouldUnhideGui) {
GuiIngameForge.renderHelmet = true;
GuiIngameForge.renderPortal = true;
GuiIngameForge.renderHotbar = true;
GuiIngameForge.renderCrosshairs = true;
GuiIngameForge.renderBossHealth = true;
GuiIngameForge.renderHealth = true;
GuiIngameForge.renderArmor = true;
GuiIngameForge.renderFood = true;
GuiIngameForge.renderHealthMount = true;
GuiIngameForge.renderAir = true;
GuiIngameForge.renderExperiance = true;
GuiIngameForge.renderJumpBar = true;
GuiIngameForge.renderObjective = true;
shouldUnhideGui = false;
guiHidden = false;
}
}
示例5: setGuiElementState
import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
public static void setGuiElementState(GuiElements element, boolean isVisible) {
switch (element) {
case OVERLAY:
GuiIngameForge.renderHelmet = isVisible;
break;
case PORTAL:
GuiIngameForge.renderPortal = isVisible;
break;
case HOTBAR:
GuiIngameForge.renderHotbar = isVisible;
break;
case CROSSHAIRS:
GuiIngameForge.renderCrosshairs = isVisible;
break;
case BOSS_HEALTH:
GuiIngameForge.renderBossHealth = isVisible;
break;
case HEALTH:
GuiIngameForge.renderHealth = isVisible;
break;
case ARMOR:
GuiIngameForge.renderArmor = isVisible;
break;
case FOOD:
GuiIngameForge.renderFood = isVisible;
break;
case MOUNT_HEALTH:
GuiIngameForge.renderHealthMount = isVisible;
break;
case AIR:
GuiIngameForge.renderAir = isVisible;
break;
case EXPERIENCE:
GuiIngameForge.renderExperiance = isVisible;
break;
case JUMP_BAR:
GuiIngameForge.renderJumpBar = isVisible;
break;
case OBJECTIVES:
GuiIngameForge.renderObjective = isVisible;
break;
}
}