Search in sources :

Example 1 with EntityBaldEagle

use of pokefenn.totemic.entity.animal.EntityBaldEagle in project Totemic by TeamTotemic.

the class CeremonyEagleDance method effect.

@Override
public void effect(World world, BlockPos pos, CeremonyEffectContext context) {
    if (world.isRemote)
        return;
    EntityUtil.getEntitiesInRange(EntityParrot.class, world, pos, 8, 8).stream().limit(2).forEach(parrot -> {
        EntityBaldEagle eagle = new EntityBaldEagle(world);
        EntityUtil.spawnEntity(world, parrot.posX, parrot.posY, parrot.posZ, eagle);
        if (parrot.getLeashed())
            eagle.setLeashHolder(parrot.getLeashHolder(), true);
        parrot.setDead();
        ((WorldServer) world).spawnParticle(EnumParticleTypes.VILLAGER_HAPPY, parrot.posX, parrot.posY + 1.0, parrot.posZ, 24, 0.6D, 0.5D, 0.6D, 1.0D);
    });
}
Also used : EntityParrot(net.minecraft.entity.passive.EntityParrot) EntityBaldEagle(pokefenn.totemic.entity.animal.EntityBaldEagle) WorldServer(net.minecraft.world.WorldServer)

Example 2 with EntityBaldEagle

use of pokefenn.totemic.entity.animal.EntityBaldEagle in project Totemic by TeamTotemic.

the class ModelBaldEagle method setLivingAnimations.

@Override
public void setLivingAnimations(EntityLivingBase entity, float limbSwing, float limbSwingAmount, float partialTickTime) {
    this.torso.rotateAngleX = 0.4937F;
    this.rightWing.rotateAngleX = -((float) Math.PI * 2F / 9F);
    this.rightWing.rotateAngleY = -(float) Math.PI;
    this.leftWing.rotateAngleX = -((float) Math.PI * 2F / 9F);
    this.leftWing.rotateAngleY = -(float) Math.PI;
    this.leftLeg.rotateAngleX = -0.0299F;
    this.rightLeg.rotateAngleX = -0.0299F;
    this.leftLeg.rotationPointY = 22.0F;
    this.rightLeg.rotationPointY = 22.0F;
    if (entity instanceof EntityBaldEagle) {
        EntityBaldEagle eagle = (EntityBaldEagle) entity;
        if (eagle.isSitting()) {
            this.head.rotationPointY = 16.9F;
            this.tailFeathers.rotateAngleX = 1.5388988F;
            this.tailFeathers.rotationPointY = 22.97F;
            this.torso.rotationPointY = 17.9F;
            this.rightWing.rotateAngleZ = -0.0873F;
            this.rightWing.rotationPointY = 18.84F;
            this.leftWing.rotateAngleZ = 0.0873F;
            this.leftWing.rotationPointY = 18.84F;
            this.leftLeg.rotationPointY += 1F;
            this.rightLeg.rotationPointY += 1F;
            this.leftLeg.rotateAngleX += 1F;
            this.rightLeg.rotateAngleX += 1F;
            this.state = State.SITTING;
        } else if (eagle.isFlying()) {
            this.leftLeg.rotateAngleX += ((float) Math.PI * 2F / 9F);
            this.rightLeg.rotateAngleX += ((float) Math.PI * 2F / 9F);
            this.state = State.FLYING;
        } else {
            this.state = State.STANDING;
        }
        this.leftLeg.rotateAngleZ = 0.0F;
        this.rightLeg.rotateAngleZ = 0.0F;
    }
}
Also used : EntityBaldEagle(pokefenn.totemic.entity.animal.EntityBaldEagle)

Aggregations

EntityBaldEagle (pokefenn.totemic.entity.animal.EntityBaldEagle)2 EntityParrot (net.minecraft.entity.passive.EntityParrot)1 WorldServer (net.minecraft.world.WorldServer)1