Search in sources :

Example 6 with EntityJuicer

use of micdoodle8.mods.galacticraft.planets.venus.entities.EntityJuicer in project Galacticraft by micdoodle8.

the class ModelJuicer method setRotationAngles.

@Override
public void setRotationAngles(float f1, float f2, float f3, float f4, float f5, float f6, Entity entityIn) {
    EntityJuicer juicer = (EntityJuicer) entityIn;
    super.setRotationAngles(f1, f2, f3, f4, f5, f6, entityIn);
    float movement = f1;
    float increment = -1.0F;
    float offset = 0.5F;
    this.legLeftFront1.rotateAngleY = MathHelper.cos(movement) * 0.2F + offset;
    this.legLeftFront1.rotateAngleZ = (float) (-Math.PI / 3.0F);
    this.legLeftFront2.rotateAngleY = MathHelper.cos(movement) * 0.5F + offset;
    this.legLeftFront2.rotateAngleZ = (float) (2 * Math.PI / 3.0F);
    offset = 0.05F;
    movement += increment;
    this.legLeftMidFront1.rotateAngleY = MathHelper.cos(movement) * 0.2F + offset;
    this.legLeftMidFront1.rotateAngleZ = (float) (-Math.PI / 3.0F);
    this.legLeftMidFront2.rotateAngleY = MathHelper.cos(movement) * 0.5F + offset;
    this.legLeftMidFront2.rotateAngleZ = (float) (2 * Math.PI / 3.0F);
    offset = -0.1F;
    movement += increment;
    this.legLeftMidBack1.rotateAngleY = MathHelper.cos(movement) * 0.2F + offset;
    this.legLeftMidBack1.rotateAngleZ = (float) (-Math.PI / 3.0F);
    this.legLeftMidBack2.rotateAngleY = MathHelper.cos(movement) * 0.5F + offset;
    this.legLeftMidBack2.rotateAngleZ = (float) (2 * Math.PI / 3.0F);
    offset = -0.5F;
    movement += increment;
    this.legLeftBack1.rotateAngleY = MathHelper.cos(movement) * 0.2F + offset;
    this.legLeftBack1.rotateAngleZ = (float) (-Math.PI / 3.0F);
    this.legLeftBack2.rotateAngleY = MathHelper.cos(movement) * 0.5F + offset;
    this.legLeftBack2.rotateAngleZ = (float) (2 * Math.PI / 3.0F);
    this.copyLegAngles(legLeftFront1, legLeftFront2);
    this.copyLegAngles(legLeftMidFront1, legLeftMidFront2);
    this.copyLegAngles(legLeftMidBack1, legLeftMidBack2);
    this.copyLegAngles(legLeftBack1, legLeftBack2);
    this.copyLegAngles(legRightFront1, legRightFront2);
    this.copyLegAngles(legRightMidFront1, legRightMidFront2);
    this.copyLegAngles(legRightMidBack1, legRightMidBack2);
    this.copyLegAngles(legRightBack1, legRightBack2);
    this.copyLeg1LeftToRight(legLeftFront1, legRightFront1);
    this.copyLeg1LeftToRight(legLeftMidFront1, legRightMidFront1);
    this.copyLeg1LeftToRight(legLeftMidBack1, legRightMidBack1);
    this.copyLeg1LeftToRight(legLeftBack1, legRightBack1);
    this.copyLeftToRight(legLeftFront2, legRightFront2);
    this.copyLeftToRight(legLeftMidFront2, legRightMidFront2);
    this.copyLeftToRight(legLeftMidBack2, legRightMidBack2);
    this.copyLeftToRight(legLeftBack2, legRightBack2);
    this.tail0.rotationPointY = -1.5F;
    this.tail0.offsetY = 0.0F;
    // this.tail0.rotateAngleX = MathHelper.cos(movement) * 0.2F + 0.5205006F;
    this.tail0.rotateAngleX = juicer.attackingPlayer != null ? 0.52F : 0.1F;
    this.tail0.rotateAngleY = 0.0F;
    this.tail0.rotateAngleZ = 0.0F;
    this.tail1.rotateAngleX = juicer.attackingPlayer != null ? 2.659407F : 2.7F;
    this.tail1.rotationPointZ = 4 * (MathHelper.sin(this.tail0.rotateAngleZ) + MathHelper.cos(this.tail0.rotateAngleY));
    this.tail1.rotationPointY = 0.5F;
    this.tail1.rotationPointX = 0.0F;
    this.stinger.rotateAngleX = -this.tail0.rotateAngleX - (this.tail0.rotateAngleX - 2.659407F) - 0.5205006F;
    this.stinger.rotationPointZ = 4 * (MathHelper.sin(this.tail1.rotateAngleZ) + MathHelper.cos(this.tail1.rotateAngleY));
    this.stinger.rotationPointY = 0.5F;
    this.stinger.rotationPointX = 0.0F;
}
Also used : EntityJuicer(micdoodle8.mods.galacticraft.planets.venus.entities.EntityJuicer)

Aggregations

EntityJuicer (micdoodle8.mods.galacticraft.planets.venus.entities.EntityJuicer)6 EntityPlayer (net.minecraft.entity.player.EntityPlayer)3 AxisAlignedBB (net.minecraft.util.math.AxisAlignedBB)2 RenderManager (net.minecraft.client.renderer.entity.RenderManager)1 Entity (net.minecraft.entity.Entity)1 EntityLivingBase (net.minecraft.entity.EntityLivingBase)1 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)1 EntityArrow (net.minecraft.entity.projectile.EntityArrow)1 PotionEffect (net.minecraft.potion.PotionEffect)1 World (net.minecraft.world.World)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 WorldProviderNibiru (stevekung.mods.moreplanets.module.planets.nibiru.dimension.WorldProviderNibiru)1 PacketSimpleMP (stevekung.mods.moreplanets.network.PacketSimpleMP)1 IMeteorType (stevekung.mods.moreplanets.world.IMeteorType)1