Java Code Examples for net.minecraft.entity.monster.EntityBlaze

The following are top voted examples for showing how to use net.minecraft.entity.monster.EntityBlaze. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: Bewitchment   File: BlockSaltBarrier.java   Source Code and License 6 votes vote down vote up
@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));
	}
}
 
Example 2
Project: BaseClient   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 3
Project: BaseClient   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 4
Project: Backmemed   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 5
Project: CustomWorldGen   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 6
Project: Resilience-Client-Source   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 7
Project: ZeroQuest   File: EntityGrenade.java   Source Code and License 6 votes vote down vote up
/**
 * 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);
		}
	}
}
 
Example 8
Project: FantasyCraft-Mod   File: EntityFCraftIceBall.java   Source Code and License 6 votes vote down vote up
@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();
       }
   }
 
Example 9
Project: ExpandedRailsMod   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 10
Project: Quantum-Anomalies   File: DiscoveryListener.java   Source Code and License 6 votes vote down vote up
@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);
        }
    }
}
 
Example 11
Project: Cauldron   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
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();
    }
}
 
Example 12
Project: Cauldron   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
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();
    }
}
 
Example 13
Project: ZeldaSwordSkills   File: ZSSItemEvents.java   Source Code and License 6 votes vote down vote up
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);
}
 
Example 14
Project: RuneCraftery   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
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();
   }

}
 
Example 15
Project: RuneCraftery   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 16
Project: Gizmos   File: ItemFireExtinguisher.java   Source Code and License 6 votes vote down vote up
@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;
  }
 
Example 17
Project: CountryGamer_PlantsVsZombies   File: EntDec.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 18
Project: BetterNutritionMod   File: EntitySnowball.java   Source Code and License 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 19
Project: MeteorsMod   File: CrashKreknorite.java   Source Code and License 6 votes vote down vote up
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--;
		}
	}
}
 
Example 20
Project: PneumaticCraft   File: HackableHandler.java   Source Code and License 6 votes vote down vote up
public static void addDefaultEntries(){
    PneumaticRegistry.getInstance().addHackable(Blocks.tnt, HackableTNT.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.mob_spawner, HackableMobSpawner.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.lever, HackableLever.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.stone_button, HackableButton.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.wooden_button, HackableButton.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.wooden_door, HackableDoor.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.tripwire_hook, HackableTripwire.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.dispenser, HackableDispenser.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.dropper, HackableDispenser.class);
    PneumaticRegistry.getInstance().addHackable(Blockss.securityStation, HackableSecurityStation.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.monster_egg, HackableTripwire.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.noteblock, HackableNoteblock.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.jukebox, HackableJukebox.class);

    PneumaticRegistry.getInstance().addHackable(EntityCreeper.class, HackableCreeper.class);
    PneumaticRegistry.getInstance().addHackable(EntityTameable.class, HackableTameable.class);
    PneumaticRegistry.getInstance().addHackable(EntityCow.class, HackableCow.class);
    PneumaticRegistry.getInstance().addHackable(EntityCaveSpider.class, HackableCaveSpider.class);
    PneumaticRegistry.getInstance().addHackable(EntityBlaze.class, HackableBlaze.class);
    PneumaticRegistry.getInstance().addHackable(EntityGhast.class, HackableGhast.class);
    PneumaticRegistry.getInstance().addHackable(EntityWitch.class, HackableWitch.class);
    PneumaticRegistry.getInstance().addHackable(EntityLiving.class, HackableLivingDisarm.class);
    PneumaticRegistry.getInstance().addHackable(EntityEnderman.class, HackableEnderman.class);
    PneumaticRegistry.getInstance().addHackable(EntityBat.class, HackableBat.class);
}
 
Example 21
Project: Modjam-3-Winter-Warfare-Mod   File: EntityHardSnowball.java   Source Code and License 6 votes vote down vote up
/**
 * Called when this EntityThrowable hits a block or entity.
 */
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
    if (par1MovingObjectPosition.entityHit != null)
    {
        byte b0 = 1;

        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();
    }
}
 
Example 22
Project: Modjam-3-Winter-Warfare-Mod   File: EntityRockySnowBall.java   Source Code and License 6 votes vote down vote up
/**
 * Called when this EntityThrowable hits a block or entity.
 */
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
    if (par1MovingObjectPosition.entityHit != null)
    {
        byte b0 = 4;

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

        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();
    }
}
 
