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

项目:MidgarCrusade    文件:ServerSpellHandler.java   
public static void handle_auroblast(World world, EntityPlayerMP sender)
{
    float a;
    float b;
    float c;

    a = (float) sender.getLookVec().xCoord;
    b = (float) sender.getLookVec().yCoord;
    c = (float) sender.getLookVec().zCoord;
    EntityFireball fireball = new EntityLargeFireball(world, sender.posX + a, sender.posY + b, sender.posZ + c, a, b, c);
    fireball.posY = sender.posY + (double)(sender.height / 2.0F) + 0.5D;
    world.spawnEntityInWorld(fireball);
    fireball.setVelocity(fireball.motionX * 1.5f, fireball.motionY, fireball.motionZ * 1.5f);
    EntityFireball fireball2 = new EntityLargeFireball(world, sender.posX + a + 4, sender.posY + b, sender.posZ + c, a, b, c);
    fireball.posY = sender.posY + (double)(sender.height / 2.0F) + 0.5D;
    world.spawnEntityInWorld(fireball2);
    fireball.setVelocity(fireball.motionX * 1.5f, fireball.motionY, fireball.motionZ * 1.5f);
    EntityFireball fireball3 = new EntityLargeFireball(world, sender.posX - a - 4, sender.posY + b, sender.posZ + c, a, b, c);
    fireball.posY = sender.posY + (double)(sender.height / 2.0F) + 0.5D;
    world.spawnEntityInWorld(fireball3);
    fireball.setVelocity(fireball.motionX * 1.5f, fireball.motionY, fireball.motionZ * 1.5f);
}
项目:Aether-Legacy    文件:AbilityRepulsion.java   
private void setShooter(Entity ent, EntityLivingBase shooter) 
{
    if (ent instanceof EntityArrow)
    {
        ((EntityArrow)ent).shootingEntity = shooter;
    }
    else if (ent instanceof EntityFireball)
    {
        ((EntityFireball)ent).shootingEntity = shooter;
    }
    else if (ent instanceof EntityFireball)
    {
        ((EntityFireball)ent).shootingEntity = shooter;
    }
    else if (ent instanceof EntityDartBase)
    {
        ((EntityDartBase)ent).shootingEntity = shooter;
    }
}
项目:projectzulu1.7.10-pre-1.3a    文件:EntityMummyPharaoh.java   
private void shootFireballAtTarget() {
    EntityPlayer targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(this, 32.0D);
    if (targetedEntity != null) {
        int holdRand = rand.nextInt(10) - 5;
        double sourcePositionX = this.posX + holdRand;
        double sourcePositionY = this.posY + 20;
        holdRand = rand.nextInt(10) - 5;
        double sourcePositionZ = this.posZ + holdRand;

        double var11 = targetedEntity.posX - sourcePositionX;
        double var13 = targetedEntity.boundingBox.minY + targetedEntity.height / 2.0F
                - (sourcePositionY + this.height / 2.0F);
        double var15 = targetedEntity.posZ - sourcePositionZ;
        this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(var11, var15)) * 180.0F / (float) Math.PI;

        this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) this.posX, (int) this.posY,
                (int) this.posZ, 0);
        EntityFireball var17 = new EntityLargeFireball(this.worldObj, this, var11, var13, var15);
        double var18 = 1.0D;
        Vec3 var20 = this.getLook(1.0F);
        var17.posX = sourcePositionX + var20.xCoord * var18;
        var17.posY = sourcePositionY + this.height / 2.0F + 0.5D;
        var17.posZ = sourcePositionZ + var20.zCoord * var18;
        this.worldObj.spawnEntityInWorld(var17);
    }
}
项目:ZeldaSwordSkills    文件:ItemZeldaShield.java   
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
    if (toolMaterial == ToolMaterial.EMERALD) {
        if (player.getHeldItem() != null && ZSSPlayerInfo.get(player).canBlock()) {
            Vec3 vec3 = player.getLookVec();
            double dx = player.posX + vec3.xCoord * 2.0D;
            double dy = player.posY + player.getEyeHeight() + vec3.yCoord * 2.0D;
            double dz = player.posZ + vec3.zCoord * 2.0D;
            List<EntityFireball> list = player.worldObj.getEntitiesWithinAABB(EntityFireball.class, new AxisAlignedBB(dx - 1, dy - 1, dz - 1, dx + 1, dy + 1, dz + 1));
            for (EntityFireball fireball : list) {
                DamageSource source = DamageSource.causeFireballDamage(fireball, fireball.shootingEntity);
                if (canBlockDamage(stack, source) && fireball.attackEntityFrom(DamageSource.causePlayerDamage(player), 1.0F)) {
                    fireball.getEntityData().setBoolean("isReflected", true);
                    ZSSPlayerInfo.get(player).onAttackBlocked(stack, 1.0F);
                    WorldUtils.playSoundAtEntity(player, Sounds.HAMMER, 0.4F, 0.5F);
                    break;
                }
            }
        }
    }
}
项目:projectzulu1.7.10    文件:EntityMummyPharaoh.java   
private void shootFireballAtTarget() {
    EntityPlayer targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(this, 32.0D);
    if (targetedEntity != null) {
        int holdRand = rand.nextInt(10) - 5;
        double sourcePositionX = this.posX + holdRand;
        double sourcePositionY = this.posY + 20;
        holdRand = rand.nextInt(10) - 5;
        double sourcePositionZ = this.posZ + holdRand;

        double var11 = targetedEntity.posX - sourcePositionX;
        double var13 = targetedEntity.boundingBox.minY + targetedEntity.height / 2.0F
                - (sourcePositionY + this.height / 2.0F);
        double var15 = targetedEntity.posZ - sourcePositionZ;
        this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(var11, var15)) * 180.0F / (float) Math.PI;

        this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) this.posX, (int) this.posY,
                (int) this.posZ, 0);
        EntityFireball var17 = new EntityLargeFireball(this.worldObj, this, var11, var13, var15);
        double var18 = 1.0D;
        Vec3 var20 = this.getLook(1.0F);
        var17.posX = sourcePositionX + var20.xCoord * var18;
        var17.posY = sourcePositionY + this.height / 2.0F + 0.5D;
        var17.posZ = sourcePositionZ + var20.zCoord * var18;
        this.worldObj.spawnEntityInWorld(var17);
    }
}
项目:Andrew2448PowersuitAddons    文件:MobRepulsorModule.java   
public void repulse(World world, int i, int j, int k) {
    float distance = 5.0F;
    Entity entity;
    Iterator iterator;
    List list = world.getEntitiesWithinAABB(EntityMob.class, AxisAlignedBB.getBoundingBox(i - distance, j - distance, k - distance, i + distance, j + distance, k + distance));
    for (iterator = list.iterator(); iterator.hasNext(); push(entity, i, j, k)) {
        entity = (Entity)iterator.next();
    }
    list = world.getEntitiesWithinAABB(EntityArrow.class, AxisAlignedBB.getBoundingBox(i - distance, j - distance, k - distance, i + distance, j + distance, k + distance));
    for (iterator = list.iterator(); iterator.hasNext(); push(entity, i, j, k)) {
        entity = (Entity)iterator.next();
    }
    list = world.getEntitiesWithinAABB(EntityFireball.class, AxisAlignedBB.getBoundingBox(i - distance, j - distance, k - distance, i + distance, j + distance, k + distance));
    for (iterator = list.iterator(); iterator.hasNext(); push(entity, i, j, k)) {
        entity = (Entity)iterator.next();
    }
    list = world.getEntitiesWithinAABB(EntityPotion.class, AxisAlignedBB.getBoundingBox(i - distance, j - distance, k - distance, i + distance, j + distance, k + distance));
    for (iterator = list.iterator(); iterator.hasNext(); push(entity, i, j, k)) {
        entity = (Entity)iterator.next();
    }
}
项目:iChunUtil    文件:WorldPortal.java   
public void handleSpecialEntities(Entity ent)
{
    if(ent instanceof EntityBlock)
    {
        ((EntityBlock)ent).timeExisting = 2;
    }
    else if(ent instanceof EntityFallingBlock)
    {
        ((EntityFallingBlock)ent).fallTime = 2;
    }
    else if(ent instanceof EntityFireball)
    {
        EntityFireball fireball = (EntityFireball)ent;
        float[] appliedAcceleration = getQuaternionFormula().applyPositionalRotation(new float[] { (float)fireball.accelerationX, (float)fireball.accelerationY, (float)fireball.accelerationZ });
        fireball.accelerationX = appliedAcceleration[0];
        fireball.accelerationY = appliedAcceleration[1];
        fireball.accelerationZ = appliedAcceleration[2];
    }
    else if(ent instanceof EntityArrow)
    {
        ((EntityArrow)ent).inGround = false;
    }
}
项目:Uranium    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron
            || entity instanceof EntityThrowable
            || entity instanceof EntityDragon
            || entity instanceof EntityDragonPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeatherEffect
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworkRocket
            || entity instanceof EntityVillager
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:DecompiledMinecraft    文件:RenderFireball.java   
/**
 * 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 doe
 */
