Package net.minecraft.server

Examples of net.minecraft.server.MovingObjectPosition


   * @param endY to stop ray tracing (outer limit)
   * @param endZ to stop ray tracing (outer limit)
   * @return the hit Block, or null if none was found (AIR)
   */
  public static Block rayTraceBlock(org.bukkit.World world, double startX, double startY, double startZ, double endX, double endY, double endZ) {
    MovingObjectPosition mop = CommonNMS.getNative(world).rayTrace(CommonNMS.newVec3D(startX, startY, startZ),
        CommonNMS.newVec3D(endX, endY, endZ), false);
    return mop == null ? null : world.getBlockAt(mop.b, mop.c, mop.d);
  }
View Full Code Here

TOP

Related Classes of net.minecraft.server.MovingObjectPosition

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.