Example 23
Project: Modjam-3-Winter-Warfare-Mod   File: EntityIceball.java   Source Code and License 6 votes vote down vote up
/**
 * Called when this EntityThrowable hits a block or entity.
 */
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
    if (par1MovingObjectPosition.entityHit != null)
    {
        byte b0 = 2;

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

        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();
    }
}
 
Example 24
Project: Soul-Forest   File: EntityFrostShard.java   Source Code and License 6 votes vote down vote up
/**
    * 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 = (byte) this.getDamage();

    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();
}
   }
 
Example 25
Project: pnc-repressurized   File: Reflections.java   Source Code and License 5 votes vote down vote up
public static void init() {
    msbl_isActivated = ReflectionHelper.findMethod(MobSpawnerBaseLogic.class, "isActivated", "func_98279_f");
    msbl_getEntityId = ReflectionHelper.findMethod(MobSpawnerBaseLogic.class, "getEntityId", "func_190895_g");
    
    // access to non-public entity AI's for hacking purposes
    blaze_aiFireballAttack = findEnclosedClass(EntityBlaze.class, "AIFireballAttack", "a");
    ghast_aiFireballAttack = findEnclosedClass(EntityGhast.class, "AIFireballAttack", "c");
}
 
Example 26
Project: BaseClient   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 27
Project: BaseClient   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 28
Project: minecraft-quiverbow   File: SnowShot.java   Source Code and License 5 votes vote down vote up
@Override
public void onImpact(MovingObjectPosition target)	// Server-side
{
	if (target.entityHit != null) 
   	{
   		target.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.shootingEntity), (float) this.damage);
   		target.entityHit.hurtResistantTime = 0;
           
           if (target.entityHit instanceof EntityLivingBase)
           {
            EntityLivingBase entitylivingbase = (EntityLivingBase) target.entityHit;
            
            Helper.applyPotionEffect(entitylivingbase, pot1);
           }
           
           // Triple DMG vs Blazes, so applying twice more
           if (target.entityHit instanceof EntityBlaze)
           {
           	target.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.shootingEntity), (float) (this.damage *2));
       		target.entityHit.hurtResistantTime = 0;
           }
       }
	else
	{
		// Glass breaking
   		Helper.tryBlockBreak(this.worldObj, this, target, 1);
	}

   	// SFX
	NetHelper.sendParticleMessageToAllPlayers(this.worldObj, this.getEntityId(), (byte) 12, (byte) 2);
       this.worldObj.playSoundAtEntity(this, "random.pop", 1.0F, 0.5F);
       
       this.setDead();		// We've hit something, so begone with the projectile
}
 
Example 29
Project: Backmemed   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new Biome.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new Biome.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new Biome.SpawnListEntry(EntityWitherSkeleton.class, 8, 5, 5));
    this.spawnList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 2, 5, 5));
    this.spawnList.add(new Biome.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 30
Project: IceMod   File: EntityHunkOIce.java   Source Code and License 5 votes vote down vote up
/**
 * 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.explode();
        this.setDead();
    }
}
 
Example 31
Project: CustomWorldGen   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new Biome.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new Biome.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
    this.spawnList.add(new Biome.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 32
Project: Possessed   File: PossessHandler.java   Source Code and License 5 votes vote down vote up
public static void onPreInit() {
    PossessHandler.registerHandler(new BlazeHandler());
    PossessHandler.registerHandler(new ChickenHandler());
    PossessHandler.registerHandler(new CreeperHandler());
    PossessHandler.registerHandler(new DragonHandler());
    PossessHandler.registerHandler(new EndermanHandler());
    PossessHandler.registerHandler(new FlyingHandler(EntityFlying.class, new ResourceLocation(Possessed.MODID, "flying")));
    PossessHandler.registerHandler(new FlyingHandler(EntityBat.class, new ResourceLocation(Possessed.MODID, "bat_flying")));
    PossessHandler.registerHandler(new FlyingHandler(EntityBlaze.class, new ResourceLocation(Possessed.MODID, "blaze_flying")));
    PossessHandler.registerHandler(new GhastHandler());
    PossessHandler.registerHandler(new GrassEatHandler(EntityCow.class, new ResourceLocation(Possessed.MODID, "cow_grass")));
    PossessHandler.registerHandler(new GrassEatHandler(EntityChicken.class, new ResourceLocation(Possessed.MODID, "chicken_grass")));
    PossessHandler.registerHandler(new GrassEatHandler(EntityPig.class, new ResourceLocation(Possessed.MODID, "pig_grass")));
    PossessHandler.registerHandler(new GrassEatHandler(EntityHorse.class, new ResourceLocation(Possessed.MODID, "horse_grass")));
    PossessHandler.registerHandler(new GuardianHandler());
    PossessHandler.registerHandler(new IronGolemHandler());
    PossessHandler.registerHandler(new OcelotHandler());
    PossessHandler.registerHandler(new PolarBearHandler());
    PossessHandler.registerHandler(new RabbitHandler());
    PossessHandler.registerHandler(new SheepHandler());
    PossessHandler.registerHandler(new ShulkerHandler());
    PossessHandler.registerHandler(new SkeletonHandler());
    PossessHandler.registerHandler(new SlimeHandler());
    PossessHandler.registerHandler(new SnowmanHandler());
    PossessHandler.registerHandler(new SpiderHandler());
    PossessHandler.registerHandler(new SquidHandler());
    PossessHandler.registerHandler(new WaterMobHandler());
    PossessHandler.registerHandler(new WitherHandler());
    PossessHandler.registerHandler(new ZombieHandler());
}
 
Example 33
Project: BetterWithAddons   File: RenewablesHandler.java   Source Code and License 5 votes vote down vote up
public void spawnArtificalBlaze(World world, BlockPos pos, boolean artificial)
{
    EntityBlaze blaze = new EntityBlaze(world);
    blaze.setPosition(pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+0.5);
    blaze.getCapability(ARTIFICIAL_BLAZE_CAP,null).isArtificial = artificial;
    world.spawnEntity(blaze);

    for(int i = 0; i < 6; i++)
        world.playEvent(2004, pos.up(i % 3), 0);
}
 
Example 34
Project: BetterWithAddons   File: RenewablesHandler.java   Source Code and License 5 votes vote down vote up
@SubscribeEvent
public void blazeAttachCapability(AttachCapabilitiesEvent<Entity> event)
{
    Entity entity = event.getObject();

    if(entity instanceof EntityBlaze)
    {
        event.addCapability(ARTIFICIAL_BLAZE,new ArtificialBlaze());
    }
}
 
Example 35
Project: BetterWithAddons   File: RenewablesHandler.java   Source Code and License 5 votes vote down vote up
@SubscribeEvent
public void blazeDespawn(LivingSpawnEvent.AllowDespawn event)
{
    Entity entity = event.getEntity();

    if(entity instanceof EntityBlaze && entity.getCapability(ARTIFICIAL_BLAZE_CAP,null).isArtificial)
    {
        event.setResult(Event.Result.DENY);
    }
}
 
Example 36
Project: Fyrestone   File: SwordEffectWaterstone.java   Source Code and License 5 votes vote down vote up
@Override
public void ApplyEffect(ItemStack stack, EntityLivingBase entity, EntityPlayer player) {
	if(entity instanceof EntityEnderman || entity instanceof EntityBlaze)
	{
		entity.attackEntityFrom(DamageSource.causePlayerDamage(player), damageBonus);
	}
	
	if(entity.isBurning()) entity.extinguish();
}
 
Example 37
Project: ExNihiloAdscensio   File: ItemDoll.java   Source Code and License 5 votes vote down vote up
/**
 * Spawns the mob in the world at position
 * @param stack The Doll Stack
 * @param pos Blockpos
 * @return true if spawn is successful
 */
