本文整理汇总了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_);
}
示例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_);
}
示例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;
}
示例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);
}
}
示例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_);
}
}
示例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;
}
示例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;
}
}
}
}
示例8: testProperty
import net.minecraft.entity.Entity; //导入方法依赖的package包/类
public boolean testProperty(Random random, Entity entityIn)
{
return entityIn.isBurning() == this.onFire;
}
示例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;
}
}
}
}