Examples of midX()


Examples of com.bergerkiller.bukkit.common.bases.IntVector3.midX()

    double factor = 0.0;
    if (this.alongZ) {
      factor = this.getDirection().getModZ() * (block.midZ() - entity.loc.getZ());
    } else if (this.alongX) {
      factor = this.getDirection().getModX() * (block.midX() - entity.loc.getX());
    }
    double posYAdd = (0.5 - MathUtil.clamp(factor, 0.0, 0.5)) * 2.0;
    entity.loc.y.set(block.y + posYAdd);
    if (posYAdd >= 1.0) {
      // Go to the vertical rail
View Full Code Here

Examples of com.bergerkiller.bukkit.common.bases.IntVector3.midX()

    double posYAdd = (0.5 - MathUtil.clamp(factor, 0.0, 0.5)) * 2.0;
    entity.loc.y.set(block.y + posYAdd);
    if (posYAdd >= 1.0) {
      // Go to the vertical rail
      entity.loc.y.add(1.0);
      entity.loc.x.set(block.midX());
      entity.loc.z.set(block.midZ());
      // Turn velocity to the vertical type
      entity.vel.y.set(entity.vel.xz.length());
      entity.vel.xz.setZero();
    }
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.