net.minecraft.util

## Class MovingObjectPosition

- java.lang.Object
- - net.minecraft.util.MovingObjectPosition

-     public class MovingObjectPosition
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `blockX` x coordinate of the block ray traced against
    `int` | `blockY` y coordinate of the block ray traced against
    `int` | `blockZ` z coordinate of the block ray traced against
    `Entity` | `entityHit` The hit entity
    `Object` | `hitInfo` Used to add extra hit info
    `Vec3` | `hitVec` The vector position of the hit
    `int` | `sideHit` Which side was hit.
    `int` | `subHit` Used to determine what sub-segment is hit
    `EnumMovingObjectType` | `typeOfHit` What type of ray trace hit was this? 0 = block, 1 = entity

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MovingObjectPosition(Entity par1Entity)`
    `MovingObjectPosition(int par1, int par2, int par3, int par4, Vec3 par5Vec3)`

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### typeOfHit

          public EnumMovingObjectType typeOfHit

      What type of ray trace hit was this? 0 = block, 1 = entity

    - #### blockX

          public int blockX

      x coordinate of the block ray traced against

    - #### blockY

          public int blockY

      y coordinate of the block ray traced against

    - #### blockZ

          public int blockZ

      z coordinate of the block ray traced against

    - #### sideHit

          public int sideHit

      Which side was hit. If its -1 then it went the full length of the ray trace. Bottom = 0, Top = 1, East = 2, West = 3, North = 4, South = 5.

    - #### hitVec

          public Vec3 hitVec

      The vector position of the hit

    - #### entityHit

          public Entity entityHit

      The hit entity

    - #### subHit

          public int subHit

      Used to determine what sub-segment is hit

    - #### hitInfo

          public Object hitInfo

      Used to add extra hit info

  - ### Constructor Detail

    - #### MovingObjectPosition

          public MovingObjectPosition(int par1,
                              int par2,
                              int par3,
                              int par4,
                              Vec3 par5Vec3)

    - #### MovingObjectPosition

          public MovingObjectPosition(Entity par1Entity)