Package net.minecraft.src

Examples of net.minecraft.src.Vec3D


    int l1 = MathHelper.floor_double(explosionY + (double) explosionSize + 1.0D);
    int i2 = MathHelper.floor_double(explosionZ - (double) explosionSize - 1.0D);
    int j2 = MathHelper.floor_double(explosionZ + (double) explosionSize + 1.0D);
    List list = worldObj.getEntitiesWithinAABBExcludingEntity(exploder,
        AxisAlignedBB.getBoundingBoxFromPool(k, k1, i2, i1, l1, j2));
    Vec3D vec3d = Vec3D.createVector(explosionX, explosionY, explosionZ);

    for (int k2 = 0; k2 < list.size(); k2++) {
      Entity entity = (Entity) list.get(k2);
      double d4 = entity.getDistance(explosionX, explosionY, explosionZ)
          / (double) explosionSize;
View Full Code Here


            }
        } else
        {
            ticksInAir++;
        }
        Vec3D vec3d = Vec3D.createVector(posX, posY, posZ);
        Vec3D vec3d1 = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
        MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks(vec3d, vec3d1);
        vec3d = Vec3D.createVector(posX, posY, posZ);
        vec3d1 = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
        if(movingobjectposition != null)
        {
View Full Code Here

    public boolean attackEntityFrom(DamageSource damagesource, int i)
    {
        setBeenAttacked();
        if(damagesource.getEntity() != null)
        {
            Vec3D vec3d = damagesource.getEntity().getLookVec();
            if(vec3d != null)
            {
                motionX = vec3d.xCoord;
                motionY = vec3d.yCoord;
                motionZ = vec3d.zCoord;
View Full Code Here

    int l1 = MathHelper.floor_double(explosionY + (double) explosionSize + 1.0D);
    int i2 = MathHelper.floor_double(explosionZ - (double) explosionSize - 1.0D);
    int j2 = MathHelper.floor_double(explosionZ + (double) explosionSize + 1.0D);
    List list = worldObj.getEntitiesWithinAABBExcludingEntity(exploder,
        AxisAlignedBB.getBoundingBoxFromPool(k, k1, i2, i1, l1, j2));
    Vec3D vec3d = Vec3D.createVector(explosionX, explosionY, explosionZ);

    for (int k2 = 0; k2 < list.size(); k2++) {
      Entity entity = (Entity) list.get(k2);
      double d4 = entity.getDistance(explosionX, explosionY, explosionZ)
          / (double) explosionSize;
View Full Code Here

        setDead();
      }
      return;
    }
    ticksInAir++;
    Vec3D vec3d = Vec3D.createVector(posX, posY, posZ);
    Vec3D vec3d1 = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
    MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks_do_do(vec3d, vec3d1,
        false, true);
    vec3d = Vec3D.createVector(posX, posY, posZ);
    vec3d1 = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
    if (movingobjectposition != null) {
View Full Code Here

      d11 = 50D;
    }
    if (d11 < -50D) {
      d11 = -50D;
    }
    Vec3D vec3d = Vec3D.createVector(targetX - posX, targetY - posY,
        targetZ - posZ).normalize();
    Vec3D vec3d1 = Vec3D.createVector(
        MathHelper.sin((rotationYaw * 3.141593F) / 180F), motionY,
        -MathHelper.cos((rotationYaw * 3.141593F) / 180F))
        .normalize();
    float f18 = (float) (vec3d1.dotProduct(vec3d) + 0.5D) / 1.5F;
    if (f18 < 0.0F) {
      f18 = 0.0F;
    }
    randomYawVelocity *= 0.8F;
    float f19 = MathHelper.sqrt_double(motionX * motionX + motionZ
        * motionZ) * 1.0F + 1.0F;
    double d14 = Math.sqrt(motionX * motionX + motionZ * motionZ) * 1.0D + 1.0D;
    if (d14 > 40D) {
      d14 = 40D;
    }
    randomYawVelocity += d11
        * (0.69999998807907104D / d14 / (double) f19);
    rotationYaw += randomYawVelocity * 0.1F;
    float f20 = (float) (2D / (d14 + 1.0D));
    float f21 = 0.06F;
    moveFlying(0.0F, -1F, f21 * (f18 * f20 + (1.0F - f20)));
    if (differentMotion) {
      moveEntity(motionX * 0.80000001192092896D,
          motionY * 0.80000001192092896D,
          motionZ * 0.80000001192092896D);
    } else {
      moveEntity(motionX, motionY, motionZ);
    }
    Vec3D vec3d2 = Vec3D.createVector(motionX, motionY, motionZ)
        .normalize();
    float f22 = (float) (vec3d2.dotProduct(vec3d1) + 1.0D) / 2.0F;
    f22 = 0.8F + 0.15F * f22;
    motionX *= f22;
    motionZ *= f22;
    motionY *= 0.9100000262260437D;
    renderYawOffset = rotationYaw;
View Full Code Here

  }

  // Unknown method
  private void func_41007_az() {
    if (ticksExisted % 20 == 0) {
      Vec3D vec3d = getLook(1.0F);
      double d = 0.0D;
      double d1 = -1D;
      double d2 = 0.0D;
    }
  }
View Full Code Here

            - (dragonHead.posY + (double) (dragonHead.height / 2.0F) - 10);
        double d7 = targetedEntity.posZ - dragonHead.posZ;
        Fireball entityfireball = new Fireball(worldObj, this, d5, d6,
            d7);
        double d8 = 2D;
        Vec3D vec3d = getLook(1.0F);
        entityfireball.posX = dragonHead.posX + vec3d.xCoord * d8;
        entityfireball.posY = dragonHead.posY - 2;
          //  + (double) (dragonHead.height / 2.0F) + 0.5D;
        entityfireball.posZ = dragonHead.posZ + vec3d.zCoord * d8;
        for (int x = 0; x < 3; x++)
View Full Code Here

TOP

Related Classes of net.minecraft.src.Vec3D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.