當前位置: 首頁>>代碼示例>>Java>>正文


Java Entity.isBurning方法代碼示例

本文整理匯總了Java中net.minecraft.entity.Entity.isBurning方法的典型用法代碼示例。如果您正苦於以下問題:Java Entity.isBurning方法的具體用法?Java Entity.isBurning怎麽用?Java Entity.isBurning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.entity.Entity的用法示例。


在下文中一共展示了Entity.isBurning方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: renderEntityStatic

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public boolean renderEntityStatic(Entity entity, float partialTicks, boolean p_147936_3_)
{
    if (entity.ticksExisted == 0)
    {
        entity.lastTickPosX = entity.posX;
        entity.lastTickPosY = entity.posY;
        entity.lastTickPosZ = entity.posZ;
    }

    double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks;
    double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks;
    double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks;
    float f = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks;
    int i = entity.getBrightnessForRender(partialTicks);

    if (entity.isBurning())
    {
        i = 15728880;
    }

    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    return this.doRenderEntity(entity, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, f, partialTicks, p_147936_3_);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:27,代碼來源:RenderManager.java

示例2: renderEntityStatic

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void renderEntityStatic(Entity entityIn, float partialTicks, boolean p_188388_3_)
{
    if (entityIn.ticksExisted == 0)
    {
        entityIn.lastTickPosX = entityIn.posX;
        entityIn.lastTickPosY = entityIn.posY;
        entityIn.lastTickPosZ = entityIn.posZ;
    }

    double d0 = entityIn.lastTickPosX + (entityIn.posX - entityIn.lastTickPosX) * (double)partialTicks;
    double d1 = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * (double)partialTicks;
    double d2 = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * (double)partialTicks;
    float f = entityIn.prevRotationYaw + (entityIn.rotationYaw - entityIn.prevRotationYaw) * partialTicks;
    int i = entityIn.getBrightnessForRender(partialTicks);

    if (entityIn.isBurning())
    {
        i = 15728880;
    }

    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.doRenderEntity(entityIn, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, f, partialTicks, p_188388_3_);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:27,代碼來源:RenderManager.java

示例3: getWeaponDamage

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
@Override
public float getWeaponDamage(ItemStack stack, EntityLivingBase living, Entity target) {
	float damage = ItemFromData.getData(stack).getFloat(PropertyType.DAMAGE);
	if(living == null || living!=target){
		damage=TF2Attribute.getModifier("Damage", stack,damage, living);
		if (living != null && (this.isDoubleWielding(living) || living.isHandActive()))
			damage *= 0.85f;
		if (target != null && !target.isBurning())
			damage = TF2Attribute.getModifier("Damage Non Burn", stack, damage, living);
		if (target != null && target.isBurning())
			damage = TF2Attribute.getModifier("Damage Burning", stack, damage, living);
		if (living != null && living.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) != null){
			//System.out.println("Pre "+damage);
			damage=(float) calculateModifiers(living.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE),ATTACK_DAMAGE_MODIFIER,damage,1D/9D);
			//System.out.println("Post "+damage);
		}
		
	}
	return damage;
}
 
開發者ID:rafradek,項目名稱:Mods,代碼行數:21,代碼來源:ItemWeapon.java

