Package net.minecraft.server

Examples of net.minecraft.server.Vec3D


   * @param explosionPosition of the explosion
   * @param entity that was damaged
   * @return damage factor
   */
  public static float getExplosionDamageFactor(Location explosionPosition, org.bukkit.entity.Entity entity) {
    final Vec3D vec = (Vec3D) Conversion.toVec3DHandle.convert(explosionPosition);
    return CommonNMS.getNative(explosionPosition.getWorld()).a(vec, CommonNMS.getNative(entity).boundingBox);
  }
View Full Code Here


    public CommonPacket newInstance(double x, double y, double z, float radius, List<IntVector3> blocks) {
      return newInstance(x, y, z, radius, blocks, null);
    }

    public CommonPacket newInstance(double x, double y, double z, float radius, List<IntVector3> blocks, Vector pushedForce) {
      Vec3D vec = pushedForce == null ? null : Vec3D.a(pushedForce.getX(), pushedForce.getY(), pushedForce.getZ());
      return constructor1.newInstance(x, y, z, radius, blocks, vec);
    }
View Full Code Here

  public static Object newVec(double x, double y, double z) {
    return CommonNMS.newVec3D(x, y, z);
  }

  public static Vector getVec(Object vec3D) {
    Vec3D vec = (Vec3D) vec3D;
    return new Vector(vec.a, vec.b, vec.c);
  }
View Full Code Here

TOP

Related Classes of net.minecraft.server.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.