Java 类net.minecraft.entity.boss.EntityDragon 实例源码

项目:MakeClayValuableAgain    文件:ClayProgressionImprovements.java   
@SubscribeEvent
public void dropClay(LivingDropsEvent event) {
    EntityLivingBase deadEntity = event.getEntityLiving();
    World world = deadEntity.getEntityWorld();
    BlockPos position = deadEntity.getPosition();
    double x = position.getX();
    double y = position.getY();
    double z = position.getZ();
    if (deadEntity instanceof EntityWitherSkeleton) {
        if (world.rand.nextInt(10) == 5) {
            event.getDrops().add(new EntityItem(world, x, y, z, new ItemStack(Items.CLAY_BALL)));
        }
    } else if (deadEntity instanceof EntityDragon || deadEntity instanceof EntityWither) {
        event.getDrops().add(new EntityItem(world, x, y, z, new ItemStack(Items.CLAY_BALL)));
    }
}
项目:DecompiledMinecraft    文件:BiomeEndDecorator.java   
protected void genDecorations(BiomeGenBase biomeGenBaseIn)
{
    this.generateOres();

    if (this.randomGenerator.nextInt(5) == 0)
    {
        int i = this.randomGenerator.nextInt(16) + 8;
        int j = this.randomGenerator.nextInt(16) + 8;
        this.spikeGen.generate(this.currentWorld, this.randomGenerator, this.currentWorld.getTopSolidOrLiquidBlock(this.field_180294_c.add(i, 0, j)));
    }

    if (this.field_180294_c.getX() == 0 && this.field_180294_c.getZ() == 0)
    {
        EntityDragon entitydragon = new EntityDragon(this.currentWorld);
        entitydragon.setLocationAndAngles(0.0D, 128.0D, 0.0D, this.randomGenerator.nextFloat() * 360.0F, 0.0F);
        this.currentWorld.spawnEntityInWorld(entitydragon);
    }
}
项目:DecompiledMinecraft    文件:BiomeEndDecorator.java   
protected void genDecorations(BiomeGenBase biomeGenBaseIn)
{
    this.generateOres();

    if (this.randomGenerator.nextInt(5) == 0)
    {
        int i = this.randomGenerator.nextInt(16) + 8;
        int j = this.randomGenerator.nextInt(16) + 8;
        this.spikeGen.generate(this.currentWorld, this.randomGenerator, this.currentWorld.getTopSolidOrLiquidBlock(this.field_180294_c.add(i, 0, j)));
    }

    if (this.field_180294_c.getX() == 0 && this.field_180294_c.getZ() == 0)
    {
        EntityDragon entitydragon = new EntityDragon(this.currentWorld);
        entitydragon.setLocationAndAngles(0.0D, 128.0D, 0.0D, this.randomGenerator.nextFloat() * 360.0F, 0.0F);
        this.currentWorld.spawnEntityInWorld(entitydragon);
    }
}
项目:DecompiledMinecraft    文件:RenderDragon.java   
protected void rotateCorpse(EntityDragon bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
    float f = (float)bat.getMovementOffsets(7, partialTicks)[0];
    float f1 = (float)(bat.getMovementOffsets(5, partialTicks)[1] - bat.getMovementOffsets(10, partialTicks)[1]);
    GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.translate(0.0F, 0.0F, 1.0F);

    if (bat.deathTime > 0)
    {
        float f2 = ((float)bat.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
        f2 = MathHelper.sqrt_float(f2);

        if (f2 > 1.0F)
        {
            f2 = 1.0F;
        }

        GlStateManager.rotate(f2 * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
    }
}
项目:DecompiledMinecraft    文件:LayerEnderDragonEyes.java   
public void doRenderLayer(EntityDragon entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.dragonRenderer.bindTexture(TEXTURE);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthFunc(514);
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.dragonRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.dragonRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
    GlStateManager.depthFunc(515);
}
项目:BaseClient    文件:BiomeEndDecorator.java   
protected void genDecorations(BiomeGenBase biomeGenBaseIn)
{
    this.generateOres();

    if (this.randomGenerator.nextInt(5) == 0)
    {
        int i = this.randomGenerator.nextInt(16) + 8;
        int j = this.randomGenerator.nextInt(16) + 8;
        this.spikeGen.generate(this.currentWorld, this.randomGenerator, this.currentWorld.getTopSolidOrLiquidBlock(this.field_180294_c.add(i, 0, j)));
    }

    if (this.field_180294_c.getX() == 0 && this.field_180294_c.getZ() == 0)
    {
        EntityDragon entitydragon = new EntityDragon(this.currentWorld);
        entitydragon.setLocationAndAngles(0.0D, 128.0D, 0.0D, this.randomGenerator.nextFloat() * 360.0F, 0.0F);
        this.currentWorld.spawnEntityInWorld(entitydragon);
    }
}
项目:BaseClient    文件:RenderDragon.java   
protected void rotateCorpse(EntityDragon bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
    float f = (float)bat.getMovementOffsets(7, partialTicks)[0];
    float f1 = (float)(bat.getMovementOffsets(5, partialTicks)[1] - bat.getMovementOffsets(10, partialTicks)[1]);
    GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.translate(0.0F, 0.0F, 1.0F);

    if (bat.deathTime > 0)
    {
        float f2 = ((float)bat.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
        f2 = MathHelper.sqrt_float(f2);

        if (f2 > 1.0F)
        {
            f2 = 1.0F;
        }

        GlStateManager.rotate(f2 * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
    }
}
项目:BaseClient    文件:LayerEnderDragonEyes.java   
public void doRenderLayer(EntityDragon entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.dragonRenderer.bindTexture(TEXTURE);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthFunc(514);
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.dragonRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.dragonRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
    GlStateManager.depthFunc(515);
}
项目:BaseClient    文件:RenderDragon.java   
protected void rotateCorpse(EntityDragon bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
    float f = (float)bat.getMovementOffsets(7, partialTicks)[0];
    float f1 = (float)(bat.getMovementOffsets(5, partialTicks)[1] - bat.getMovementOffsets(10, partialTicks)[1]);
    GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.translate(0.0F, 0.0F, 1.0F);

    if (bat.deathTime > 0)
    {
        float f2 = ((float)bat.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
        f2 = MathHelper.sqrt_float(f2);

        if (f2 > 1.0F)
        {
            f2 = 1.0F;
        }

        GlStateManager.rotate(f2 * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
    }
}
项目:BaseClient    文件:LayerEnderDragonEyes.java   
public void doRenderLayer(EntityDragon entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.dragonRenderer.bindTexture(TEXTURE);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthFunc(514);
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.dragonRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.dragonRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
    GlStateManager.depthFunc(515);
}
项目:CustomWorldGen    文件:LayerEnderDragonEyes.java   
public void doRenderLayer(EntityDragon entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    this.dragonRenderer.bindTexture(TEXTURE);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
    GlStateManager.disableLighting();
    GlStateManager.depthFunc(514);
    int i = 61680;
    int j = 61680;
    int k = 0;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680.0F, 0.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.dragonRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    this.dragonRenderer.setLightmap(entitylivingbaseIn, partialTicks);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
    GlStateManager.depthFunc(515);
}
项目:Backmemed    文件:DragonFightManager.java   
public void processDragonDeath(EntityDragon dragon)
{
    if (dragon.getUniqueID().equals(this.dragonUniqueId))
    {
        this.bossInfo.setPercent(0.0F);
        this.bossInfo.setVisible(false);
        this.generatePortal(true);
        this.spawnNewGateway();

        if (!this.previouslyKilled)
        {
            this.world.setBlockState(this.world.getHeight(WorldGenEndPodium.END_PODIUM_LOCATION), Blocks.DRAGON_EGG.getDefaultState());
        }

        this.previouslyKilled = true;
        this.dragonKilled = true;
    }
}
项目:Backmemed    文件:DragonFightManager.java   
public void onCrystalDestroyed(EntityEnderCrystal crystal, DamageSource dmgSrc)
{
    if (this.respawnState != null && this.crystals.contains(crystal))
    {
        LOGGER.debug("Aborting respawn sequence");
        this.respawnState = null;
        this.respawnStateTicks = 0;
        this.resetSpikeCrystals();
        this.generatePortal(true);
    }
    else
    {
        this.findAliveCrystals();
        Entity entity = this.world.getEntityFromUuid(this.dragonUniqueId);

        if (entity instanceof EntityDragon)
        {
            ((EntityDragon)entity).onCrystalDestroyed(crystal, new BlockPos(crystal), dmgSrc);
        }
    }
}
项目:Backmemed    文件:PhaseManager.java   
public void setPhase(PhaseList<?> phaseIn)
{
    if (this.phase == null || phaseIn != this.phase.getPhaseList())
    {
        if (this.phase != null)
        {
            this.phase.removeAreaEffect();
        }

        this.phase = this.getPhase(phaseIn);

        if (!this.dragon.world.isRemote)
        {
            this.dragon.getDataManager().set(EntityDragon.PHASE, Integer.valueOf(phaseIn.getId()));
        }

        LOGGER.debug("Dragon is now in phase {} on the {}", new Object[] {phaseIn, this.dragon.world.isRemote ? "client" : "server"});
        this.phase.initPhase();
    }
}
项目:Backmemed    文件:RenderDragon.java   
protected void rotateCorpse(EntityDragon entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks)
{
    float f = (float)entityLiving.getMovementOffsets(7, partialTicks)[0];
    float f1 = (float)(entityLiving.getMovementOffsets(5, partialTicks)[1] - entityLiving.getMovementOffsets(10, partialTicks)[1]);
    GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.translate(0.0F, 0.0F, 1.0F);

    if (entityLiving.deathTime > 0)
    {
        float f2 = ((float)entityLiving.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
        f2 = MathHelper.sqrt(f2);

        if (f2 > 1.0F)
        {
            f2 = 1.0F;
        }

        GlStateManager.rotate(f2 * this.getDeathMaxRotation(entityLiving), 0.0F, 0.0F, 1.0F);
    }
}
项目:CustomWorldGen    文件:DragonFightManager.java   
public void processDragonDeath(EntityDragon dragon)
{
    if (dragon.getUniqueID().equals(this.dragonUniqueId))
    {
        this.bossInfo.setPercent(0.0F);
        this.bossInfo.setVisible(false);
        this.generatePortal(true);
        this.spawnNewGateway();

        if (!this.previouslyKilled)
        {
            this.world.setBlockState(this.world.getHeight(WorldGenEndPodium.END_PODIUM_LOCATION), Blocks.DRAGON_EGG.getDefaultState());
        }

        this.previouslyKilled = true;
        this.dragonKilled = true;
    }
}
项目:CustomWorldGen    文件:DragonFightManager.java   
public void onCrystalDestroyed(EntityEnderCrystal crystal, DamageSource dmgSrc)
{
    if (this.respawnState != null && this.crystals.contains(crystal))
    {
        LOGGER.debug("Aborting respawn sequence");
        this.respawnState = null;
        this.respawnStateTicks = 0;
        this.resetSpikeCrystals();
        this.generatePortal(true);
    }
    else
    {
        this.findAliveCrystals();
        Entity entity = this.world.getEntityFromUuid(this.dragonUniqueId);

        if (entity instanceof EntityDragon)
        {
            ((EntityDragon)entity).onCrystalDestroyed(crystal, new BlockPos(crystal), dmgSrc);
        }
    }
}
项目:CustomWorldGen    文件:PhaseManager.java   
public void setPhase(PhaseList<?> phaseIn)
{
    if (this.phase == null || phaseIn != this.phase.getPhaseList())
    {
        if (this.phase != null)
        {
            this.phase.removeAreaEffect();
        }

        this.phase = this.getPhase(phaseIn);

        if (!this.dragon.worldObj.isRemote)
        {
            this.dragon.getDataManager().set(EntityDragon.PHASE, Integer.valueOf(phaseIn.getId()));
        }

        LOGGER.debug("Dragon is now in phase {} on the {}", new Object[] {phaseIn, this.dragon.worldObj.isRemote ? "client" : "server"});
        this.phase.initPhase();
    }
}
项目:CustomWorldGen    文件:RenderDragon.java   
protected void rotateCorpse(EntityDragon entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks)
{
    float f = (float)entityLiving.getMovementOffsets(7, partialTicks)[0];
    float f1 = (float)(entityLiving.getMovementOffsets(5, partialTicks)[1] - entityLiving.getMovementOffsets(10, partialTicks)[1]);
    GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.translate(0.0F, 0.0F, 1.0F);

    if (entityLiving.deathTime > 0)
    {
        float f2 = ((float)entityLiving.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
        f2 = MathHelper.sqrt_float(f2);

        if (f2 > 1.0F)
        {
            f2 = 1.0F;
        }

        GlStateManager.rotate(f2 * this.getDeathMaxRotation(entityLiving), 0.0F, 0.0F, 1.0F);
    }
}
项目:ClientAPI    文件:EntityFilters.java   
/**
 * Checks if the specified entity is a hostile
 *
 * @param e The entity
 * @return Whether or not the entity is a hostile
 */
public static boolean isHostile(Entity e) {
    if (e instanceof EntityPigZombie)
        return isAngry((EntityPigZombie) e);

    if (e instanceof EntityIronGolem)
        return isAngry((EntityIronGolem) e);

    if (e instanceof EntityPolarBear)
        return isAngry((EntityPolarBear) e);

    if (e instanceof EntityMob)
        return true;

    if (e instanceof EntitySlime)
        return true;

    if (e instanceof EntityShulker)
        return true;

    if (e instanceof EntityGhast)
        return true;

    if (e instanceof EntityDragon)
        return true;

    return 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    文件:RenderDragon.java   
/**
 * Renders the model in RenderLiving
 */
protected void renderModel(EntityDragon entitylivingbaseIn, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_)
{
    if (entitylivingbaseIn.deathTicks > 0)
    {
        float f = (float)entitylivingbaseIn.deathTicks / 200.0F;
        GlStateManager.depthFunc(515);
        GlStateManager.enableAlpha();
        GlStateManager.alphaFunc(516, f);
        this.bindTexture(enderDragonExplodingTextures);
        this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);
        GlStateManager.alphaFunc(516, 0.1F);
        GlStateManager.depthFunc(514);
    }

    this.bindEntityTexture(entitylivingbaseIn);
    this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);

    if (entitylivingbaseIn.hurtTime > 0)
    {
        GlStateManager.depthFunc(514);
        GlStateManager.disableTexture2D();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(770, 771);
        GlStateManager.color(1.0F, 0.0F, 0.0F, 0.5F);
        this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);
        GlStateManager.enableTexture2D();
        GlStateManager.disableBlend();
        GlStateManager.depthFunc(515);
    }
}
项目:DecompiledMinecraft    文件:RenderDragon.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(EntityDragon entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    BossStatus.setBossStatus(entity, false);
    super.doRender(entity, x, y, z, entityYaw, partialTicks);

    if (entity.healingEnderCrystal != null)
    {
        this.drawRechargeRay(entity, x, y, z, partialTicks);
    }
}
项目:BaseClient    文件:RenderDragon.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(EntityDragon entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    BossStatus.setBossStatus(entity, false);
    super.doRender(entity, x, y, z, entityYaw, partialTicks);

    if (entity.healingEnderCrystal != null)
    {
        this.drawRechargeRay(entity, x, y, z, partialTicks);
    }
}
项目:CustomWorldGen    文件:RenderDragon.java   
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityDragon entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    super.doRender(entity, x, y, z, entityYaw, partialTicks);

    if (entity.healingEnderCrystal != null)
    {
        this.bindTexture(ENDERCRYSTAL_BEAM_TEXTURES);
        float f = MathHelper.sin(((float)entity.healingEnderCrystal.ticksExisted + partialTicks) * 0.2F) / 2.0F + 0.5F;
        f = (f * f + f) * 0.2F;
        renderCrystalBeams(x, y, z, partialTicks, entity.posX + (entity.prevPosX - entity.posX) * (double)(1.0F - partialTicks), entity.posY + (entity.prevPosY - entity.posY) * (double)(1.0F - partialTicks), entity.posZ + (entity.prevPosZ - entity.posZ) * (double)(1.0F - partialTicks), entity.ticksExisted, entity.healingEnderCrystal.posX, (double)f + entity.healingEnderCrystal.posY, entity.healingEnderCrystal.posZ);
    }
}
项目:BaseClient    文件:RenderDragon.java   
/**
 * Renders the model in RenderLiving
 */
protected void renderModel(EntityDragon entitylivingbaseIn, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_)
{
    if (entitylivingbaseIn.deathTicks > 0)
    {
        float f = (float)entitylivingbaseIn.deathTicks / 200.0F;
        GlStateManager.depthFunc(515);
        GlStateManager.enableAlpha();
        GlStateManager.alphaFunc(516, f);
        this.bindTexture(enderDragonExplodingTextures);
        this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);
        GlStateManager.alphaFunc(516, 0.1F);
        GlStateManager.depthFunc(514);
    }

    this.bindEntityTexture(entitylivingbaseIn);
    this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);

    if (entitylivingbaseIn.hurtTime > 0)
    {
        GlStateManager.depthFunc(514);
        GlStateManager.disableTexture2D();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(770, 771);
        GlStateManager.color(1.0F, 0.0F, 0.0F, 0.5F);
        this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);
        GlStateManager.enableTexture2D();
        GlStateManager.disableBlend();
        GlStateManager.depthFunc(515);
    }
}
项目:BaseClient    文件:RenderDragon.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(EntityDragon entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    BossStatus.setBossStatus(entity, false);
    super.doRender(entity, x, y, z, entityYaw, partialTicks);

    if (entity.healingEnderCrystal != null)
    {
        this.drawRechargeRay(entity, x, y, z, partialTicks);
    }
}
项目:EndermanEvolution    文件:EntityUtils.java   
public static ItemStack getSkullDrop(EntityLivingBase entity) {
    if (entity instanceof EntitySkeleton) {
        return new ItemStack(Items.SKULL, 1, 0);
    }
    if (entity instanceof EntityWitherSkeleton) {
        return new ItemStack(Items.SKULL, 1, 1);
    }
    if (entity instanceof EntityZombie) {
        return new ItemStack(Items.SKULL, 1, 2);
    }
    if (entity instanceof EntityCreeper) {
        return new ItemStack(Items.SKULL, 1, 4);
    }
    if (entity instanceof EntityPlayer) {
        ItemStack head = new ItemStack(Items.SKULL, 1, 3);
        NBTTagCompound nametag = new NBTTagCompound();
        nametag.setString("SkullOwner", entity.getDisplayName().getFormattedText());
        head.setTagCompound(nametag);
        return head;
    }
    if (entity instanceof EntityDragon) {
        return new ItemStack(Items.SKULL, 1, 5);
    }
    if (entity instanceof EntityEnderman) {
        if (entity instanceof EntityEvolvedEnderman) {
            return new ItemStack(ModItems.SKULL_EVOLVED_ENDERMAN);
        }
        return new ItemStack(ModItems.SKULL_ENDERMAN);
    }
    if (entity instanceof EntityFrienderman) {
        return new ItemStack(ModItems.SKULL_FRIENDERMAN);
    }
    return null;
}
项目:Backmemed    文件:DragonFightManager.java   
private void spawnDragon()
{
    this.world.getChunkFromBlockCoords(new BlockPos(0, 128, 0));
    EntityDragon entitydragon = new EntityDragon(this.world);
    entitydragon.getPhaseManager().setPhase(PhaseList.HOLDING_PATTERN);
    entitydragon.setLocationAndAngles(0.0D, 128.0D, 0.0D, this.world.rand.nextFloat() * 360.0F, 0.0F);
    this.world.spawnEntityInWorld(entitydragon);
    this.dragonUniqueId = entitydragon.getUniqueID();
}
项目:Backmemed    文件:DragonFightManager.java   
public void dragonUpdate(EntityDragon dragonIn)
{
    if (dragonIn.getUniqueID().equals(this.dragonUniqueId))
    {
        this.bossInfo.setPercent(dragonIn.getHealth() / dragonIn.getMaxHealth());
        this.ticksSinceDragonSeen = 0;

        if (dragonIn.hasCustomName())
        {
            this.bossInfo.setName(dragonIn.getDisplayName());
        }
    }
}
项目:Backmemed    文件:EntityEnderCrystal.java   
/**
 * Called when the entity is attacked.
 */
public boolean attackEntityFrom(DamageSource source, float amount)
{
    if (this.isEntityInvulnerable(source))
    {
        return false;
    }
    else if (source.getEntity() instanceof EntityDragon)
    {
        return false;
    }
    else
    {
        if (!this.isDead && !this.world.isRemote)
        {
            this.setDead();

            if (!this.world.isRemote)
            {
                this.world.createExplosion((Entity)null, this.posX, this.posY, this.posZ, 6.0F, true);
                this.onCrystalDestroyed(source);
            }
        }

        return true;
    }
}
项目:Backmemed    文件:PhaseList.java   
public IPhase createPhase(EntityDragon dragon)
{
    try
    {
        Constructor <? extends IPhase > constructor = this.getConstructor();
        return (IPhase)constructor.newInstance(new Object[] {dragon});
    }
    catch (Exception exception)
    {
        throw new Error(exception);
    }
}
项目:Backmemed    文件:RenderDragon.java   
/**
 * Renders the model in RenderLiving
 */
protected void renderModel(EntityDragon entitylivingbaseIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor)
{
    if (entitylivingbaseIn.deathTicks > 0)
    {
        float f = (float)entitylivingbaseIn.deathTicks / 200.0F;
        GlStateManager.depthFunc(515);
        GlStateManager.enableAlpha();
        GlStateManager.alphaFunc(516, f);
        this.bindTexture(DRAGON_EXPLODING_TEXTURES);
        this.mainModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
        GlStateManager.alphaFunc(516, 0.1F);
        GlStateManager.depthFunc(514);
    }

    this.bindEntityTexture(entitylivingbaseIn);
    this.mainModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);

    if (entitylivingbaseIn.hurtTime > 0)
    {
        GlStateManager.depthFunc(514);
        GlStateManager.disableTexture2D();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
        GlStateManager.color(1.0F, 0.0F, 0.0F, 0.5F);
        this.mainModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
        GlStateManager.enableTexture2D();
        GlStateManager.disableBlend();
        GlStateManager.depthFunc(515);
    }
}
项目:Backmemed    文件:RenderDragon.java   
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityDragon entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    super.doRender(entity, x, y, z, entityYaw, partialTicks);

    if (entity.healingEnderCrystal != null)
    {
        this.bindTexture(ENDERCRYSTAL_BEAM_TEXTURES);
        float f = MathHelper.sin(((float)entity.healingEnderCrystal.ticksExisted + partialTicks) * 0.2F) / 2.0F + 0.5F;
        f = (f * f + f) * 0.2F;
        renderCrystalBeams(x, y, z, partialTicks, entity.posX + (entity.prevPosX - entity.posX) * (double)(1.0F - partialTicks), entity.posY + (entity.prevPosY - entity.posY) * (double)(1.0F - partialTicks), entity.posZ + (entity.prevPosZ - entity.posZ) * (double)(1.0F - partialTicks), entity.ticksExisted, entity.healingEnderCrystal.posX, (double)f + entity.healingEnderCrystal.posY, entity.healingEnderCrystal.posZ);
    }
}
项目:Backmemed    文件:LayerEnderDragonEyes.java   
public void doRenderLayer(EntityDragon entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    this.dragonRenderer.bindTexture(TEXTURE);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
    GlStateManager.disableLighting();
    GlStateManager.depthFunc(514);
    int i = 61680;
    int j = 61680;
    int k = 0;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680.0F, 0.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    Minecraft.getMinecraft().entityRenderer.func_191514_d(true);

    if (Config.isShaders())
    {
        Shaders.beginSpiderEyes();
    }

    Config.getRenderGlobal().renderOverlayEyes = true;
    this.dragonRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    Config.getRenderGlobal().renderOverlayEyes = false;
    Minecraft.getMinecraft().entityRenderer.func_191514_d(false);
    this.dragonRenderer.setLightmap(entitylivingbaseIn, partialTicks);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
    GlStateManager.depthFunc(515);
}
项目:IceMod    文件:IceLands.java   
public IceLands(int par1)
{
    super(par1);

    this.setBiomeName("Icelands");

    this.topBlock = (byte)IceMod.IcyOre.blockID;
    this.fillerBlock = (byte)Block.ice.blockID;

    this.theBiomeDecorator.bigMushroomsPerChunk = 10;
    this.theBiomeDecorator.treesPerChunk = 5;
    this.theBiomeDecorator.clayPerChunk  = 3;
    this.theBiomeDecorator.reedsPerChunk = 1;

    this.spawnableMonsterList.add(new SpawnListEntry(EntitySnowman.class, 25, 4, 8));
    this.spawnableCreatureList.add(new SpawnListEntry(EntityCow.class, 25, 4, 8));
    this.spawnableMonsterList.add(new SpawnListEntry(EntityDragon.class, 1, 1, 1));
    this.spawnableMonsterList.add(new SpawnListEntry(EntityIronGolem.class, 1, 1, 1));

    this.setMinMaxHeight(0.1F, 0.5F);
    //mnmx
    this.setTemperatureRainfall(0.7F, 0.2F);

}
项目:CustomWorldGen    文件:DragonFightManager.java   
private void spawnDragon()
{
    this.world.getChunkFromBlockCoords(new BlockPos(0, 128, 0));
    EntityDragon entitydragon = new EntityDragon(this.world);
    entitydragon.getPhaseManager().setPhase(PhaseList.HOLDING_PATTERN);
    entitydragon.setLocationAndAngles(0.0D, 128.0D, 0.0D, this.world.rand.nextFloat() * 360.0F, 0.0F);
    this.world.spawnEntityInWorld(entitydragon);
    this.dragonUniqueId = entitydragon.getUniqueID();
}
项目:CustomWorldGen    文件:DragonFightManager.java   
public void dragonUpdate(EntityDragon dragonIn)
{
    if (dragonIn.getUniqueID().equals(this.dragonUniqueId))
    {
        this.bossInfo.setPercent(dragonIn.getHealth() / dragonIn.getMaxHealth());
        this.ticksSinceDragonSeen = 0;
    }
}
项目:CustomWorldGen    文件:EntityEnderCrystal.java   
/**
 * Called when the entity is attacked.
 */
public boolean attackEntityFrom(DamageSource source, float amount)
{
    if (this.isEntityInvulnerable(source))
    {
        return false;
    }
    else if (source.getEntity() instanceof EntityDragon)
    {
        return false;
    }
    else
    {
        if (!this.isDead && !this.worldObj.isRemote)
        {
            this.setDead();

            if (!this.worldObj.isRemote)
            {
                this.worldObj.createExplosion((Entity)null, this.posX, this.posY, this.posZ, 6.0F, true);
                this.onCrystalDestroyed(source);
            }
        }

        return true;
    }
}
项目:CustomWorldGen    文件:PhaseList.java   
public IPhase createPhase(EntityDragon dragon)
{
    try
    {
        Constructor <? extends IPhase > constructor = this.getConstructor();
        return (IPhase)constructor.newInstance(new Object[] {dragon});
    }
    catch (Exception exception)
    {
        throw new Error(exception);
    }
}