Java 类net.minecraft.entity.projectile.EntitySmallFireball 实例源码

项目:AdvancedCombat    文件:TrackingDispenserBehavior.java   
@Override
public ItemStack dispenseStack(IBlockSource source, ItemStack stack) {
       World world = source.getWorld();
       BlockPos pos = source.getBlockPos();
       Vec3d pos2 = new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5);
       Vec3d dir = this.getNearestTargetDirection(world, pos);
       if(dir == null) return null;
       IPosition ipos = new PositionImpl(pos2.x + dir.x * .75, pos2.y + dir.y * .75, pos2.z + dir.z * .75);
          double d0 = ipos.getX();
          double d1 = ipos.getY();
          double d2 = ipos.getZ();
          Random random = world.rand;
          double d3 = random.nextGaussian() * 0.05D + dir.x;
          double d4 = random.nextGaussian() * 0.05D + dir.y;
          double d5 = random.nextGaussian() * 0.05D + dir.z;
          world.spawnEntity(new EntitySmallFireball(world, d0, d1, d2, d3, d4, d5));
          stack.splitStack(1);
          return stack;
}
项目:PopularMMOS-EpicProportions-Mod    文件:itemJenStaff.java   
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
    //itemstack.damageItem(100, entityplayer);
        if (!world.isRemote)
        {

            Vec3 look = entityplayer.getLookVec();
            EntitySmallFireball fireball2 = new EntitySmallFireball(world, entityplayer, 1, 1, 1);
            fireball2.setPosition(
                    entityplayer.posX + look.xCoord * 5,
                    entityplayer.posY + look.yCoord * 5,
                    entityplayer.posZ + look.zCoord * 5);
            fireball2.accelerationX = look.xCoord * 0.1;
            fireball2.accelerationY = look.yCoord * 0.1;
            fireball2.accelerationZ = look.zCoord * 0.1;
            world.spawnEntityInWorld(fireball2);
            world.playSoundAtEntity(entityplayer, "epicproportionsmod:jen_staff_thunder", 1.0F, 1.0F);
            this.setItemDamage(itemJenStaff.getItemDamage() - 1);

            //p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
            //return p_77659_1_;
            }

        return itemstack;
        }
项目:rpginventory    文件:ItemSoulSphere.java   
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World,EntityPlayer par3EntityPlayer) {

    if(RpgInventoryMod.playerClass.contains(RpgBaseAddon.CLASSALCHEMIST)){

        if (par3EntityPlayer.inventory.hasItem(Items.blaze_powder)) {

            Vec3 look = par3EntityPlayer.getLookVec();
            EntitySmallFireball ball = new EntitySmallFireball(par2World, par3EntityPlayer, 1, 1, 1);
            ball.setPosition(par3EntityPlayer.posX + (look.xCoord * 1),par3EntityPlayer.posY + (look.yCoord * 1) + 1.5,par3EntityPlayer.posZ + (look.zCoord * 1));
            ball.accelerationX = look.xCoord * 0.1;
            ball.accelerationY = look.yCoord * 0.1;
            ball.accelerationZ = look.zCoord * 0.1;

            if (!par2World.isRemote) {
                par2World.spawnEntityInWorld(ball);
            }
            par1ItemStack.damageItem(1, par3EntityPlayer);

            if(!par3EntityPlayer.capabilities.isCreativeMode)
                par3EntityPlayer.inventory.consumeInventoryItem(Items.blaze_powder);
        }
    }
    return par1ItemStack;
}
项目:MysticalTrinkets    文件:ItemLavaSwimmerRing.java   
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
    double d0 = player.posX - player.posX;
    double d1 = player.boundingBox.minY + player.height / 2.0F - (player.posY + player.height / 2.0F);
    double d2 = player.posZ - player.posZ;
    float f1 = MathHelper.sqrt_float(1F) * 0.5F;
    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(world, player, d0 + world.rand.nextGaussian() * f1, d1, d2 + world.rand.nextGaussian() * f1);
    // EntitySmallFireball entitysmallfireball = new
    // EntitySmallFireball(world, player, player.cameraYaw,
    // player.cameraPitch, player.cameraYaw );

    entitysmallfireball.posY = player.posY + player.height / 2.0F + 0.5D;
    world.spawnEntityInWorld(entitysmallfireball);

    // world.spawnEntityInWorld(new EntityLargeFireball(world, player.posX,
    // player.posY, player.posZ, (double)player.cameraYaw,
    // (double)player.cameraPitch, (double)player.cameraYaw));
    return itemstack;
}
项目:RuneCraftery    文件:DispenserBehaviorFireball.java   
/**
 * Dispense the specified stack, play the dispense sound and spawn particles.
 */