public boolean spawnMob(ItemStack stack, World world, BlockPos pos) {
	if (stack.getItemDamage() == 0) {
		EntityBlaze blaze = new EntityBlaze(world);
		blaze.setPosition(pos.getX(), pos.getY()+1, pos.getZ());

		return world.spawnEntity(blaze);
	}
	else {
		EntityEnderman enderman = new EntityEnderman(world);
		enderman.setPosition(pos.getX(), pos.getY()+2, pos.getZ());
		
		return world.spawnEntity(enderman);
	}
}
 
Example 38
Project: CivRadar   File: Config.java   Source Code and License 5 votes vote down vote up
public Config() {
	mobs = new ArrayList<Entity>(Arrays.asList(new Entity[]{
			new Entity(EntityBat.class), 
			new Entity(EntityChicken.class),
			new Entity(EntityCow.class),
			new Entity(EntityHorse.class),
			new Entity(EntityMooshroom.class),
			new Entity(EntityOcelot.class),
			new Entity(EntityPig.class),
			new Entity(EntityRabbit.class),
			new Entity(EntitySheep.class),
			new Entity(EntitySquid.class),
			new Entity(EntityVillager.class),
			new Entity(EntityWolf.class),
			new Entity(EntityBlaze.class),
			new Entity(EntityCaveSpider.class),
			new Entity(EntityCreeper.class),
			new Entity(EntityEnderman.class),
			new Entity(EntityGhast.class),
			new Entity(EntityGolem.class),
			new Entity(EntityGuardian.class),
			new Entity(EntityIronGolem.class),
			new Entity(EntityMagmaCube.class),
			new Entity(EntityPigZombie.class),
			new Entity(EntitySilverfish.class),
			new Entity(EntitySkeleton.class),
			new Entity(EntitySlime.class),
			new Entity(EntitySnowman.class),
			new Entity(EntitySpider.class),
			new Entity(EntityWitch.class),
			new Entity(EntityZombie.class),
			new Entity(EntityItem.class),
			new Entity(EntityMinecart.class),
			new Entity(EntityPlayer.class)
			}));
}
 
