Package vazkii.botania.common.core.helper

Examples of vazkii.botania.common.core.helper.Vector3.multiply()


        newpoints[0] = segment.startpoint;
        newpoints[splits] = segment.endpoint;

        for(int i = 1; i < splits; i++) {
          Vector3 randoff = segment.diff.copy().perpendicular().normalize().rotate(rand.nextFloat() * 360, segment.diff);
          randoff.multiply((rand.nextFloat() - 0.5F) * amount * 2);

          Vector3 basepoint = startpoint.copy().add(subsegment.copy().multiply(i));

          newpoints[i] = new BoltPoint(basepoint, randoff);
        }
View Full Code Here


                  Vector3 magnetVec = tileVec.sub(burstVec).normalize();
                  Vector3 differenceVec = normalMotionVec.sub(magnetVec).multiply(motionVec.mag() * 0.1);

                  Vector3 finalMotionVec = motionVec.sub(differenceVec);
                  if(!magnetized) {
                    finalMotionVec.multiply(0.75);
                    entity.getEntityData().setBoolean("Botania:Magnetized", true);
                    entity.getEntityData().setInteger("Botania:MagnetizedX", tile.xCoord);
                    entity.getEntityData().setInteger("Botania:MagnetizedY", tile.yCoord);
                    entity.getEntityData().setInteger("Botania:MagnetizedZ", tile.zCoord);
                  }
View Full Code Here

    double rc = 0.45;
    thisVec.add((Math.random() - 0.5) * rc, (Math.random() - 0.5) * rc, (Math.random() - 0.5) * rc);
    receiverVec.add((Math.random() - 0.5) * rc, (Math.random() - 0.5) * rc, (Math.random() - 0.5) * rc);

    Vector3 motion = receiverVec.copy().sub(thisVec);
    motion.multiply(0.04F);
    float r = 0.4F + 0.3F * (float) Math.random();
    float g = 0.4F + 0.3F * (float) Math.random();
    float b = 0.4F + 0.3F * (float) Math.random();
    float size = 0.125F + 0.125F * (float) Math.random();

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.