當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。