Example 39
Project: NetherEnhancements   File: DropHandler.java   Source Code and License 5 votes vote down vote up
@SubscribeEvent
public void onEntityDrop(LivingDropsEvent event) {
    random = new Random();
    dropped = random.nextInt(1) + 1;

    if (event.entityLiving instanceof EntityBlaze) {
        event.entityLiving.entityDropItem(new ItemStack(RegisterItems.itemActivatedBlazePowder), dropped);
    }
}
 
Example 40
Project: amunra   File: EntityCryoArrow.java   Source Code and License 5 votes vote down vote up
@Override
protected int getEntityDependentDamage(Entity ent, int regularDamage) {
    if(ent instanceof EntityBlaze) {
        return regularDamage * 2;
    }
    return regularDamage;
}
 
Example 41
Project: amunra   File: EntityLaserArrow.java   Source Code and License 5 votes vote down vote up
@Override
protected int getEntityDependentDamage(Entity ent, int regularDamage) {
    if(ent instanceof EntityBlaze) {
        return Math.max(regularDamage / 2, 1);
    }
    return regularDamage;
}
 
Example 42
Project: FusionWarfare   File: PyroBlastEvent.java   Source Code and License 5 votes vote down vote up
@Override
public void detonate(World world, int x, int y, int z) {

	//for (Location loc : ShapeUtil.getSphere(world, x, y, z, 20)) {
	for (Location loc : ShapeUtil.getCube(world, x, y - 20, z, 10, 30, 10)) {	
	
		if (hasSpace(loc) && rand.nextInt(150) == 0) {
			
			EntityBlaze entity = new EntityBlaze(world);
			entity.setPositionAndUpdate(loc.x, loc.y, loc.z);
			world.spawnEntityInWorld(entity);
		}
	}
}
 
Example 43
Project: Resilience-Client-Source   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 44
Project: Resilience-Client-Source   File: RenderBlaze.java   Source Code and License 5 votes vote down vote up
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
 */
public void doRender(EntityBlaze par1EntityBlaze, double par2, double par4, double par6, float par8, float par9)
{
    int var10 = ((ModelBlaze)this.mainModel).func_78104_a();

    if (var10 != this.field_77068_a)
    {
        this.field_77068_a = var10;
        this.mainModel = new ModelBlaze();
    }

    super.doRender((EntityLiving)par1EntityBlaze, par2, par4, par6, par8, par9);
}
 