public ItemStack dispenseStack(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
{
    EnumFacing enumfacing = BlockDispenser.getFacing(par1IBlockSource.getBlockMetadata());
    IPosition iposition = BlockDispenser.getIPositionFromBlockSource(par1IBlockSource);
    double d0 = iposition.getX() + (double)((float)enumfacing.getFrontOffsetX() * 0.3F);
    double d1 = iposition.getY() + (double)((float)enumfacing.getFrontOffsetX() * 0.3F);
    double d2 = iposition.getZ() + (double)((float)enumfacing.getFrontOffsetZ() * 0.3F);
    World world = par1IBlockSource.getWorld();
    Random random = world.rand;
    double d3 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetX();
    double d4 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetY();
    double d5 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetZ();
    world.spawnEntityInWorld(new EntitySmallFireball(world, d0, d1, d2, d3, d4, d5));
    par2ItemStack.splitStack(1);
    return par2ItemStack;
}
项目:BetterNutritionMod    文件:DispenserBehaviorFireball.java   
/**
 * Dispense the specified stack, play the dispense sound and spawn particles.
 */
public ItemStack dispenseStack(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
{
    EnumFacing enumfacing = BlockDispenser.getFacing(par1IBlockSource.getBlockMetadata());
    IPosition iposition = BlockDispenser.getIPositionFromBlockSource(par1IBlockSource);
    double d0 = iposition.getX() + (double)((float)enumfacing.getFrontOffsetX() * 0.3F);
    double d1 = iposition.getY() + (double)((float)enumfacing.getFrontOffsetX() * 0.3F);
    double d2 = iposition.getZ() + (double)((float)enumfacing.getFrontOffsetZ() * 0.3F);
    World world = par1IBlockSource.getWorld();
    Random random = world.rand;
    double d3 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetX();
    double d4 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetY();
    double d5 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetZ();
    world.spawnEntityInWorld(new EntitySmallFireball(world, d0, d1, d2, d3, d4, d5));
    par2ItemStack.splitStack(1);
    return par2ItemStack;
}
项目:Artifacts    文件:DispenserBehaviorFireball.java   
/**
 * Dispense the specified stack, play the dispense sound and spawn particles.
 */
public ItemStack dispenseStack(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
{
    EnumFacing enumfacing = BlockTrap.getFacing(par1IBlockSource.getBlockMetadata());
    IPosition iposition = BlockTrap.getIPositionFromBlockSource(par1IBlockSource);
    double d0 = iposition.getX() + (double)((float)enumfacing.getFrontOffsetX() * 0.3F);
    double d1 = iposition.getY() + (double)((float)enumfacing.getFrontOffsetX() * 0.3F);
    double d2 = iposition.getZ() + (double)((float)enumfacing.getFrontOffsetZ() * 0.3F);
    World world = par1IBlockSource.getWorld();
    Random random = world.rand;
    double d3 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetX();
    double d4 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetY();
    double d5 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetZ();
    world.spawnEntityInWorld(new EntitySmallFireball(world, d0, d1, d2, d3, d4, d5));
    par2ItemStack.splitStack(1);
    return par2ItemStack;
}
项目:Possessed    文件:BlazeHandler.java   
@Override
public void onClickAir(PossessivePlayer possessivePlayer, EntityPlayer player) {
    if (!player.worldObj.isRemote && this.getData(player).getShort("ProjectileCooldown") <= 0) {
        player.worldObj.playEvent(null, 1018, player.getPosition(), 0);
        float pitchVelocity = MathHelper.cos(player.rotationPitch * 0.017453292F);
        float velocityX = -MathHelper.sin(player.rotationYaw * 0.017453292F) * pitchVelocity;
        float velocityY = -MathHelper.sin(player.rotationPitch * 0.017453292F);
        float velocityZ = MathHelper.cos(player.rotationYaw * 0.017453292F) * pitchVelocity;
        EntitySmallFireball fireball = new EntitySmallFireball(player.worldObj, player, velocityX + player.motionX, velocityY + player.motionY, velocityZ + player.motionZ);
        fireball.posY = player.posY + player.height / 2.0F + 0.5D;
        player.worldObj.spawnEntityInWorld(fireball);
        this.getData(player).setShort("ProjectileCooldown", (short) 10);
    }
}
项目:4Space-5    文件:EntityEvolvedBlaze.java   
@Override
protected void attackEntity(Entity par1Entity, float par2) {
    if (this.attackTime <= 0 && par2 < 2.0F && par1Entity.boundingBox.maxY > this.boundingBox.minY && par1Entity.boundingBox.minY < this.boundingBox.maxY) {
        this.attackTime = 20;
        this.attackEntityAsMob(par1Entity);
    } else if (par2 < 30.0F) {
        final double d0 = par1Entity.posX - this.posX;
        final double d1 = par1Entity.boundingBox.minY + par1Entity.height / 2.0F - (this.posY + this.height / 2.0F);
        final double d2 = par1Entity.posZ - this.posZ;

        if (this.attackTime == 0) {
            ++this.field_70846_g;

            if (this.field_70846_g == 1) {
                this.attackTime = 60;
                this.func_70844_e(true);
            } else if (this.field_70846_g <= 4) {
                this.attackTime = 6;
            } else {
                this.attackTime = 100;
                this.field_70846_g = 0;
                this.func_70844_e(false);
            }

            if (this.field_70846_g > 1) {
                final float f1 = MathHelper.sqrt_float(par2) * 0.5F;
                this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) this.posX, (int) this.posY, (int) this.posZ, 0);

                for (int i = 0; i < 1; ++i) {
                    final EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.worldObj, this, d0 + this.rand.nextGaussian() * f1, d1, d2 + this.rand.nextGaussian() * f1);
                    entitysmallfireball.posY = this.posY + this.height / 2.0F + 0.5D;
                    this.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.rotationYaw = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
        this.hasAttacked = true;
    }
}
项目:metamorph    文件:SmallFireball.java   
@Override
public void execute(EntityLivingBase target, @Nullable AbstractMorph morph)
{
    World world = target.worldObj;

    if (world.isRemote)
    {
        return;
    }

    if (target instanceof EntityPlayer && ((EntityPlayer) target).getCooledAttackStrength(0.0F) < 1)
    {
        return;
    }

    Vec3d vec3d = target.getLook(1.0F);

    double d1 = 4.0D;
    double d2 = vec3d.xCoord * d1;
    double d3 = vec3d.yCoord * d1;
    double d4 = vec3d.zCoord * d1;

    world.playEvent((EntityPlayer) null, 1016, new BlockPos(target), 0);

    EntitySmallFireball fireball = new EntitySmallFireball(world, target, d2, d3, d4);

    fireball.posX = target.posX;
    fireball.posY = target.posY + target.height * 0.9;
    fireball.posZ = target.posZ;

    world.spawnEntityInWorld(fireball);

    if (target instanceof EntityPlayer)
    {
        ((EntityPlayer) target).resetCooldown();
    }
}
项目:Fyrestone    文件:SwordEffectFireball.java   
@Override
public void ApplyEffect(ItemStack stack, EntityPlayer player)
{
    if(!player.worldObj.isRemote)
    {
        EntitySmallFireball entitysmallfireball = new EntitySmallFireball(player.worldObj, player.posX, player.posY, player.posZ, player.getLookVec().xCoord, player.getLookVec().yCoord, player.getLookVec().zCoord);
        entitysmallfireball.posY = player.posY + (double)(player.height / 2.0F) + 0.5D;
        entitysmallfireball.shootingEntity = player;
        player.worldObj.spawnEntityInWorld(entitysmallfireball);

        stack.damageItem(1, player);

        if (stack.stackSize < 1) player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
    }
}
项目:Coding    文件:EntityWildFireDragon.java   
/**
 * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
 */
protected void attackEntity(Entity p_70785_1_, float p_70785_2_) {
    if (this.attackTime <= 0 && p_70785_2_ < 2.0F && p_70785_1_.boundingBox.maxY > this.boundingBox.minY 
            && p_70785_1_.boundingBox.minY < this.boundingBox.maxY) {
        this.attackTime = 20;
        this.attackEntityAsMob(p_70785_1_);
    }
    else if (p_70785_2_ < 30.0F) {
        double d0 = p_70785_1_.posX - this.posX;
        double d1 = p_70785_1_.boundingBox.minY + (double)(p_70785_1_.height / 2.0F) - (this.posY + (double)(this.height / 2.0F));
        double d2 = p_70785_1_.posZ - this.posZ;
        if (this.attackTime == 0) {
            ++this.field_70846_g;
            if (this.field_70846_g == 1) {
                this.attackTime = 60;
                this.func_70844_e(true);
            }
            else if (this.field_70846_g <= 4) {
                this.attackTime = 6;
            }
            else {
                this.attackTime = 100;
                this.field_70846_g = 0;
                this.func_70844_e(false);
            }
            if (this.field_70846_g > 1) {
                float f1 = MathHelper.sqrt_float(p_70785_2_) * 0.5F;
                this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)this.posX, 
                        (int)this.posY, (int)this.posZ, 0);
                for (int i = 0; i < 1; ++i) {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.worldObj, this, d0 + this.rand.nextGaussian() * (double)f1, d1, d2 + this.rand.nextGaussian() * (double)f1);
                    entitysmallfireball.posY = this.posY + (double)(this.height / 2.0F) + 0.5D;
                    this.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }
        this.rotationYaw = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
        this.hasAttacked = true;
    }
}
项目:4Space-1.7    文件:EntityEvolvedBlaze.java   
@Override
protected void attackEntity(Entity par1Entity, float par2) {
    if (this.attackTime <= 0 && par2 < 2.0F && par1Entity.boundingBox.maxY > this.boundingBox.minY && par1Entity.boundingBox.minY < this.boundingBox.maxY) {
        this.attackTime = 20;
        this.attackEntityAsMob(par1Entity);
    } else if (par2 < 30.0F) {
        final double d0 = par1Entity.posX - this.posX;
        final double d1 = par1Entity.boundingBox.minY + par1Entity.height / 2.0F - (this.posY + this.height / 2.0F);
        final double d2 = par1Entity.posZ - this.posZ;

        if (this.attackTime == 0) {
            ++this.field_70846_g;

            if (this.field_70846_g == 1) {
                this.attackTime = 60;
                this.func_70844_e(true);
            } else if (this.field_70846_g <= 4) {
                this.attackTime = 6;
            } else {
                this.attackTime = 100;
                this.field_70846_g = 0;
                this.func_70844_e(false);
            }

            if (this.field_70846_g > 1) {
                final float f1 = MathHelper.sqrt_float(par2) * 0.5F;
                this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) this.posX, (int) this.posY, (int) this.posZ, 0);

                for (int i = 0; i < 1; ++i) {
                    final EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.worldObj, this, d0 + this.rand.nextGaussian() * f1, d1, d2 + this.rand.nextGaussian() * f1);
                    entitysmallfireball.posY = this.posY + this.height / 2.0F + 0.5D;
                    this.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.rotationYaw = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
        this.hasAttacked = true;
    }
}
项目:Magicians-Artifice    文件:EntityBossNether.java   
protected void attackEntity(Entity p_70785_1_, float p_70785_2_)
{
    double d0 = p_70785_1_.posX - this.posX;
    double d1 = p_70785_1_.boundingBox.minY + (double)(p_70785_1_.height / 2.0F) - (this.posY + (double)(this.height / 2.0F));
    double d2 = p_70785_1_.posZ - this.posZ;
    float f1 = MathHelper.sqrt_float(p_70785_2_) * 0.5F;

    if (rand.nextInt(100) <= 10) {
        for (int i = 0; i < 1; ++i) {
            EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.worldObj, this, d0 + this.rand.nextGaussian() * (double) f1, d1, d2 + this.rand.nextGaussian() * (double) f1);
            entitysmallfireball.posY = this.posY + (double) (this.height / 2.0F) + 0.5D;
            this.worldObj.spawnEntityInWorld(entitysmallfireball);
        }
    }
}
项目:GalacticraftPixelGalaxy    文件:PixeltrixFirerModeItem.java   
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
{
  if (!world.isRemote)
  {
    Vec3 v3 = player.getLook(1.0F);

    EntitySmallFireball smallfireball = new EntitySmallFireball(world, player.posX, player.posY + player.eyeHeight, player.posZ, v3.xCoord, v3.yCoord, v3.zCoord);

    smallfireball.shootingEntity = player;


    world.spawnEntityInWorld(smallfireball);
  }
  return itemStack;
}
项目:MagicalRings    文件:FireWrath.java   
@Override
public void onUse(World world, EntityPlayer player, IPlayerSession session, ItemStack stack, int boost, int cost) {
    if (session.hasEnoughMana(cost())) {
        Vec3 look = player.getLookVec();
        EntitySmallFireball fireBall = new EntitySmallFireball(world, player, 0, 0, 0);
        fireBall.setSprinting(true);
        fireBall.setPosition(player.posX + look.xCoord * 4.2, player.posY + look.yCoord + (player.getEyeHeight() / 2), player.posZ + look.zCoord * 4.2);
        fireBall.accelerationX = look.xCoord * 0.5;
        fireBall.accelerationY = look.yCoord * 0.5;
        fireBall.accelerationZ = look.zCoord * 0.5;
        if (!world.isRemote)
            world.spawnEntityInWorld(fireBall);
        session.adjustMana(-cost(), false);
    }
}
项目:RuneCraftery    文件:EntityBlaze.java   
protected void func_70785_a(Entity p_70785_1_, float p_70785_2_) {
   if(this.field_70724_aR <= 0 && p_70785_2_ < 2.0F && p_70785_1_.field_70121_D.field_72337_e > this.field_70121_D.field_72338_b && p_70785_1_.field_70121_D.field_72338_b < this.field_70121_D.field_72337_e) {
      this.field_70724_aR = 20;
      this.func_70652_k(p_70785_1_);
   } else if(p_70785_2_ < 30.0F) {
      double var3 = p_70785_1_.field_70165_t - this.field_70165_t;
      double var5 = p_70785_1_.field_70121_D.field_72338_b + (double)(p_70785_1_.field_70131_O / 2.0F) - (this.field_70163_u + (double)(this.field_70131_O / 2.0F));
      double var7 = p_70785_1_.field_70161_v - this.field_70161_v;
      if(this.field_70724_aR == 0) {
         ++this.field_70846_g;
         if(this.field_70846_g == 1) {
            this.field_70724_aR = 60;
            this.func_70844_e(true);
         } else if(this.field_70846_g <= 4) {
            this.field_70724_aR = 6;
         } else {
            this.field_70724_aR = 100;
            this.field_70846_g = 0;
            this.func_70844_e(false);
         }

         if(this.field_70846_g > 1) {
            float var9 = MathHelper.func_76129_c(p_70785_2_) * 0.5F;
            this.field_70170_p.func_72889_a((EntityPlayer)null, 1009, (int)this.field_70165_t, (int)this.field_70163_u, (int)this.field_70161_v, 0);

            for(int var10 = 0; var10 < 1; ++var10) {
               EntitySmallFireball var11 = new EntitySmallFireball(this.field_70170_p, this, var3 + this.field_70146_Z.nextGaussian() * (double)var9, var5, var7 + this.field_70146_Z.nextGaussian() * (double)var9);
               var11.field_70163_u = this.field_70163_u + (double)(this.field_70131_O / 2.0F) + 0.5D;
               this.field_70170_p.func_72838_d(var11);
            }
         }
      }

      this.field_70177_z = (float)(Math.atan2(var7, var3) * 180.0D / 3.1415927410125732D) - 90.0F;
      this.field_70787_b = true;
   }

}
项目:RuneCraftery    文件:DispenserBehaviorFireball.java   
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   IPosition var4 = BlockDispenser.func_82525_a(p_82487_1_);
   double var5 = var4.func_82615_a() + (double)((float)var3.func_82601_c() * 0.3F);
   double var7 = var4.func_82617_b() + (double)((float)var3.func_82601_c() * 0.3F);
   double var9 = var4.func_82616_c() + (double)((float)var3.func_82599_e() * 0.3F);
   World var11 = p_82487_1_.func_82618_k();
   Random var12 = var11.field_73012_v;
   double var13 = var12.nextGaussian() * 0.05D + (double)var3.func_82601_c();
   double var15 = var12.nextGaussian() * 0.05D + (double)var3.func_96559_d();
   double var17 = var12.nextGaussian() * 0.05D + (double)var3.func_82599_e();
   var11.func_72838_d(new EntitySmallFireball(var11, var5, var7, var9, var13, var15, var17));
   p_82487_2_.func_77979_a(1);
   return p_82487_2_;
}
项目:The-Derpy-Shiz-Mod    文件:FireSword.java   
@Override
public void specialAction(ItemStack stack, EntityPlayer player, boolean isClient) {
    if (isClient) {
        return;
    }
    int cost = player.dimension == -1 ? 1 : 3;
    if (!player.isWet()) {
        Vec3 vec = player.getLook(0.3f);
        EntitySmallFireball ball = new EntitySmallFireball(player.worldObj, player.posX, player.posY + player.eyeHeight, player.posZ, vec.xCoord, vec.yCoord, vec.zCoord);
        ball.shootingEntity = player;
        player.worldObj.spawnEntityInWorld(ball);
        player.worldObj.playSoundAtEntity(player, "mob.ghast.fireball", 1f, player.getRNG().nextFloat() * 0.1f + 0.9f);
        DerpyItems.damageItem(stack, cost, player);
    }
}
项目:IceAndShadow2    文件:NyxEventHandlerCold.java   
@SubscribeEvent
public void onFireball(EntityJoinWorldEvent e) {
    if (e.entity == null)
        return;

    if (e.entity.dimension == IaSFlags.dim_nyx_id) {
        if (e.entity instanceof EntitySmallFireball || e.entity instanceof EntityFireball
                || e.entity instanceof EntityLargeFireball) {
            e.setCanceled(true);
        }
        e.entity.extinguish();
    }
}
项目:Amitcraft    文件:EntityBehlmann.java   
@Override
public void attackEntityWithRangedAttack(EntityLiving entityliving, float f) {
    double var3 = entityliving.posX - this.posX;
    double var5 = entityliving.boundingBox.minY + entityliving.height / 2.0F - (this.posY + this.height / 2.0F);
    double var7 = entityliving.posZ - this.posZ;

    EntitySmallFireball var11 = new EntitySmallFireball(this.worldObj, this, var3 + this.rand.nextGaussian(), var5, var7 + this.rand.nextGaussian());
    var11.posY = this.posY + this.height / 2.0F + 0.5D;
    this.worldObj.spawnEntityInWorld(var11);

}
项目:DecompiledMinecraft    文件:EntityBlaze.java   
public void updateTask()
{
    --this.field_179468_c;
    EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();
    double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase);

    if (d0 < 4.0D)
    {
        if (this.field_179468_c <= 0)
        {
            this.field_179468_c = 20;
            this.blaze.attackEntityAsMob(entitylivingbase);
        }

        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }
    else if (d0 < 256.0D)
    {
        double d1 = entitylivingbase.posX - this.blaze.posX;
        double d2 = entitylivingbase.getEntityBoundingBox().minY + (double)(entitylivingbase.height / 2.0F) - (this.blaze.posY + (double)(this.blaze.height / 2.0F));
        double d3 = entitylivingbase.posZ - this.blaze.posZ;

        if (this.field_179468_c <= 0)
        {
            ++this.field_179467_b;

            if (this.field_179467_b == 1)
            {
                this.field_179468_c = 60;
                this.blaze.setOnFire(true);
            }
            else if (this.field_179467_b <= 4)
            {
                this.field_179468_c = 6;
            }
            else
            {
                this.field_179468_c = 100;
                this.field_179467_b = 0;
                this.blaze.setOnFire(false);
            }

            if (this.field_179467_b > 1)
            {
                float f = MathHelper.sqrt_float(MathHelper.sqrt_double(d0)) * 0.5F;
                this.blaze.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, new BlockPos((int)this.blaze.posX, (int)this.blaze.posY, (int)this.blaze.posZ), 0);

                for (int i = 0; i < 1; ++i)
                {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.blaze.worldObj, this.blaze, d1 + this.blaze.getRNG().nextGaussian() * (double)f, d2, d3 + this.blaze.getRNG().nextGaussian() * (double)f);
                    entitysmallfireball.posY = this.blaze.posY + (double)(this.blaze.height / 2.0F) + 0.5D;
                    this.blaze.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.blaze.getLookHelper().setLookPositionWithEntity(entitylivingbase, 10.0F, 10.0F);
    }
    else
    {
        this.blaze.getNavigator().clearPathEntity();
        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }

    super.updateTask();
}
项目:DecompiledMinecraft    文件:EntityBlaze.java   
public void updateTask()
{
    --this.field_179468_c;
    EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();
    double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase);

    if (d0 < 4.0D)
    {
        if (this.field_179468_c <= 0)
        {
            this.field_179468_c = 20;
            this.blaze.attackEntityAsMob(entitylivingbase);
        }

        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }
    else if (d0 < 256.0D)
    {
        double d1 = entitylivingbase.posX - this.blaze.posX;
        double d2 = entitylivingbase.getEntityBoundingBox().minY + (double)(entitylivingbase.height / 2.0F) - (this.blaze.posY + (double)(this.blaze.height / 2.0F));
        double d3 = entitylivingbase.posZ - this.blaze.posZ;

        if (this.field_179468_c <= 0)
        {
            ++this.field_179467_b;

            if (this.field_179467_b == 1)
            {
                this.field_179468_c = 60;
                this.blaze.setOnFire(true);
            }
            else if (this.field_179467_b <= 4)
            {
                this.field_179468_c = 6;
            }
            else
            {
                this.field_179468_c = 100;
                this.field_179467_b = 0;
                this.blaze.setOnFire(false);
            }

            if (this.field_179467_b > 1)
            {
                float f = MathHelper.sqrt_float(MathHelper.sqrt_double(d0)) * 0.5F;
                this.blaze.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, new BlockPos((int)this.blaze.posX, (int)this.blaze.posY, (int)this.blaze.posZ), 0);

                for (int i = 0; i < 1; ++i)
                {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.blaze.worldObj, this.blaze, d1 + this.blaze.getRNG().nextGaussian() * (double)f, d2, d3 + this.blaze.getRNG().nextGaussian() * (double)f);
                    entitysmallfireball.posY = this.blaze.posY + (double)(this.blaze.height / 2.0F) + 0.5D;
                    this.blaze.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.blaze.getLookHelper().setLookPositionWithEntity(entitylivingbase, 10.0F, 10.0F);
    }
    else
    {
        this.blaze.getNavigator().clearPathEntity();
        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }

    super.updateTask();
}
项目:DecompiledMinecraft    文件:RenderManager.java   
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn)
{
    this.renderEngine = renderEngineIn;
    this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this));
    this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this));
    this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F));
    this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F));
    this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F));
    this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F));
    this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F));
    this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F));
    this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this));
    this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this));
    this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this));
    this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this));
    this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this));
    this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this));
    this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this));
    this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this));
    this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this));
    this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this));
    this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F));
    this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this));
    this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F));
    this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this));
    this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F));
    this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this));
    this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this));
    this.entityRenderMap.put(EntityBat.class, new RenderBat(this));
    this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this));
    this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this));
    this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this));
    this.entityRenderMap.put(EntityWither.class, new RenderWither(this));
    this.entityRenderMap.put(Entity.class, new RenderEntity(this));
    this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this));
    this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn));
    this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this));
    this.entityRenderMap.put(EntityArrow.class, new RenderArrow(this));
    this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.snowball, itemRendererIn));
    this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ender_pearl, itemRendererIn));
    this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ender_eye, itemRendererIn));
    this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.egg, itemRendererIn));
    this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn));
    this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.experience_bottle, itemRendererIn));
    this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.fireworks, itemRendererIn));
    this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F));
    this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F));
    this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this));
    this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn));
    this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this));
    this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this));
    this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this));
    this.entityRenderMap.put(EntityArmorStand.class, new ArmorStandRenderer(this));
    this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this));
    this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this));
    this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this));
    this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this));
    this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this));
    this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F));
    this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this));
    this.playerRenderer = new RenderPlayer(this);
    this.skinMap.put("default", this.playerRenderer);
    this.skinMap.put("slim", new RenderPlayer(this, true));
}
项目:BaseClient    文件:EntityBlaze.java   
public void updateTask()
{
    --this.field_179468_c;
    EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();
    double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase);

    if (d0 < 4.0D)
    {
        if (this.field_179468_c <= 0)
        {
            this.field_179468_c = 20;
            this.blaze.attackEntityAsMob(entitylivingbase);
        }

        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }
    else if (d0 < 256.0D)
    {
        double d1 = entitylivingbase.posX - this.blaze.posX;
        double d2 = entitylivingbase.getEntityBoundingBox().minY + (double)(entitylivingbase.height / 2.0F) - (this.blaze.posY + (double)(this.blaze.height / 2.0F));
        double d3 = entitylivingbase.posZ - this.blaze.posZ;

        if (this.field_179468_c <= 0)
        {
            ++this.field_179467_b;

            if (this.field_179467_b == 1)
            {
                this.field_179468_c = 60;
                this.blaze.setOnFire(true);
            }
            else if (this.field_179467_b <= 4)
            {
                this.field_179468_c = 6;
            }
            else
            {
                this.field_179468_c = 100;
                this.field_179467_b = 0;
                this.blaze.setOnFire(false);
            }

            if (this.field_179467_b > 1)
            {
                float f = MathHelper.sqrt_float(MathHelper.sqrt_double(d0)) * 0.5F;
                this.blaze.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, new BlockPos((int)this.blaze.posX, (int)this.blaze.posY, (int)this.blaze.posZ), 0);

                for (int i = 0; i < 1; ++i)
                {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.blaze.worldObj, this.blaze, d1 + this.blaze.getRNG().nextGaussian() * (double)f, d2, d3 + this.blaze.getRNG().nextGaussian() * (double)f);
                    entitysmallfireball.posY = this.blaze.posY + (double)(this.blaze.height / 2.0F) + 0.5D;
                    this.blaze.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.blaze.getLookHelper().setLookPositionWithEntity(entitylivingbase, 10.0F, 10.0F);
    }
    else
    {
        this.blaze.getNavigator().clearPathEntity();
        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }

    super.updateTask();
}
项目:BaseClient    文件:RenderManager.java   
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn)
{
    this.renderEngine = renderEngineIn;
    this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this));
    this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this));
    this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F));
    this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F));
    this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F));
    this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F));
    this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F));
    this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F));
    this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this));
    this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this));
    this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this));
    this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this));
    this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this));
    this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this));
    this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this));
    this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this));
    this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this));
    this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this));
    this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F));
    this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this));
    this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F));
    this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this));
    this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F));
    this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this));
    this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this));
    this.entityRenderMap.put(EntityBat.class, new RenderBat(this));
    this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this));
    this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this));
    this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this));
    this.entityRenderMap.put(EntityWither.class, new RenderWither(this));
    this.entityRenderMap.put(Entity.class, new RenderEntity(this));
    this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this));
    this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn));
    this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this));
    this.entityRenderMap.put(EntityArrow.class, new RenderArrow(this));
    this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.snowball, itemRendererIn));
    this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ender_pearl, itemRendererIn));
    this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ender_eye, itemRendererIn));
    this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.egg, itemRendererIn));
    this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn));
    this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.experience_bottle, itemRendererIn));
    this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.fireworks, itemRendererIn));
    this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F));
    this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F));
    this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this));
    this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn));
    this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this));
    this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this));
    this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this));
    this.entityRenderMap.put(EntityArmorStand.class, new ArmorStandRenderer(this));
    this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this));
    this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this));
    this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this));
    this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this));
    this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this));
    this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F));
    this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this));
    this.playerRenderer = new RenderPlayer(this);
    this.skinMap.put("default", this.playerRenderer);
    this.skinMap.put("slim", new RenderPlayer(this, true));
    PlayerItemsLayer.register(this.skinMap);

    if (Reflector.RenderingRegistry_loadEntityRenderers.exists())
    {
        Reflector.call(Reflector.RenderingRegistry_loadEntityRenderers, new Object[] {this.entityRenderMap});
    }
}
项目:BaseClient    文件:EntityBlaze.java   
public void updateTask()
{
    --this.field_179468_c;
    EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();
    double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase);

    if (d0 < 4.0D)
    {
        if (this.field_179468_c <= 0)
        {
            this.field_179468_c = 20;
            this.blaze.attackEntityAsMob(entitylivingbase);
        }

        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }
    else if (d0 < 256.0D)
    {
        double d1 = entitylivingbase.posX - this.blaze.posX;
        double d2 = entitylivingbase.getEntityBoundingBox().minY + (double)(entitylivingbase.height / 2.0F) - (this.blaze.posY + (double)(this.blaze.height / 2.0F));
        double d3 = entitylivingbase.posZ - this.blaze.posZ;

        if (this.field_179468_c <= 0)
        {
            ++this.field_179467_b;

            if (this.field_179467_b == 1)
            {
                this.field_179468_c = 60;
                this.blaze.setOnFire(true);
            }
            else if (this.field_179467_b <= 4)
            {
                this.field_179468_c = 6;
            }
            else
            {
                this.field_179468_c = 100;
                this.field_179467_b = 0;
                this.blaze.setOnFire(false);
            }

            if (this.field_179467_b > 1)
            {
                float f = MathHelper.sqrt_float(MathHelper.sqrt_double(d0)) * 0.5F;
                this.blaze.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, new BlockPos((int)this.blaze.posX, (int)this.blaze.posY, (int)this.blaze.posZ), 0);

                for (int i = 0; i < 1; ++i)
                {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.blaze.worldObj, this.blaze, d1 + this.blaze.getRNG().nextGaussian() * (double)f, d2, d3 + this.blaze.getRNG().nextGaussian() * (double)f);
                    entitysmallfireball.posY = this.blaze.posY + (double)(this.blaze.height / 2.0F) + 0.5D;
                    this.blaze.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.blaze.getLookHelper().setLookPositionWithEntity(entitylivingbase, 10.0F, 10.0F);
    }
    else
    {
        this.blaze.getNavigator().clearPathEntity();
        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }

    super.updateTask();
}
项目:BaseClient    文件:RenderManager.java   
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn)
{
    this.renderEngine = renderEngineIn;
    this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this));
    this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this));
    this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F));
    this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F));
    this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F));
    this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F));
    this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F));
    this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F));
    this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this));
    this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this));
    this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this));
    this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this));
    this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this));
    this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this));
    this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this));
    this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this));
    this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this));
    this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this));
    this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F));
    this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this));
    this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F));
    this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this));
    this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F));
    this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this));
    this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this));
    this.entityRenderMap.put(EntityBat.class, new RenderBat(this));
    this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this));
    this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this));
    this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this));
    this.entityRenderMap.put(EntityWither.class, new RenderWither(this));
    this.entityRenderMap.put(Entity.class, new RenderEntity(this));
    this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this));
    this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn));
    this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this));
    this.entityRenderMap.put(EntityArrow.class, new RenderArrow(this));
    this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.snowball, itemRendererIn));
    this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ender_pearl, itemRendererIn));
    this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ender_eye, itemRendererIn));
    this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.egg, itemRendererIn));
    this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn));
    this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.experience_bottle, itemRendererIn));
    this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.fireworks, itemRendererIn));
    this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F));
    this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F));
    this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this));
    this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn));
    this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this));
    this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this));
    this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this));
    this.entityRenderMap.put(EntityArmorStand.class, new ArmorStandRenderer(this));
    this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this));
    this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this));
    this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this));
    this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this));
    this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this));
    this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F));
    this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this));
    this.playerRenderer = new RenderPlayer(this);
    this.skinMap.put("default", this.playerRenderer);
    this.skinMap.put("slim", new RenderPlayer(this, true));
}
项目:Backmemed    文件:EntityBlaze.java   
public void updateTask()
{
    --this.attackTime;
    EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();
    double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase);

    if (d0 < 4.0D)
    {
        if (this.attackTime <= 0)
        {
            this.attackTime = 20;
            this.blaze.attackEntityAsMob(entitylivingbase);
        }

        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }
    else if (d0 < this.func_191523_f() * this.func_191523_f())
    {
        double d1 = entitylivingbase.posX - this.blaze.posX;
        double d2 = entitylivingbase.getEntityBoundingBox().minY + (double)(entitylivingbase.height / 2.0F) - (this.blaze.posY + (double)(this.blaze.height / 2.0F));
        double d3 = entitylivingbase.posZ - this.blaze.posZ;

        if (this.attackTime <= 0)
        {
            ++this.attackStep;

            if (this.attackStep == 1)
            {
                this.attackTime = 60;
                this.blaze.setOnFire(true);
            }
            else if (this.attackStep <= 4)
            {
                this.attackTime = 6;
            }
            else
            {
                this.attackTime = 100;
                this.attackStep = 0;
                this.blaze.setOnFire(false);
            }

            if (this.attackStep > 1)
            {
                float f = MathHelper.sqrt(MathHelper.sqrt(d0)) * 0.5F;
                this.blaze.world.playEvent((EntityPlayer)null, 1018, new BlockPos((int)this.blaze.posX, (int)this.blaze.posY, (int)this.blaze.posZ), 0);

                for (int i = 0; i < 1; ++i)
                {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.blaze.world, this.blaze, d1 + this.blaze.getRNG().nextGaussian() * (double)f, d2, d3 + this.blaze.getRNG().nextGaussian() * (double)f);
                    entitysmallfireball.posY = this.blaze.posY + (double)(this.blaze.height / 2.0F) + 0.5D;
                    this.blaze.world.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.blaze.getLookHelper().setLookPositionWithEntity(entitylivingbase, 10.0F, 10.0F);
    }
    else
    {
        this.blaze.getNavigator().clearPathEntity();
        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }

    super.updateTask();
}
项目:CustomWorldGen    文件:EntityBlaze.java   
/**
 * Updates the task
 */
public void updateTask()
{
    --this.attackTime;
    EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();
    double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase);

    if (d0 < 4.0D)
    {
        if (this.attackTime <= 0)
        {
            this.attackTime = 20;
            this.blaze.attackEntityAsMob(entitylivingbase);
        }

        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }
    else if (d0 < 256.0D)
    {
        double d1 = entitylivingbase.posX - this.blaze.posX;
        double d2 = entitylivingbase.getEntityBoundingBox().minY + (double)(entitylivingbase.height / 2.0F) - (this.blaze.posY + (double)(this.blaze.height / 2.0F));
        double d3 = entitylivingbase.posZ - this.blaze.posZ;

        if (this.attackTime <= 0)
        {
            ++this.attackStep;

            if (this.attackStep == 1)
            {
                this.attackTime = 60;
                this.blaze.setOnFire(true);
            }
            else if (this.attackStep <= 4)
            {
                this.attackTime = 6;
            }
            else
            {
                this.attackTime = 100;
                this.attackStep = 0;
                this.blaze.setOnFire(false);
            }

            if (this.attackStep > 1)
            {
                float f = MathHelper.sqrt_float(MathHelper.sqrt_double(d0)) * 0.5F;
                this.blaze.worldObj.playEvent((EntityPlayer)null, 1018, new BlockPos((int)this.blaze.posX, (int)this.blaze.posY, (int)this.blaze.posZ), 0);

                for (int i = 0; i < 1; ++i)
                {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.blaze.worldObj, this.blaze, d1 + this.blaze.getRNG().nextGaussian() * (double)f, d2, d3 + this.blaze.getRNG().nextGaussian() * (double)f);
                    entitysmallfireball.posY = this.blaze.posY + (double)(this.blaze.height / 2.0F) + 0.5D;
                    this.blaze.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.blaze.getLookHelper().setLookPositionWithEntity(entitylivingbase, 10.0F, 10.0F);
    }
    else
    {
        this.blaze.getNavigator().clearPathEntity();
        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }

    super.updateTask();
}
项目:CustomWorldGen    文件:RenderManager.java   
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn)
{
    this.renderEngine = renderEngineIn;
    this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this));
    this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this));
    this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F));
    this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F));
    this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F));
    this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F));
    this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F));
    this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F));
    this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this));
    this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this));
    this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this));
    this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this));
    this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this));
    this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this));
    this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this));
    this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this));
    this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this));
    this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this));
    this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F));
    this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this));
    this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F));
    this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this));
    this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F));
    this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this));
    this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this));
    this.entityRenderMap.put(EntityBat.class, new RenderBat(this));
    this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this));
    this.entityRenderMap.put(EntityShulker.class, new RenderShulker(this, new ModelShulker()));
    this.entityRenderMap.put(EntityPolarBear.class, new RenderPolarBear(this, new ModelPolarBear(), 0.7F));
    this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this));
    this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this));
    this.entityRenderMap.put(EntityWither.class, new RenderWither(this));
    this.entityRenderMap.put(Entity.class, new RenderEntity(this));
    this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this));
    this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn));
    this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this));
    this.entityRenderMap.put(EntityTippedArrow.class, new RenderTippedArrow(this));
    this.entityRenderMap.put(EntitySpectralArrow.class, new RenderSpectralArrow(this));
    this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.SNOWBALL, itemRendererIn));
    this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ENDER_PEARL, itemRendererIn));
    this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ENDER_EYE, itemRendererIn));
    this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.EGG, itemRendererIn));
    this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn));
    this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.EXPERIENCE_BOTTLE, itemRendererIn));
    this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.FIREWORKS, itemRendererIn));
    this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F));
    this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F));
    this.entityRenderMap.put(EntityDragonFireball.class, new RenderDragonFireball(this));
    this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this));
    this.entityRenderMap.put(EntityShulkerBullet.class, new RenderShulkerBullet(this));
    this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn));
    this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this));
    this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this));
    this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this));
    this.entityRenderMap.put(EntityArmorStand.class, new RenderArmorStand(this));
    this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this));
    this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this));
    this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this));
    this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this));
    this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this));
    this.entityRenderMap.put(EntityAreaEffectCloud.class, new RenderAreaEffectCloud(this));
    this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F));
    this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this));
    this.playerRenderer = new RenderPlayer(this);
    this.skinMap.put("default", this.playerRenderer);
    this.skinMap.put("slim", new RenderPlayer(this, true));
    net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.entityRenderMap);
}
项目:CustomWorldGen    文件:DataFixesManager.java   
public static DataFixer createFixer()
{
    DataFixer datafixer = new DataFixer(512);
    WorldInfo.registerFixes(datafixer);
    EntityPlayer.registerFixesPlayer(datafixer);
    AnvilChunkLoader.registerFixes(datafixer);
    ItemStack.registerFixes(datafixer);
    EntityArmorStand.registerFixesArmorStand(datafixer);
    EntityArrow.registerFixesArrow(datafixer);
    EntityBat.registerFixesBat(datafixer);
    EntityBlaze.registerFixesBlaze(datafixer);
    EntityCaveSpider.registerFixesCaveSpider(datafixer);
    EntityChicken.registerFixesChicken(datafixer);
    EntityCow.registerFixesCow(datafixer);
    EntityCreeper.registerFixesCreeper(datafixer);
    EntityDragonFireball.registerFixesDragonFireball(datafixer);
    EntityDragon.registerFixesDragon(datafixer);
    EntityEnderman.registerFixesEnderman(datafixer);
    EntityEndermite.registerFixesEndermite(datafixer);
    EntityFallingBlock.registerFixesFallingBlock(datafixer);
    EntityLargeFireball.registerFixesLargeFireball(datafixer);
    EntityFireworkRocket.registerFixesFireworkRocket(datafixer);
    EntityGhast.registerFixesGhast(datafixer);
    EntityGiantZombie.registerFixesGiantZombie(datafixer);
    EntityGuardian.registerFixesGuardian(datafixer);
    EntityHorse.registerFixesHorse(datafixer);
    EntityItem.registerFixesItem(datafixer);
    EntityItemFrame.registerFixesItemFrame(datafixer);
    EntityMagmaCube.registerFixesMagmaCube(datafixer);
    EntityMinecartChest.registerFixesMinecartChest(datafixer);
    EntityMinecartCommandBlock.registerFixesMinecartCommand(datafixer);
    EntityMinecartFurnace.registerFixesMinecartFurnace(datafixer);
    EntityMinecartHopper.registerFixesMinecartHopper(datafixer);
    EntityMinecartEmpty.registerFixesMinecartEmpty(datafixer);
    EntityMinecartMobSpawner.registerFixesMinecartMobSpawner(datafixer);
    EntityMinecartTNT.registerFixesMinecartTNT(datafixer);
    EntityLiving.registerFixesMob(datafixer);
    EntityMob.registerFixesMonster(datafixer);
    EntityMooshroom.registerFixesMooshroom(datafixer);
    EntityOcelot.registerFixesOcelot(datafixer);
    EntityPig.registerFixesPig(datafixer);
    EntityPigZombie.registerFixesPigZombie(datafixer);
    EntityRabbit.registerFixesRabbit(datafixer);
    EntitySheep.registerFixesSheep(datafixer);
    EntityShulker.registerFixesShulker(datafixer);
    EntitySilverfish.registerFixesSilverfish(datafixer);
    EntitySkeleton.registerFixesSkeleton(datafixer);
    EntitySlime.registerFixesSlime(datafixer);
    EntitySmallFireball.registerFixesSmallFireball(datafixer);
    EntitySnowman.registerFixesSnowman(datafixer);
    EntitySnowball.registerFixesSnowball(datafixer);
    EntitySpectralArrow.registerFixesSpectralArrow(datafixer);
    EntitySpider.registerFixesSpider(datafixer);
    EntitySquid.registerFixesSquid(datafixer);
    EntityEgg.registerFixesEgg(datafixer);
    EntityEnderPearl.registerFixesEnderPearl(datafixer);
    EntityExpBottle.registerFixesExpBottle(datafixer);
    EntityPotion.registerFixesPotion(datafixer);
    EntityTippedArrow.registerFixesTippedArrow(datafixer);
    EntityVillager.registerFixesVillager(datafixer);
    EntityIronGolem.registerFixesIronGolem(datafixer);
    EntityWitch.registerFixesWitch(datafixer);
    EntityWither.registerFixesWither(datafixer);
    EntityWitherSkull.registerFixesWitherSkull(datafixer);
    EntityWolf.registerFixesWolf(datafixer);
    EntityZombie.registerFixesZombie(datafixer);
    TileEntityPiston.registerFixesPiston(datafixer);
    TileEntityFlowerPot.registerFixesFlowerPot(datafixer);
    TileEntityFurnace.registerFixesFurnace(datafixer);
    TileEntityChest.registerFixesChest(datafixer);
    TileEntityDispenser.registerFixes(datafixer);
    TileEntityDropper.registerFixesDropper(datafixer);
    TileEntityBrewingStand.registerFixesBrewingStand(datafixer);
    TileEntityHopper.registerFixesHopper(datafixer);
    BlockJukebox.registerFixesJukebox(datafixer);
    TileEntityMobSpawner.registerFixesMobSpawner(datafixer);
    registerFixes(datafixer);
    return datafixer;
}
项目:MidgarCrusade    文件:EntityArkavon.java   
public void update_battle(EntityPlayer p, int id)
  {
    long timer;

timer = System.currentTimeMillis() % 34000;

    if (timer < 40)
    {
    p.addPotionEffect(new PotionEffect(Potion.poison.id, 400, 10));
    p.addPotionEffect(new PotionEffect(Potion.confusion.id, 400, 10));
    p.addPotionEffect(new PotionEffect(Potion.wither.id, 400, 10));
    }
    else if (timer > 4000 && timer < 4040)
    {
        EntityMonsterZombie zombie;

        zombie = new EntityMonsterZombie(this.worldObj);
        zombie.setLocationAndAngles(this.posX + 1, this.posY + 2, this.posZ, 0, 0);
        this.worldObj.spawnEntityInWorld(zombie);
        p.addChatComponentMessage(new ChatComponentText("Say hello to my friends...")); 
    }
    else if (timer > 12000 && timer < 18000)
    {
        if (p.posY - this.posY < 6)
            p.motionY += 0.1f;
        p.attackEntityFrom(DamageSource.magic, 0.05f);
    }
    else if (timer > 24000 && timer < 26400 && timer % 1000 < 100)
    {
    this.worldObj.createExplosion(this, p.posX, p.posY - 1, p.posZ, 1, true);
    }
    else if (timer > 30000 && timer < 30100)
    {

          this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)this.posX, (int)this.posY, (int)this.posZ, 0);
          for (int i = 0; i < 4; ++i)
          {
              EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.worldObj, this, this.getLookVec().xCoord, this.getLookVec().yCoord, this.getLookVec().zCoord);
              entitysmallfireball.posY = this.posY + (double)(this.height / 2.0F) + 0.5D;
              this.worldObj.spawnEntityInWorld(entitysmallfireball);
          }
    }
  }