示例4: onEntityCollidedWithBlock

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
 * Called When an Entity Collided with the Block
 */
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
    int i = ((Integer)state.getValue(LEVEL)).intValue();
    float f = (float)pos.getY() + (6.0F + (float)(3 * i)) / 16.0F;

    if (!worldIn.isRemote && entityIn.isBurning() && i > 0 && entityIn.getEntityBoundingBox().minY <= (double)f)
    {
        entityIn.extinguish();
        this.setWaterLevel(worldIn, pos, state, i - 1);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:15,代碼來源:BlockCauldron.java

示例5: renderMultipass

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void renderMultipass(Entity p_188389_1_, float p_188389_2_)
{
    if (p_188389_1_.ticksExisted == 0)
    {
        p_188389_1_.lastTickPosX = p_188389_1_.posX;
        p_188389_1_.lastTickPosY = p_188389_1_.posY;
        p_188389_1_.lastTickPosZ = p_188389_1_.posZ;
    }

    double d0 = p_188389_1_.lastTickPosX + (p_188389_1_.posX - p_188389_1_.lastTickPosX) * (double)p_188389_2_;
    double d1 = p_188389_1_.lastTickPosY + (p_188389_1_.posY - p_188389_1_.lastTickPosY) * (double)p_188389_2_;
    double d2 = p_188389_1_.lastTickPosZ + (p_188389_1_.posZ - p_188389_1_.lastTickPosZ) * (double)p_188389_2_;
    float f = p_188389_1_.prevRotationYaw + (p_188389_1_.rotationYaw - p_188389_1_.prevRotationYaw) * p_188389_2_;
    int i = p_188389_1_.getBrightnessForRender(p_188389_2_);

    if (p_188389_1_.isBurning())
    {
        i = 15728880;
    }

    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    Render<Entity> render = this.<Entity>getEntityRenderObject(p_188389_1_);

    if (render != null && this.renderEngine != null)
    {
        render.renderMultipass(p_188389_1_, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, f, p_188389_2_);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:32,代碼來源:RenderManager.java

示例6: calculateCritPost

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public static int calculateCritPost(Entity target, EntityLivingBase shooter, int initial, ItemStack stack) {
	if (initial > 0 && (target instanceof EntityLivingBase && ((EntityLivingBase) target).getActivePotionEffect(TF2weapons.backup) != null))
		initial = 0;
	if (initial == 0 && (target instanceof EntityLivingBase && (((EntityLivingBase) target).getActivePotionEffect(TF2weapons.markDeath) != null
			|| ((EntityLivingBase) target).getActivePotionEffect(TF2weapons.jarate) != null)))
		initial = 1;
	if (initial == 0 && !stack.isEmpty() && !target.onGround && !target.isInWater() && TF2Attribute.getModifier("Minicrit Airborne", stack, 0, shooter) != 0)
		initial = 1;
	if (initial == 0 && !stack.isEmpty() && shooter != null) {
		float mindist=TF2Attribute.getModifier("Minicrit Distance", stack, 0, shooter);
		mindist*=mindist;
		if(mindist != 0f && target.getDistanceSqToEntity(shooter) >= mindist)
			initial = 1;
	}
	if (initial < 2 && (!stack.isEmpty() && target.isBurning() && TF2Attribute.getModifier("Crit Burn", stack, 0, shooter) != 0))
		initial = 2;
	if (initial < 2 && (!stack.isEmpty() && (target instanceof EntityLivingBase && ((EntityLivingBase) target).getActivePotionEffect(TF2weapons.stun) != null))
			&& TF2Attribute.getModifier("Crit Stun", stack, 0, shooter) != 0)
		initial = 2;
	if (initial < 2 && (!stack.isEmpty() && shooter != null && shooter instanceof EntityPlayer && 
			(shooter.getCapability(TF2weapons.WEAPONS_CAP, null).isExpJump() || shooter.isElytraFlying())
			&& TF2Attribute.getModifier("Crit Rocket", stack, 0, shooter) != 0))
		initial = 2;
	if (initial == 1 && (!stack.isEmpty() && shooter != null && shooter instanceof EntityPlayer && TF2Attribute.getModifier("Crit Mini", stack, 0, shooter) != 0))
		initial = 2;
	if (target instanceof EntityTF2Boss && initial == 1)
		initial = 0;
	if (target instanceof EntityMerasmus && ((EntityMerasmus) target).getActivePotionEffect(TF2weapons.stun) != null)
		initial = 2;
	return initial;
}
 
開發者ID:rafradek,項目名稱:Mods,代碼行數:32,代碼來源:TF2Util.java

示例7: getLightLevel

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public static int getLightLevel(Entity p_getLightLevel_0_)
{
    if (p_getLightLevel_0_ == Config.getMinecraft().getRenderViewEntity() && !Config.isDynamicHandLight())
    {
        return 0;
    }
    else
    {
        if (p_getLightLevel_0_ instanceof EntityPlayer)
        {
            EntityPlayer entityplayer = (EntityPlayer)p_getLightLevel_0_;

            if (entityplayer.isSpectator())
            {
                return 0;
            }
        }

        if (p_getLightLevel_0_.isBurning())
        {
            return 15;
        }
        else if (p_getLightLevel_0_ instanceof EntityFireball)
        {
            return 15;
        }
        else if (p_getLightLevel_0_ instanceof EntityTNTPrimed)
        {
            return 15;
        }
        else if (p_getLightLevel_0_ instanceof EntityBlaze)
        {
            EntityBlaze entityblaze = (EntityBlaze)p_getLightLevel_0_;
            return entityblaze.func_70845_n() ? 15 : 10;
        }
        else if (p_getLightLevel_0_ instanceof EntityMagmaCube)
        {
            EntityMagmaCube entitymagmacube = (EntityMagmaCube)p_getLightLevel_0_;
            return (double)entitymagmacube.squishFactor > 0.6D ? 13 : 8;
        }
        else
        {
            if (p_getLightLevel_0_ instanceof EntityCreeper)
            {
                EntityCreeper entitycreeper = (EntityCreeper)p_getLightLevel_0_;

                if ((double)entitycreeper.getCreeperFlashIntensity(0.0F) > 0.001D)
                {
                    return 15;
                }
            }

            if (p_getLightLevel_0_ instanceof EntityLivingBase)
            {
                EntityLivingBase entitylivingbase = (EntityLivingBase)p_getLightLevel_0_;
                ItemStack itemstack2 = entitylivingbase.getHeldItem();
                int i = getLightLevel(itemstack2);
                ItemStack itemstack1 = entitylivingbase.getEquipmentInSlot(4);
                int j = getLightLevel(itemstack1);
                return Math.max(i, j);
            }
            else if (p_getLightLevel_0_ instanceof EntityItem)
            {
                EntityItem entityitem = (EntityItem)p_getLightLevel_0_;
                ItemStack itemstack = getItemStack(entityitem);
                return getLightLevel(itemstack);
            }
            else
            {
                return 0;
            }
        }
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:75,代碼來源:DynamicLights.java

示例8: testProperty

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public boolean testProperty(Random random, Entity entityIn)
{
    return entityIn.isBurning() == this.onFire;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:EntityOnFire.java

示例9: getLightLevel

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public static int getLightLevel(Entity p_getLightLevel_0_)
{
    if (p_getLightLevel_0_ == Config.getMinecraft().getRenderViewEntity() && !Config.isDynamicHandLight())
    {
        return 0;
    }
    else
    {
        if (p_getLightLevel_0_ instanceof EntityPlayer)
        {
            EntityPlayer entityplayer = (EntityPlayer)p_getLightLevel_0_;

            if (entityplayer.isSpectator())
            {
                return 0;
            }
        }

        if (p_getLightLevel_0_.isBurning())
        {
            return 15;
        }
        else if (p_getLightLevel_0_ instanceof EntityFireball)
        {
            return 15;
        }
        else if (p_getLightLevel_0_ instanceof EntityTNTPrimed)
        {
            return 15;
        }
        else if (p_getLightLevel_0_ instanceof EntityBlaze)
        {
            EntityBlaze entityblaze = (EntityBlaze)p_getLightLevel_0_;
            return entityblaze.isCharged() ? 15 : 10;
        }
        else if (p_getLightLevel_0_ instanceof EntityMagmaCube)
        {
            EntityMagmaCube entitymagmacube = (EntityMagmaCube)p_getLightLevel_0_;
            return (double)entitymagmacube.squishFactor > 0.6D ? 13 : 8;
        }
        else
        {
            if (p_getLightLevel_0_ instanceof EntityCreeper)
            {
                EntityCreeper entitycreeper = (EntityCreeper)p_getLightLevel_0_;

                if ((double)entitycreeper.getCreeperFlashIntensity(0.0F) > 0.001D)
                {
                    return 15;
                }
            }

            if (p_getLightLevel_0_ instanceof EntityLivingBase)
            {
                EntityLivingBase entitylivingbase = (EntityLivingBase)p_getLightLevel_0_;
                ItemStack itemstack3 = entitylivingbase.getHeldItemMainhand();
                int i = getLightLevel(itemstack3);
                ItemStack itemstack1 = entitylivingbase.getHeldItemOffhand();
                int j = getLightLevel(itemstack1);
                ItemStack itemstack2 = entitylivingbase.getItemStackFromSlot(EntityEquipmentSlot.HEAD);
                int k = getLightLevel(itemstack2);
                int l = Math.max(i, j);
                return Math.max(l, k);
            }
            else if (p_getLightLevel_0_ instanceof EntityItem)
            {
                EntityItem entityitem = (EntityItem)p_getLightLevel_0_;
                ItemStack itemstack = getItemStack(entityitem);
                return getLightLevel(itemstack);
            }
            else
            {
                return 0;
            }
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:78,代碼來源:DynamicLights.java


注:本文中的net.minecraft.entity.Entity.isBurning方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。