Example 45
Project: Aura-Cascade   File: ItemMirror.java   Source Code and License 5 votes vote down vote up
public void redirect(EntityFireball entity) {

        if (!entity.worldObj.isRemote && !(entity instanceof EntityWitherSkull)) {
            AxisAlignedBB axisAlignedBB = new AxisAlignedBB(entity.posX - 100, entity.posY - 100, entity.posZ - 100, entity.posX + 100, entity.posY + 100, entity.posZ + 100);


            List<EntityFireball> targets = ImmutableList.copyOf(Iterables.filter(entity.worldObj.getEntitiesWithinAABB(EntityFireball.class, axisAlignedBB), new Predicate<EntityFireball>() {
                @Override
                public boolean apply(EntityFireball input) {
                    return input.shootingEntity instanceof EntityBlaze || input.shootingEntity instanceof EntityGhast;
                }
            }));

            if (targets.size() > 0) {

                //Check to make sure the fireball is traveling towards the player
                Entity target = targets.get(0);
                entity.motionX = (target.posX - entity.posX) / 15;
                entity.motionY = (target.posY - entity.posY) / 15;
                entity.motionZ = (target.posZ - entity.posZ) / 15;
                entity.accelerationX = entity.motionX * .3;
                entity.accelerationY = entity.motionY * .3;
                entity.accelerationZ = entity.motionZ * .3;
                AuraCascade.proxy.networkWrapper.sendToAllAround(new PacketBurst(1, entity.posX, entity.posY, entity.posZ), new NetworkRegistry.TargetPoint(entity.worldObj.provider.getDimension(), entity.posX, entity.posY, entity.posZ, 32));
            }
        }
    }
 
Example 46
Project: ZeroQuest   File: EntityGrenade.java   Source Code and License 5 votes vote down vote up
/**
 * Called when this EntityThrowable hits a block or entity.
 */
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("smoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
    }

    if (!this.worldObj.isRemote)
    {
        this.setDead();
if (!this.worldObj.isRemote){
 this.worldObj.createExplosion((Entity)null, this.posX, this.posY, this.posZ, 2.5F, true);
}
    }
}
 