项目:Resilience-Client-Source    文件:EntityBlaze.java   
/**
 * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
 */
protected void attackEntity(Entity par1Entity, float par2)
{
    if (this.attackTime <= 0 && par2 < 2.0F && par1Entity.boundingBox.maxY > this.boundingBox.minY && par1Entity.boundingBox.minY < this.boundingBox.maxY)
    {
        this.attackTime = 20;
        this.attackEntityAsMob(par1Entity);
    }
    else if (par2 < 30.0F)
    {
        double var3 = par1Entity.posX - this.posX;
        double var5 = par1Entity.boundingBox.minY + (double)(par1Entity.height / 2.0F) - (this.posY + (double)(this.height / 2.0F));
        double var7 = par1Entity.posZ - this.posZ;

        if (this.attackTime == 0)
        {
            ++this.field_70846_g;

            if (this.field_70846_g == 1)
            {
                this.attackTime = 60;
                this.func_70844_e(true);
            }
            else if (this.field_70846_g <= 4)
            {
                this.attackTime = 6;
            }
            else
            {
                this.attackTime = 100;
                this.field_70846_g = 0;
                this.func_70844_e(false);
            }

            if (this.field_70846_g > 1)
            {
                float var9 = MathHelper.sqrt_float(par2) * 0.5F;
                this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)this.posX, (int)this.posY, (int)this.posZ, 0);

                for (int var10 = 0; var10 < 1; ++var10)
                {
                    EntitySmallFireball var11 = new EntitySmallFireball(this.worldObj, this, var3 + this.rand.nextGaussian() * (double)var9, var5, var7 + this.rand.nextGaussian() * (double)var9);
                    var11.posY = this.posY + (double)(this.height / 2.0F) + 0.5D;
                    this.worldObj.spawnEntityInWorld(var11);
                }
            }
        }

        this.rotationYaw = (float)(Math.atan2(var7, var3) * 180.0D / Math.PI) - 90.0F;
        this.hasAttacked = true;
    }
}
项目:Resilience-Client-Source    文件:RenderManager.java   
private RenderManager()
{
    this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider());
    this.entityRenderMap.put(EntitySpider.class, new RenderSpider());
    this.entityRenderMap.put(EntityPig.class, new RenderPig(new ModelPig(), new ModelPig(0.5F), 0.7F));
    this.entityRenderMap.put(EntitySheep.class, new RenderSheep(new ModelSheep2(), new ModelSheep1(), 0.7F));
    this.entityRenderMap.put(EntityCow.class, new RenderCow(new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityWolf.class, new RenderWolf(new ModelWolf(), new ModelWolf(), 0.5F));
    this.entityRenderMap.put(EntityChicken.class, new RenderChicken(new ModelChicken(), 0.3F));
    this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(new ModelOcelot(), 0.4F));
    this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish());
    this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper());
    this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman());
    this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan());
    this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton());
    this.entityRenderMap.put(EntityWitch.class, new RenderWitch());
    this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze());
    this.entityRenderMap.put(EntityZombie.class, new RenderZombie());
    this.entityRenderMap.put(EntitySlime.class, new RenderSlime(new ModelSlime(16), new ModelSlime(0), 0.25F));
    this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube());
    this.entityRenderMap.put(EntityPlayer.class, new RenderPlayer());
    this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(new ModelZombie(), 0.5F, 6.0F));
    this.entityRenderMap.put(EntityGhast.class, new RenderGhast());
    this.entityRenderMap.put(EntitySquid.class, new RenderSquid(new ModelSquid(), 0.7F));
    this.entityRenderMap.put(EntityVillager.class, new RenderVillager());
    this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem());
    this.entityRenderMap.put(EntityBat.class, new RenderBat());
    this.entityRenderMap.put(EntityDragon.class, new RenderDragon());
    this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal());
    this.entityRenderMap.put(EntityWither.class, new RenderWither());
    this.entityRenderMap.put(Entity.class, new RenderEntity());
    this.entityRenderMap.put(EntityPainting.class, new RenderPainting());
    this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame());
    this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot());
    this.entityRenderMap.put(EntityArrow.class, new RenderArrow());
    this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(Items.snowball));
    this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(Items.ender_pearl));
    this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(Items.ender_eye));
    this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(Items.egg));
    this.entityRenderMap.put(EntityPotion.class, new RenderSnowball(Items.potionitem, 16384));
    this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(Items.experience_bottle));
    this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(Items.fireworks));
    this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(2.0F));
    this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(0.5F));
    this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull());
    this.entityRenderMap.put(EntityItem.class, new RenderItem());
    this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb());
    this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed());
    this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock());
    this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart());
    this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner());
    this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart());
    this.entityRenderMap.put(EntityBoat.class, new RenderBoat());
    this.entityRenderMap.put(EntityFishHook.class, new RenderFish());
    this.entityRenderMap.put(EntityHorse.class, new RenderHorse(new ModelHorse(), 0.75F));
    this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt());
    Iterator var1 = this.entityRenderMap.values().iterator();

    while (var1.hasNext())
    {
        Render var2 = (Render)var1.next();
        var2.setRenderManager(this);
    }
}
项目:ExpandedRailsMod    文件:EntityBlaze.java   
/**
 * Updates the task
 */