public void doRender(EntityFireball entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    this.bindEntityTexture(entity);
    GlStateManager.translate((float)x, (float)y, (float)z);
    GlStateManager.enableRescaleNormal();
    GlStateManager.scale(this.scale, this.scale, this.scale);
    TextureAtlasSprite textureatlassprite = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getParticleIcon(Items.fire_charge);
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    float f = textureatlassprite.getMinU();
    float f1 = textureatlassprite.getMaxU();
    float f2 = textureatlassprite.getMinV();
    float f3 = textureatlassprite.getMaxV();
    float f4 = 1.0F;
    float f5 = 0.5F;
    float f6 = 0.25F;
    GlStateManager.rotate(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
    worldrenderer.pos(-0.5D, -0.25D, 0.0D).tex((double)f, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(0.5D, -0.25D, 0.0D).tex((double)f1, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(0.5D, 0.75D, 0.0D).tex((double)f1, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(-0.5D, 0.75D, 0.0D).tex((double)f, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
    tessellator.draw();
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:BaseClient    文件:RenderFireball.java   
/**
 * 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 doe
 */
public void doRender(EntityFireball entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    this.bindEntityTexture(entity);
    GlStateManager.translate((float)x, (float)y, (float)z);
    GlStateManager.enableRescaleNormal();
    GlStateManager.scale(this.scale, this.scale, this.scale);
    TextureAtlasSprite textureatlassprite = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getParticleIcon(Items.fire_charge);
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    float f = textureatlassprite.getMinU();
    float f1 = textureatlassprite.getMaxU();
    float f2 = textureatlassprite.getMinV();
    float f3 = textureatlassprite.getMaxV();
    float f4 = 1.0F;
    float f5 = 0.5F;
    float f6 = 0.25F;
    GlStateManager.rotate(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
    worldrenderer.pos(-0.5D, -0.25D, 0.0D).tex((double)f, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(0.5D, -0.25D, 0.0D).tex((double)f1, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(0.5D, 0.75D, 0.0D).tex((double)f1, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(-0.5D, 0.75D, 0.0D).tex((double)f, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
    tessellator.draw();
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:BaseClient    文件:RenderFireball.java   
/**
 * 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 doe
 */
public void doRender(EntityFireball entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    this.bindEntityTexture(entity);
    GlStateManager.translate((float)x, (float)y, (float)z);
    GlStateManager.enableRescaleNormal();
    GlStateManager.scale(this.scale, this.scale, this.scale);
    TextureAtlasSprite textureatlassprite = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getParticleIcon(Items.fire_charge);
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    float f = textureatlassprite.getMinU();
    float f1 = textureatlassprite.getMaxU();
    float f2 = textureatlassprite.getMinV();
    float f3 = textureatlassprite.getMaxV();
    float f4 = 1.0F;
    float f5 = 0.5F;
    float f6 = 0.25F;
    GlStateManager.rotate(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
    worldrenderer.pos(-0.5D, -0.25D, 0.0D).tex((double)f, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(0.5D, -0.25D, 0.0D).tex((double)f1, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(0.5D, 0.75D, 0.0D).tex((double)f1, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos(-0.5D, 0.75D, 0.0D).tex((double)f, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
    tessellator.draw();
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:MidgarCrusade    文件:ServerSpellHandler.java   
public static void handle_holyblade(World world, EntityPlayerMP sender)
{
    float a;
    float b;
    float c;

    a = (float) sender.getLookVec().xCoord;
    b = (float) sender.getLookVec().yCoord;
    c = (float) sender.getLookVec().zCoord;
    EntityFireball fireball = new EntityLargeFireball(world, sender.posX + a, sender.posY + b, sender.posZ + c, a, b, c);
    fireball.posY = sender.posY + (double)(sender.height / 2.0F) + 0.5D;
    world.spawnEntityInWorld(fireball);
    fireball.setVelocity(fireball.motionX * 1.5f, fireball.motionY, fireball.motionZ * 1.5f);
}
项目:MidgarCrusade    文件:ServerSpellHandler.java   
public static void handle_airrender(World world, EntityPlayerMP sender)
{
    float a;
    float b;
    float c;

    a = (float) sender.getLookVec().xCoord;
    b = (float) sender.getLookVec().yCoord;
    c = (float) sender.getLookVec().zCoord;
    EntityFireball fireball = new EntityLargeFireball(world, sender.posX + a, sender.posY + b, sender.posZ + c, a, b, c);
    fireball.posY = sender.posY + (double)(sender.height / 2.0F) + 0.5D;
    world.spawnEntityInWorld(fireball);
    fireball.setVelocity(fireball.motionX * 1.5f, fireball.motionY, fireball.motionZ * 1.5f);
}
项目:Aether-Legacy    文件:AbilityRepulsion.java   
private Entity getShooter(Entity ent) 
{
    return ent instanceof EntityArrow ? ((EntityArrow)ent).shootingEntity :
        ent instanceof EntityThrowable ? ((EntityThrowable)ent).getThrower() :
            ent instanceof EntityDartBase ? ((EntityDartBase)ent).shootingEntity :
                ent instanceof EntityFireball ? ((EntityFireball)ent).shootingEntity :
                        null;
}
项目:ThermosRebased    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron
            || entity instanceof EntityThrowable
            || entity instanceof EntityDragon
            || entity instanceof EntityDragonPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeatherEffect
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworkRocket
            || entity instanceof EntityVillager
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:Thermos    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron
            || entity instanceof EntityThrowable
            || entity instanceof EntityDragon
            || entity instanceof EntityDragonPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeatherEffect
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityFallingBlock // PaperSpigot - Always tick falling blocks
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworkRocket
            || entity instanceof EntityVillager
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:KCauldron    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron
            || entity instanceof EntityThrowable
            || entity instanceof EntityDragon
            || entity instanceof EntityDragonPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeatherEffect
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworkRocket
            || entity instanceof EntityVillager
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:CauldronGit    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron
            || entity instanceof EntityThrowable
            || entity instanceof EntityDragon
            || entity instanceof EntityDragonPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeatherEffect
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworkRocket
            || entity instanceof EntityVillager
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:Cauldron-Old    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron
            || entity instanceof EntityThrowable
            || entity instanceof EntityDragon
            || entity instanceof EntityDragonPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeatherEffect
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworkRocket
            || entity instanceof EntityVillager
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:Cauldron-Reloaded    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron
            || entity instanceof EntityThrowable
            || entity instanceof EntityDragon
            || entity instanceof EntityDragonPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeatherEffect
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworkRocket
            || entity instanceof EntityVillager
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:FFoKC    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity.getClass().equals(EntityPlayer.class) && !(entity.getClass().equals(FakePlayer.class))) // Cauldron
            || entity.getClass().equals(EntityThrowable.class)
            || entity.getClass().equals(EntityDragon.class)
            || entity.getClass().equals(EntityDragonPart.class)
            || entity.getClass().equals(EntityWither.class)
            || entity.getClass().equals(EntityFireball.class)
            || entity.getClass().equals(EntityWeatherEffect.class)
            || entity.getClass().equals(EntityTNTPrimed.class)
            || entity.getClass().equals(EntityFallingBlock.class)
            || entity.getClass().equals(EntityEnderCrystal.class)
            || entity.getClass().equals(EntityFireworkRocket.class)
            || entity.getClass().equals(EntityVillager.class)
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:Resilience-Client-Source    文件:RenderFireball.java   
/**
 * 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(EntityFireball par1EntityFireball, double par2, double par4, double par6, float par8, float par9)
{
    GL11.glPushMatrix();
    this.bindEntityTexture(par1EntityFireball);
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    float var10 = this.field_77002_a;
    GL11.glScalef(var10 / 1.0F, var10 / 1.0F, var10 / 1.0F);
    IIcon var11 = Items.fire_charge.getIconFromDamage(0);
    Tessellator var12 = Tessellator.instance;
    float var13 = var11.getMinU();
    float var14 = var11.getMaxU();
    float var15 = var11.getMinV();
    float var16 = var11.getMaxV();
    float var17 = 1.0F;
    float var18 = 0.5F;
    float var19 = 0.25F;
    GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    var12.startDrawingQuads();
    var12.setNormal(0.0F, 1.0F, 0.0F);
    var12.addVertexWithUV((double)(0.0F - var18), (double)(0.0F - var19), 0.0D, (double)var13, (double)var16);
    var12.addVertexWithUV((double)(var17 - var18), (double)(0.0F - var19), 0.0D, (double)var14, (double)var16);
    var12.addVertexWithUV((double)(var17 - var18), (double)(1.0F - var19), 0.0D, (double)var14, (double)var15);
    var12.addVertexWithUV((double)(0.0F - var18), (double)(1.0F - var19), 0.0D, (double)var13, (double)var15);
    var12.draw();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
}
项目:Aura-Cascade    文件:ItemMirror.java   
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 *
 * @param stack
 * @param world
 * @param player
 */
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
    AxisAlignedBB axisAlignedBB = new AxisAlignedBB(player.posX - 6, player.posY - 6, player.posZ - 6, player.posX + 6, player.posY + 6, player.posZ + 6);
    ArrayList<EntityFireball> fireballs = (ArrayList<EntityFireball>) world.getEntitiesWithinAABB(EntityFireball.class, axisAlignedBB);
    for (EntityFireball fireball : fireballs) {
        if (fireball.getDistanceSqToEntity(player) <= 25) {
            redirect(fireball);
        }
    }
    AuraCascade.proxy.networkWrapper.sendToAllAround(new PacketBurst(7, player.posX, player.posY, player.posZ), new NetworkRegistry.TargetPoint(player.worldObj.provider.getDimension(), player.posX, player.posY, player.posZ, 32));

    return new ActionResult<ItemStack>(EnumActionResult.PASS, stack);
}
项目:Aura-Cascade    文件:ItemMirror.java   
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));
            }
        }
    }
项目:Aura-Cascade    文件:ItemMirror.java   
@Override
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
    boolean result = super.onLeftClickEntity(stack, player, entity);
    if (entity instanceof EntityFireball) {
        EntityFireball fireball = (EntityFireball) entity;
        redirect(fireball);
        return true;
    }
    return result;
}
项目:Cauldron    文件:RenderFireball.java   
public void doRender(EntityFireball p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    GL11.glPushMatrix();
    this.bindEntityTexture(p_76986_1_);
    GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    float f2 = this.field_77002_a;
    GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
    IIcon iicon = Items.fire_charge.getIconFromDamage(0);
    Tessellator tessellator = Tessellator.instance;
    float f3 = iicon.getMinU();
    float f4 = iicon.getMaxU();
    float f5 = iicon.getMinV();
    float f6 = iicon.getMaxV();
    float f7 = 1.0F;
    float f8 = 0.5F;
    float f9 = 0.25F;
    GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    tessellator.startDrawingQuads();
    tessellator.setNormal(0.0F, 1.0F, 0.0F);
    tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
    tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
    tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
    tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
    tessellator.draw();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
}
项目:Cauldron    文件:RenderFireball.java   
public void doRender(EntityFireball p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    GL11.glPushMatrix();
    this.bindEntityTexture(p_76986_1_);
    GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    float f2 = this.field_77002_a;
    GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
    IIcon iicon = Items.fire_charge.getIconFromDamage(0);
    Tessellator tessellator = Tessellator.instance;
    float f3 = iicon.getMinU();
    float f4 = iicon.getMaxU();
    float f5 = iicon.getMinV();
    float f6 = iicon.getMaxV();
    float f7 = 1.0F;
    float f8 = 0.5F;
    float f9 = 0.25F;
    GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    tessellator.startDrawingQuads();
    tessellator.setNormal(0.0F, 1.0F, 0.0F);
    tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
    tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
    tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
    tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
    tessellator.draw();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
}
项目:Cauldron    文件:ActivationRange.java   
/**
 * These entities are excluded from Activation range checks.
 *
 * @param entity
 * @param world
 * @return boolean If it should always tick.
 */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
    // Cauldron start - another fix for Proxy Worlds
    if (config == null && DimensionManager.getWorld(0) != null)
    {
        config = DimensionManager.getWorld(0).spigotConfig;
    }
    else
    {
        return true;
    }
    // Cauldron end

    if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
            || ( entity.activationType == 2 && config.animalActivationRange == 0 )
            || ( entity.activationType == 1 && config.monsterActivationRange == 0 )
            || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron
            || entity instanceof EntityThrowable
            || entity instanceof EntityDragon
            || entity instanceof EntityDragonPart
            || entity instanceof EntityWither
            || entity instanceof EntityFireball
            || entity instanceof EntityWeatherEffect
            || entity instanceof EntityTNTPrimed
            || entity instanceof EntityEnderCrystal
            || entity instanceof EntityFireworkRocket
            || entity instanceof EntityVillager
            // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster
            || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false)
            && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false)
            && !entity.isCreatureType(EnumCreatureType.waterCreature, false)))
    {
        return true;
    }

    return false;
}
项目:projectzulu1.7.10-pre-1.3a    文件:EntityMummyPharaoh.java   
private void shootFireballAroundTarget() {
    EntityPlayer targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(this, 32.0D);
    if (targetedEntity != null) {
        int holdRand = rand.nextInt(10) - 5;
        double sourcePositionX = this.posX + holdRand;
        double sourcePositionY = this.posY + 20;
        holdRand = rand.nextInt(10) - 5;
        double sourcePositionZ = this.posZ + holdRand;

        double desX = targetedEntity.posX + rand.nextInt(10) - 5;
        double desZ = targetedEntity.posZ + rand.nextInt(10) - 5;
        int desY = this.worldObj.getHeightValue((int) desX, (int) desZ);

        double var11 = desX - sourcePositionX;
        double var13 = targetedEntity.boundingBox.minY + targetedEntity.height / 2.0F
                - (sourcePositionY + this.height / 2.0F);
        double var15 = desZ - sourcePositionZ;
        this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(var11, var15)) * 180.0F / (float) Math.PI;

        this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) desX, desY, (int) desZ, 0);
        EntityFireball var17 = new EntityLargeFireball(this.worldObj, this, var11, var13, var15);
        double var18 = 4.0D;
        Vec3 var20 = this.getLook(1.0F);
        var17.posX = sourcePositionX + var20.xCoord * var18;
        var17.posY = sourcePositionY + this.height / 2.0F + 0.5D;
        var17.posZ = sourcePositionZ + var20.zCoord * var18;
        this.worldObj.spawnEntityInWorld(var17);
    }
}
项目:Blockbender    文件:Fireball.java   
public Fireball(EntityLivingBase entity, int level) {
    super(entity, cooldown + (level * 2000));
    BlockBukkit b = BlockBukkit.getTargetBlock(entity);
    EntityFireball f = new EntityAvatarFireball(entity.worldObj, entity, entity.getLookVec().xCoord, entity.getLookVec().yCoord, entity.getLookVec().zCoord, level + 1);
    entity.worldObj.spawnEntityInWorld(f);
    destroy();
}
项目:RuneCraftery    文件:RenderFireball.java   
public void func_77001_a(EntityFireball p_77001_1_, double p_77001_2_, double p_77001_4_, double p_77001_6_, float p_77001_8_, float p_77001_9_) {
   GL11.glPushMatrix();
   this.func_110777_b(p_77001_1_);
   GL11.glTranslatef((float)p_77001_2_, (float)p_77001_4_, (float)p_77001_6_);
   GL11.glEnable('\u803a');
   float var10 = this.field_77002_a;
   GL11.glScalef(var10 / 1.0F, var10 / 1.0F, var10 / 1.0F);
   Icon var11 = Item.field_77811_bE.func_77617_a(0);
   Tessellator var12 = Tessellator.field_78398_a;
   float var13 = var11.func_94209_e();
   float var14 = var11.func_94212_f();
   float var15 = var11.func_94206_g();
   float var16 = var11.func_94210_h();
   float var17 = 1.0F;
   float var18 = 0.5F;
   float var19 = 0.25F;
   GL11.glRotatef(180.0F - this.field_76990_c.field_78735_i, 0.0F, 1.0F, 0.0F);
   GL11.glRotatef(-this.field_76990_c.field_78732_j, 1.0F, 0.0F, 0.0F);
   var12.func_78382_b();
   var12.func_78375_b(0.0F, 1.0F, 0.0F);
   var12.func_78374_a((double)(0.0F - var18), (double)(0.0F - var19), 0.0D, (double)var13, (double)var16);
   var12.func_78374_a((double)(var17 - var18), (double)(0.0F - var19), 0.0D, (double)var14, (double)var16);
   var12.func_78374_a((double)(var17 - var18), (double)(1.0F - var19), 0.0D, (double)var14, (double)var15);
   var12.func_78374_a((double)(0.0F - var18), (double)(1.0F - var19), 0.0D, (double)var13, (double)var15);
   var12.func_78381_a();
   GL11.glDisable('\u803a');
   GL11.glPopMatrix();
}
项目:RuneCraftery    文件:RenderFireball.java   
public void doRenderFireball(EntityFireball par1EntityFireball, double par2, double par4, double par6, float par8, float par9)
{
    GL11.glPushMatrix();
    this.bindEntityTexture(par1EntityFireball);
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    float f2 = this.field_77002_a;
    GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
    Icon icon = Item.fireballCharge.getIconFromDamage(0);
    Tessellator tessellator = Tessellator.instance;
    float f3 = icon.getMinU();
    float f4 = icon.getMaxU();
    float f5 = icon.getMinV();
    float f6 = icon.getMaxV();
    float f7 = 1.0F;
    float f8 = 0.5F;
    float f9 = 0.25F;
    GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    tessellator.startDrawingQuads();
    tessellator.setNormal(0.0F, 1.0F, 0.0F);
    tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
    tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
    tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
    tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
    tessellator.draw();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
}
项目:MyEssentials-Core    文件:EntityUtils.java   
private static String getEntityTypeNonCache(Entity e) {
    if (e instanceof EntityGolem) {
        return "Golem";
    } else if (e instanceof IBossDisplayData) {
        return "Boss";
    } else if (e instanceof IAnimals) {
        return "Animal";
    } else if (e instanceof IMob) {
        return "Monster";
    } else if (e instanceof IProjectile) {
        return "Projectile";
    } else if (e instanceof INpc) {
        return "NPC";
    } else if (e instanceof EntityItem) {
        return "Item";
    } else if (e instanceof EntityMob) {
        return "Monster";
    } else if (e instanceof EntityPlayer) {
        return "Player";
    } else if (e instanceof EntityFireball) {
        return "Projectile";
    } else if (e instanceof EntityTNTPrimed) {
        return "TNT";
    } else {
        return "Unknown"; // e.getClass().getName();
    }
}
项目:MyEssentials-Core    文件:ProjectileImpactEvent.java   
/**
 * Creates a new event for an impacting EntityFireball
 */
public ProjectileImpactEvent(EntityFireball fireball, MovingObjectPosition mop)
{
    super(fireball);
    this.firingEntity = fireball.shootingEntity;
    this.movingObjectPosition = mop;
}
项目: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();
    }
}
项目:projectzulu1.7.10    文件:EntityMummyPharaoh.java   
private void shootFireballAroundTarget() {
    EntityPlayer targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(this, 32.0D);
    if (targetedEntity != null) {
        int holdRand = rand.nextInt(10) - 5;
        double sourcePositionX = this.posX + holdRand;
        double sourcePositionY = this.posY + 20;
        holdRand = rand.nextInt(10) - 5;
        double sourcePositionZ = this.posZ + holdRand;

        double desX = targetedEntity.posX + rand.nextInt(10) - 5;
        double desZ = targetedEntity.posZ + rand.nextInt(10) - 5;
        int desY = this.worldObj.getHeightValue((int) desX, (int) desZ);

        double var11 = desX - sourcePositionX;
        double var13 = targetedEntity.boundingBox.minY + targetedEntity.height / 2.0F
                - (sourcePositionY + this.height / 2.0F);
        double var15 = desZ - sourcePositionZ;
        this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(var11, var15)) * 180.0F / (float) Math.PI;

        this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) desX, desY, (int) desZ, 0);
        EntityFireball var17 = new EntityLargeFireball(this.worldObj, this, var11, var13, var15);
        double var18 = 4.0D;
        Vec3 var20 = this.getLook(1.0F);
        var17.posX = sourcePositionX + var20.xCoord * var18;
        var17.posY = sourcePositionY + this.height / 2.0F + 0.5D;
        var17.posZ = sourcePositionZ + var20.zCoord * var18;
        this.worldObj.spawnEntityInWorld(var17);
    }
}
项目:BetterNutritionMod    文件:RenderFireball.java   
public void doRenderFireball(EntityFireball par1EntityFireball, double par2, double par4, double par6, float par8, float par9)
{
    GL11.glPushMatrix();
    this.bindEntityTexture(par1EntityFireball);
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    float f2 = this.field_77002_a;
    GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
    Icon icon = Item.fireballCharge.getIconFromDamage(0);
    Tessellator tessellator = Tessellator.instance;
    float f3 = icon.getMinU();
    float f4 = icon.getMaxU();
    float f5 = icon.getMinV();
    float f6 = icon.getMaxV();
    float f7 = 1.0F;
    float f8 = 0.5F;
    float f9 = 0.25F;
    GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    tessellator.startDrawingQuads();
    tessellator.setNormal(0.0F, 1.0F, 0.0F);
    tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
    tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
    tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
    tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
    tessellator.draw();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
}
项目:Uranium    文件:CraftFireball.java   
public CraftFireball(CraftServer server, EntityFireball entity) {
    super(server, entity);
}
项目:Uranium    文件:CraftFireball.java   
@Override
public EntityFireball getHandle() {
    return (EntityFireball) entity;
}
项目:DecompiledMinecraft    文件:DamageSource.java   
/**
 * returns EntityDamageSourceIndirect of a fireball
 */
public static DamageSource causeFireballDamage(EntityFireball fireball, Entity p_76362_1_)
{
    return p_76362_1_ == null ? (new EntityDamageSourceIndirect("onFire", fireball, fireball)).setFireDamage().setProjectile() : (new EntityDamageSourceIndirect("fireball", fireball, p_76362_1_)).setFireDamage().setProjectile();
}