Example 47
Project: Cauldron   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 48
Project: Cauldron   File: RenderBlaze.java   Source Code and License 5 votes vote down vote up
public void doRender(EntityBlaze p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    int i = ((ModelBlaze)this.mainModel).func_78104_a();

    if (i != this.field_77068_a)
    {
        this.field_77068_a = i;
        this.mainModel = new ModelBlaze();
    }

    super.doRender((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
 
Example 49
Project: Cauldron   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
    this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 50
Project: Cauldron   File: RenderBlaze.java   Source Code and License 5 votes vote down vote up
public void doRender(EntityBlaze p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    int i = ((ModelBlaze)this.mainModel).func_78104_a();

    if (i != this.field_77068_a)
    {
        this.field_77068_a = i;
        this.mainModel = new ModelBlaze();
    }

    super.doRender((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
 
Example 51
Project: ZeldaSwordSkills   File: BackSlice.java   Source Code and License 5 votes vote down vote up
private static void init() {
	if (immuneEntities == null) {
		immuneEntities = new HashSet<Class<? extends EntityLivingBase>>();
		immuneEntities.add(EntityBlaze.class);
		immuneEntities.add(EntityChu.class);
		immuneEntities.add(EntitySnowman.class);
		immuneEntities.add(EntitySlime.class);
	}
}
 
Example 52
Project: RuneCraftery   File: RenderBlaze.java   Source Code and License 5 votes vote down vote up
public void func_77067_a(EntityBlaze p_77067_1_, double p_77067_2_, double p_77067_4_, double p_77067_6_, float p_77067_8_, float p_77067_9_) {
   int var10 = ((ModelBlaze)this.field_77045_g).func_78104_a();
   if(var10 != this.field_77068_a) {
      this.field_77068_a = var10;
      this.field_77045_g = new ModelBlaze();
   }

   super.func_77031_a(p_77067_1_, p_77067_2_, p_77067_4_, p_77067_6_, p_77067_8_, p_77067_9_);
}
 
Example 53
Project: RuneCraftery   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
    this.spawnList.add(new SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 54
Project: RuneCraftery   File: RenderBlaze.java   Source Code and License 5 votes vote down vote up
public void renderBlaze(EntityBlaze par1EntityBlaze, double par2, double par4, double par6, float par8, float par9)
{
    int i = ((ModelBlaze)this.mainModel).func_78104_a();

    if (i != this.field_77068_a)
    {
        this.field_77068_a = i;
        this.mainModel = new ModelBlaze();
    }

    super.doRenderLiving(par1EntityBlaze, par2, par4, par6, par8, par9);
}
 
Example 55
Project: ForestryLegacy   File: AlleleEffectResurrection.java   Source Code and License 5 votes vote down vote up
public AlleleEffectResurrection(String uid) {
	super(uid, "resurrection", true, 40, true);
	resurrectables.put(new ItemStack(Item.bone), EntitySkeleton.class);
	resurrectables.put(new ItemStack(Item.arrow), EntitySkeleton.class);
	resurrectables.put(new ItemStack(Item.gunpowder), EntityCreeper.class);
	resurrectables.put(new ItemStack(Item.enderPearl), EntityEnderman.class);
	resurrectables.put(new ItemStack(Item.silk), EntitySpider.class);
	resurrectables.put(new ItemStack(Item.spiderEye), EntitySpider.class);
	resurrectables.put(new ItemStack(Item.rottenFlesh), EntityZombie.class);
	resurrectables.put(new ItemStack(Item.blazeRod), EntityBlaze.class);
	resurrectables.put(new ItemStack(Item.ghastTear), EntityGhast.class);
	resurrectables.put(new ItemStack(Block.dragonEgg), EntityDragon.class);
}
 
Example 56
Project: BetterNutritionMod   File: MapGenNetherBridge.java   Source Code and License 5 votes vote down vote up
public MapGenNetherBridge()
{
    this.spawnList.add(new SpawnListEntry(EntityBlaze.class, 10, 2, 3));
    this.spawnList.add(new SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
    this.spawnList.add(new SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
    this.spawnList.add(new SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
 
Example 57
Project: BetterNutritionMod   File: RenderBlaze.java   Source Code and License 5 votes vote down vote up
public void renderBlaze(EntityBlaze par1EntityBlaze, double par2, double par4, double par6, float par8, float par9)
{
    int i = ((ModelBlaze)this.mainModel).func_78104_a();

    if (i != this.field_77068_a)
    {
        this.field_77068_a = i;
        this.mainModel = new ModelBlaze();
    }

    super.doRenderLiving(par1EntityBlaze, par2, par4, par6, par8, par9);
}
 
Example 58
Project: Kingdom-Keys   File: Munny10Drops.java   Source Code and License 5 votes vote down vote up
@ForgeSubscribe
public void onHostileEntityDrop(LivingDropsEvent event) {
	if (event.source.getDamageType().equals("player")) {
		rand = Math.random();
		if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) {
			//The integer at the end relates to how many Items will be dropped(percentage). 
			if (rand < 0.22d && ConfigBooleans.munnyDrops){
				//The integer at the end relates to how many Items will be dropped(amount). 
				event.entityLiving.dropItem(AddedItems.Munny10.itemID, 1);
			}
		}
	}
}
 
Example 59
Project: Kingdom-Keys   File: Munny50Drops.java   Source Code and License 5 votes vote down vote up
@ForgeSubscribe
public void onHostileEntityDrop(LivingDropsEvent event) {
	if (event.source.getDamageType().equals("player")) {
		rand = Math.random();
		if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) {
			//The integer at the end relates to how many Items will be dropped(percentage). 
			if (rand < 0.10d && ConfigBooleans.munnyDrops){
				//The integer at the end relates to how many Items will be dropped(amount). 
				event.entityLiving.dropItem(AddedItems.Munny50.itemID, 1);
			}
		}
	}
}
 
Example 60
Project: Kingdom-Keys   File: Munny5Drops.java   Source Code and License 5 votes vote down vote up
@ForgeSubscribe
public void onHostileEntityDrop(LivingDropsEvent event) {
	if (event.source.getDamageType().equals("player")) {
		rand = Math.random();
		if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) {
			//The integer at the end relates to how many Items will be dropped(percentage). 
			if (rand < 0.40d && ConfigBooleans.munnyDrops){
				//The integer at the end relates to how many Items will be dropped(amount). 
				event.entityLiving.dropItem(AddedItems.Munny5.itemID, 1);
			}
		}
	}
}