public void updateTask()
{
    --this.attackTime;
    EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();
    double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase);

    if (d0 < 4.0D)
    {
        if (this.attackTime <= 0)
        {
            this.attackTime = 20;
            this.blaze.attackEntityAsMob(entitylivingbase);
        }

        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }
    else if (d0 < 256.0D)
    {
        double d1 = entitylivingbase.posX - this.blaze.posX;
        double d2 = entitylivingbase.getEntityBoundingBox().minY + (double)(entitylivingbase.height / 2.0F) - (this.blaze.posY + (double)(this.blaze.height / 2.0F));
        double d3 = entitylivingbase.posZ - this.blaze.posZ;

        if (this.attackTime <= 0)
        {
            ++this.attackStep;

            if (this.attackStep == 1)
            {
                this.attackTime = 60;
                this.blaze.setOnFire(true);
            }
            else if (this.attackStep <= 4)
            {
                this.attackTime = 6;
            }
            else
            {
                this.attackTime = 100;
                this.attackStep = 0;
                this.blaze.setOnFire(false);
            }

            if (this.attackStep > 1)
            {
                float f = MathHelper.sqrt_float(MathHelper.sqrt_double(d0)) * 0.5F;
                this.blaze.worldObj.playEvent((EntityPlayer)null, 1018, new BlockPos((int)this.blaze.posX, (int)this.blaze.posY, (int)this.blaze.posZ), 0);

                for (int i = 0; i < 1; ++i)
                {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.blaze.worldObj, this.blaze, d1 + this.blaze.getRNG().nextGaussian() * (double)f, d2, d3 + this.blaze.getRNG().nextGaussian() * (double)f);
                    entitysmallfireball.posY = this.blaze.posY + (double)(this.blaze.height / 2.0F) + 0.5D;
                    this.blaze.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.blaze.getLookHelper().setLookPositionWithEntity(entitylivingbase, 10.0F, 10.0F);
    }
    else
    {
        this.blaze.getNavigator().clearPathEntity();
        this.blaze.getMoveHelper().setMoveTo(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, 1.0D);
    }

    super.updateTask();
}
项目:ExpandedRailsMod    文件:RenderManager.java   
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn)
{
    this.renderEngine = renderEngineIn;
    this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this));
    this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this));
    this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F));
    this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F));
    this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F));
    this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F));
    this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F));
    this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F));
    this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this));
    this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this));
    this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this));
    this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this));
    this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this));
    this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this));
    this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this));
    this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this));
    this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this));
    this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this));
    this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F));
    this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this));
    this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F));
    this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this));
    this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F));
    this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this));
    this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this));
    this.entityRenderMap.put(EntityBat.class, new RenderBat(this));
    this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this));
    this.entityRenderMap.put(EntityShulker.class, new RenderShulker(this, new ModelShulker()));
    this.entityRenderMap.put(EntityPolarBear.class, new RenderPolarBear(this, new ModelPolarBear(), 0.7F));
    this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this));
    this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this));
    this.entityRenderMap.put(EntityWither.class, new RenderWither(this));
    this.entityRenderMap.put(Entity.class, new RenderEntity(this));
    this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this));
    this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn));
    this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this));
    this.entityRenderMap.put(EntityTippedArrow.class, new RenderTippedArrow(this));
    this.entityRenderMap.put(EntitySpectralArrow.class, new RenderSpectralArrow(this));
    this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.SNOWBALL, itemRendererIn));
    this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ENDER_PEARL, itemRendererIn));
    this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ENDER_EYE, itemRendererIn));
    this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.EGG, itemRendererIn));
    this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn));
    this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.EXPERIENCE_BOTTLE, itemRendererIn));
    this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.FIREWORKS, itemRendererIn));
    this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F));
    this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F));
    this.entityRenderMap.put(EntityDragonFireball.class, new RenderDragonFireball(this));
    this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this));
    this.entityRenderMap.put(EntityShulkerBullet.class, new RenderShulkerBullet(this));
    this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn));
    this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this));
    this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this));
    this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this));
    this.entityRenderMap.put(EntityArmorStand.class, new RenderArmorStand(this));
    this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this));
    this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this));
    this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this));
    this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this));
    this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this));
    this.entityRenderMap.put(EntityAreaEffectCloud.class, new RenderAreaEffectCloud(this));
    this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F));
    this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this));
    this.playerRenderer = new RenderPlayer(this);
    this.skinMap.put("default", this.playerRenderer);
    this.skinMap.put("slim", new RenderPlayer(this, true));
    net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.entityRenderMap);
}
项目:Corundum    文件:SmallFireball.java   
public SmallFireball() {
    super(new EntitySmallFireball(null));
}
项目:Corundum    文件:SmallFireball.java   
public SmallFireball(EntitySmallFireball entityMC) {
    super(entityMC);
}
项目:Cauldron    文件:EntityBlaze.java   
protected void attackEntity(Entity p_70785_1_, float p_70785_2_)
{
    if (this.attackTime <= 0 && p_70785_2_ < 2.0F && p_70785_1_.boundingBox.maxY > this.boundingBox.minY && p_70785_1_.boundingBox.minY < this.boundingBox.maxY)
    {
        this.attackTime = 20;
        this.attackEntityAsMob(p_70785_1_);
    }
    else if (p_70785_2_ < 30.0F)
    {
        double d0 = p_70785_1_.posX - this.posX;
        double d1 = p_70785_1_.boundingBox.minY + (double)(p_70785_1_.height / 2.0F) - (this.posY + (double)(this.height / 2.0F));
        double d2 = p_70785_1_.posZ - this.posZ;

        if (this.attackTime == 0)
        {
            ++this.field_70846_g;

            if (this.field_70846_g == 1)
            {
                this.attackTime = 60;
                this.func_70844_e(true);
            }
            else if (this.field_70846_g <= 4)
            {
                this.attackTime = 6;
            }
            else
            {
                this.attackTime = 100;
                this.field_70846_g = 0;
                this.func_70844_e(false);
            }

            if (this.field_70846_g > 1)
            {
                float f1 = MathHelper.sqrt_float(p_70785_2_) * 0.5F;
                this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)this.posX, (int)this.posY, (int)this.posZ, 0);

                for (int i = 0; i < 1; ++i)
                {
                    EntitySmallFireball entitysmallfireball = new EntitySmallFireball(this.worldObj, this, d0 + this.rand.nextGaussian() * (double)f1, d1, d2 + this.rand.nextGaussian() * (double)f1);
                    entitysmallfireball.posY = this.posY + (double)(this.height / 2.0F) + 0.5D;
                    this.worldObj.spawnEntityInWorld(entitysmallfireball);
                }
            }
        }

        this.rotationYaw = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
        this.hasAttacked = true;
    }
}