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


Java GuiIngameForge.renderAir方法代码示例

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


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

示例1: onMorph

import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
/**
 * On morph, hide air bar in HUD
 * 
 * SideOnly annotation needed to remove this method from server (since 
 * it will likely cause {@link NoClassDefFoundError} on dedicated server.
 */
@Override
@SideOnly(Side.CLIENT)
public void onMorph(EntityLivingBase target)
{
    if (target.worldObj.isRemote && target == Minecraft.getMinecraft().thePlayer)
    {
        GuiIngameForge.renderAir = false;
    }
}
 
开发者ID:mchorse,项目名称:metamorph,代码行数:16,代码来源:WaterBreath.java

示例2: onDemorph

import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
/**
 * On demorph, show back air bar in HUD
 * 
 * SideOnly annotation needed to remove this method from server (since 
 * it will likely cause {@link NoClassDefFoundError} on dedicated server.
 */
@Override
@SideOnly(Side.CLIENT)
public void onDemorph(EntityLivingBase target)
{
    if (target.worldObj.isRemote && target == Minecraft.getMinecraft().thePlayer)
    {
        GuiIngameForge.renderAir = true;
    }
}
 
开发者ID:mchorse,项目名称:metamorph,代码行数:16,代码来源:WaterBreath.java

示例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;
	}
}
 
开发者ID:OpenMods,项目名称:OpenPeripheral-Addons,代码行数:33,代码来源:GuiUtils.java

示例4: kill

import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
@Override
public void kill() 
{
	if(getParent().worldObj.isRemote)
	{
		if(!GuiIngameForge.renderAir)
		{
			GuiIngameForge.renderAir = true;
		}
	}
}
 
开发者ID:iChun,项目名称:Morph,代码行数:12,代码来源:AbilitySwim.java

示例5: 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;
    }
}
 
开发者ID:arilotter,项目名称:SimpleMenu,代码行数:36,代码来源:GameOverlayRenderHandler.java

示例6: 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;
	}
}
 
开发者ID:OpenMods,项目名称:OpenPeripheral-Addons,代码行数:44,代码来源:GuiUtils.java

示例7: tick

import net.minecraftforge.client.GuiIngameForge; //导入方法依赖的package包/类
@Override
public void tick() 
{
	if(air == 8008135)
	{
		air = getParent().getAir();
	}
	boolean flying = false;
	if(getParent().isInWater())
	{
		if(getParent().worldObj.isRemote)
		{
			if(GuiIngameForge.renderAir)
			{
				GuiIngameForge.renderAir = false;
			}
		}
		getParent().setAir(300);
		air = 300;
		if(swimSpeed != 1f && !(getParent() instanceof EntityPlayer && ((EntityPlayer)getParent()).capabilities.isFlying))
		{
			if(getParent().motionX > -swimSpeed && getParent().motionX < swimSpeed)
			{
				getParent().motionX *= swimSpeed * 0.995F;
			}
			if(getParent().motionZ > -swimSpeed && getParent().motionZ < swimSpeed)
			{
				getParent().motionZ *= swimSpeed * 0.995F;
			}
		}
		if(canMaintainDepth)
		{
			boolean isJumping = getParent().isJumping;
			if(!getParent().isSneaking() && !isJumping && getParent().isInsideOfMaterial(Material.water))
			{
				getParent().motionY = 0f;
			}else{
				if(isJumping)
				{
					getParent().motionY *= swimSpeed;
				}
			}
		}
	}
	else if(!canSurviveOutOfWater)
	{
        int j = EnchantmentHelper.getRespiration(getParent());
        air = j > 0 && getParent().getRNG().nextInt(j + 1) > 0 ? air : air - 1;
        
        if (air == -20)
        {
        	air = 0;
        	getParent().attackEntityFrom(DamageSource.drown, 2.0F);
        }
        
        if(!(getParent() instanceof EntityPlayer && ((EntityPlayer)getParent()).capabilities.isFlying) && landSpeed != 1f && air < 285)
		{
			if(getParent().motionX > -landSpeed && getParent().motionX < landSpeed)
			{
				getParent().motionX *= landSpeed;
			}
			if(getParent().motionZ > -landSpeed && getParent().motionZ < landSpeed)
			{
				getParent().motionZ *= landSpeed;
			}
		}
	}
}
 
开发者ID:iChun,项目名称:Morph,代码行数:69,代码来源:AbilitySwim.java


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