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


Java EntityBlaze类代码示例

本文整理汇总了Java中net.minecraft.entity.monster.EntityBlaze的典型用法代码示例。如果您正苦于以下问题:Java EntityBlaze类的具体用法?Java EntityBlaze怎么用?Java EntityBlaze使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: addCollisionBoxToList

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) {
	if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD)) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD)) {
		entityIn.attackEntityFrom(DamageSource.MAGIC, 1);
	}
	if (entityIn instanceof EntityBlaze) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityEnderman) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityGhast) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityVex) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:23,代码来源:BlockSaltBarrier.java

示例2: onImpact

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
/**
 * Called when this EntityThrowable hits a block or entity.
 */
protected void onImpact(MovingObjectPosition p_70184_1_)
{
    if (p_70184_1_.entityHit != null)
    {
        int i = 0;

        if (p_70184_1_.entityHit instanceof EntityBlaze)
        {
            i = 3;
        }

        p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i);
    }

    for (int j = 0; j < 8; ++j)
    {
        this.worldObj.spawnParticle(EnumParticleTypes.SNOWBALL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, new int[0]);
    }

    if (!this.worldObj.isRemote)
    {
        this.setDead();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:EntitySnowball.java

示例3: onImpact

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
/**
 * Called when this EntityThrowable hits a block or entity.
 */
protected void onImpact(RayTraceResult result)
{
    if (result.entityHit != null)
    {
        int i = 0;

        if (result.entityHit instanceof EntityBlaze)
        {
            i = 3;
        }

        result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i);
    }

    if (!this.world.isRemote)
    {
        this.world.setEntityState(this, (byte)3);
        this.setDead();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:24,代码来源:EntitySnowball.java

示例4: onImpact

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
/**
 * Called when this EntityThrowable hits a block or entity.
 */
protected void onImpact(RayTraceResult result)
{
    if (result.entityHit != null)
    {
        int i = 0;

        if (result.entityHit instanceof EntityBlaze)
        {
            i = 3;
        }

        result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i);
    }

    for (int j = 0; j < 8; ++j)
    {
        this.worldObj.spawnParticle(EnumParticleTypes.SNOWBALL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, new int[0]);
    }

    if (!this.worldObj.isRemote)
    {
        this.setDead();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:28,代码来源:EntitySnowball.java

示例5: onImpact

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
/**
 * Called when this EntityThrowable hits a block or entity.
 */
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
    if (par1MovingObjectPosition.entityHit != null)
    {
        byte var2 = 0;

        if (par1MovingObjectPosition.entityHit instanceof EntityBlaze)
        {
            var2 = 3;
        }

        par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)var2);
    }

    for (int var3 = 0; var3 < 8; ++var3)
    {
        this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
    }

    if (!this.worldObj.isClient)
    {
        this.setDead();
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:28,代码来源:EntitySnowball.java

示例6: onImpact

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
/**
 * Called when this EntityThrowable hits a block or entity.
 */
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
	if (p_70184_1_.entityHit != null) {
		byte b0 = 0;

		if (p_70184_1_.entityHit instanceof EntityBlaze) {
			b0 = 3;
		}

		p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
	}

	for (int i = 0; i < 8; ++i) {
		this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
	}

	if (isServer()) {
		this.setDead();
		if (isServer()) {
			this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 2.5F, true);
		}
	}
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:27,代码来源:EntityGrenade.java

示例7: onImpact

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
@Override
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
   {
       if (par1MovingObjectPosition.entityHit != null)
       {
           byte b0 = 0;

           if (par1MovingObjectPosition.entityHit instanceof EntityBlaze)
           {
               b0 = 3;
           }

           par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
       }

       for (int i = 0; i < 8; ++i)
       {
           this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
       }

       if (!this.worldObj.isRemote)
       {
           this.setDead();
       }
   }
 
开发者ID:Unrelentless,项目名称:FantasyCraft-Mod,代码行数:26,代码来源:EntityFCraftIceBall.java

示例8: livingKilled

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
@SubscribeEvent
public void livingKilled(LivingDeathEvent event) {
    Entity killer = event.source.getEntity();
    EntityLivingBase target = event.entityLiving;
    if (isServer() && killer != null && killer instanceof EntityPlayer) {
        EntityPlayer player = (EntityPlayer) killer;

        if (target instanceof EntityWither) {
            DiscoveryManager.unlockItem(QADiscoveries.Item.STAR.get().getKey(), player, false);
        } else if (target instanceof EntityZombie) {
            ItemStack equip = ((EntityZombie) target).getEquipmentInSlot(0);
            if (equip != null && equip.getItem() instanceof ItemSword)
                DiscoveryManager.unlockItem(QADiscoveries.Item.SWORD.get().getKey(), player, false);
        } else if (target instanceof EntityBlaze) {
            DiscoveryManager.unlockItem(QADiscoveries.Item.TOOLS.get().getKey(), player, false);
        }
    }
}
 
开发者ID:MSourceCoded,项目名称:Quantum-Anomalies,代码行数:19,代码来源:DiscoveryListener.java

示例9: onImpact

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
protected void onImpact(MovingObjectPosition p_70184_1_)
{
    if (p_70184_1_.entityHit != null)
    {
        byte b0 = 0;

        if (p_70184_1_.entityHit instanceof EntityBlaze)
        {
            b0 = 3;
        }

        p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
    }

    for (int i = 0; i < 8; ++i)
    {
        this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
    }

    if (!this.worldObj.isRemote)
    {
        this.setDead();
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:25,代码来源:EntitySnowball.java

示例10: init

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
private static void init() {
	addDrop(EntityCreeper.class, SkillBase.armorBreak);
	addDrop(EntityIronGolem.class, SkillBase.armorBreak);
	addDrop(EntitySilverfish.class, SkillBase.dash);
	addDrop(EntityHorse.class, SkillBase.dash);
	addDrop(EntityEnderman.class, SkillBase.dodge);
	addDrop(EntityKeese.class, SkillBase.dodge);
	addDrop(EntitySpider.class, SkillBase.endingBlow);
	addDrop(EntityCaveSpider.class, SkillBase.leapingBlow);
	addDrop(EntityMagmaCube.class, SkillBase.leapingBlow);
	addDrop(EntityPigZombie.class, SkillBase.parry);
	addDrop(EntityOcelot.class, SkillBase.parry);
	addDrop(EntityOctorok.class, SkillBase.risingCut);
	addDrop(EntityBlaze.class, SkillBase.spinAttack);
	addDrop(EntityDarknut.class, SkillBase.spinAttack);
	addDrop(EntityZombie.class, SkillBase.swordBasic);
	addDrop(EntitySkeleton.class, SkillBase.swordBasic);
	addDrop(EntityGhast.class, SkillBase.swordBeam);
	addDrop(EntityWitch.class, SkillBase.swordBeam);
	addDrop(EntityWizzrobe.class, SkillBase.swordBreak);
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:22,代码来源:ZSSItemEvents.java

示例11: func_70184_a

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
protected void func_70184_a(MovingObjectPosition p_70184_1_) {
   if(p_70184_1_.field_72308_g != null) {
      byte var2 = 0;
      if(p_70184_1_.field_72308_g instanceof EntityBlaze) {
         var2 = 3;
      }

      p_70184_1_.field_72308_g.func_70097_a(DamageSource.func_76356_a(this, this.func_85052_h()), (float)var2);
   }

   for(int var3 = 0; var3 < 8; ++var3) {
      this.field_70170_p.func_72869_a("snowballpoof", this.field_70165_t, this.field_70163_u, this.field_70161_v, 0.0D, 0.0D, 0.0D);
   }

   if(!this.field_70170_p.field_72995_K) {
      this.func_70106_y();
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:20,代码来源:EntitySnowball.java

示例12: onImpact

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
/**
 * Called when this EntityThrowable hits a block or entity.
 */
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
    if (par1MovingObjectPosition.entityHit != null)
    {
        byte b0 = 0;

        if (par1MovingObjectPosition.entityHit instanceof EntityBlaze)
        {
            b0 = 3;
        }

        par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
    }

    for (int i = 0; i < 8; ++i)
    {
        this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
    }

    if (!this.worldObj.isRemote)
    {
        this.setDead();
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:28,代码来源:EntitySnowball.java

示例13: itemInteractionForEntity

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
@Override
  public boolean itemInteractionForEntity(ItemStack ext, EntityPlayer player, EntityLivingBase target){
      boolean result=false;
      if(player.isBurning()){
      	player.extinguish();
      	result=true;
      }else if(target.isBurning()){
      	target.extinguish();
      	result=true;
      }else if(target instanceof EntityBlaze){
      	target.attackEntityFrom(DamageSource.magic, 10);
      	result=true;
      }
      if(result){
      	ext.damageItem(1, target);
	for(int i=0; i<10; i++){
		target.worldObj.spawnParticle("explode", target.posX, target.posY, target.posZ, 0,0.1,0);
	}
      }
return result;
  }
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:22,代码来源:ItemFireExtinguisher.java

示例14: entityUndeadCheck

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
public static boolean entityUndeadCheck(MovingObjectPosition movObjPos) {
	boolean result = false;
	if ((movObjPos.entityHit instanceof EntityZombie)) {
		result = true;
	}
	if ((movObjPos.entityHit instanceof EntitySkeleton)) {
		result = true;
	}
	if ((movObjPos.entityHit instanceof EntityPigZombie)) {
		result = true;
	}
	if ((!(movObjPos.entityHit instanceof EntityBlaze))
			|| ((!(movObjPos.entityHit instanceof EntityWitherSkull)) || ((!(movObjPos.entityHit instanceof EntityWither)) || ((movObjPos.entityHit instanceof EntityGhast)))))
		;
	return result;
}
 
开发者ID:TheTemportalist,项目名称:CountryGamer_PlantsVsZombies,代码行数:17,代码来源:EntDec.java

示例15: afterCraterFormed

import net.minecraft.entity.monster.EntityBlaze; //导入依赖的package包/类
public void afterCraterFormed(World world, Random random, int i, int j, int k) {
	if (this.crashSize >= MeteorsMod.instance.MinMeteorSizeForPortal) {
		createPortal(world, i, j, k, random.nextBoolean());
	}
	int blazes = random.nextInt(3);
	ArrayList arraylist = new ArrayList();
	arraylist.addAll(this.explosion.affectedBlockPositions);
	for (int j1 = arraylist.size() - 1; (j1 >= 0) && 
			(blazes > 0); j1--)
	{
		ChunkPosition chunkposition1 = (ChunkPosition)arraylist.get(j1);
		int l = chunkposition1.chunkPosX;
		int j11 = chunkposition1.chunkPosY;
		int l1 = chunkposition1.chunkPosZ;
		boolean j2 = world.isAirBlock(l, j11, l1);
		Block k2 = world.getBlock(l, j11 - 1, l1);
		if (j2 && k2.isOpaqueCube() && (random.nextInt(10) > 4)) {
			EntityBlaze blaze = new EntityBlaze(world);
			blaze.setPositionAndRotation(l, j11, l1, 0.0F, 0.0F);
			world.spawnEntityInWorld(blaze);
			blazes--;
		}
	}
}
 
开发者ID:AlexDGr8r,项目名称:MeteorsMod,代码行数:25,代码来源:CrashKreknorite.java


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