Class PartRayTraceResult

java.lang.Object
net.minecraft.world.phys.HitResult
net.minecraft.world.phys.BlockHitResult
codechicken.lib.raytracer.SubHitBlockHitResult
codechicken.multipart.util.PartRayTraceResult
All Implemented Interfaces:
Comparable<codechicken.lib.raytracer.SubHitBlockHitResult>

public class PartRayTraceResult extends codechicken.lib.raytracer.SubHitBlockHitResult implements Comparable<codechicken.lib.raytracer.SubHitBlockHitResult>
A BlockHitResult which has hit a specific part.

Created by covers1624 on 2/9/20.

  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.phys.HitResult

    net.minecraft.world.phys.HitResult.Type
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    The square distance from the ray trace start location to the hit point.
    final net.minecraft.world.phys.BlockHitResult
    The raw BlockHitResult that the part's shape returned.
    final @Nullable net.minecraft.world.phys.shapes.VoxelShape
    The shape of the part that was hit.
    final MultiPart
    The part that was hit.

    Fields inherited from class codechicken.lib.raytracer.SubHitBlockHitResult

    dist, hitInfo, subHit

    Fields inherited from class net.minecraft.world.phys.HitResult

    location
  • Constructor Summary

    Constructors
    Constructor
    Description
    PartRayTraceResult(MultiPart part, codechicken.lib.raytracer.SubHitBlockHitResult hit)
    Deprecated, for removal: This API element is subject to removal in a future version.
    PartRayTraceResult(MultiPart part, codechicken.lib.vec.Vector3 hitVec, net.minecraft.core.Direction faceIn, net.minecraft.core.BlockPos posIn, boolean isInside, Object data, double dist)
    Deprecated, for removal: This API element is subject to removal in a future version.
    PartRayTraceResult(net.minecraft.world.phys.shapes.VoxelShape hitShape, MultiPart part, net.minecraft.world.phys.BlockHitResult hit, net.minecraft.world.phys.Vec3 start)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(codechicken.lib.raytracer.SubHitBlockHitResult o)
     

    Methods inherited from class codechicken.lib.raytracer.SubHitBlockHitResult

    toString, withDirection

    Methods inherited from class net.minecraft.world.phys.BlockHitResult

    getBlockPos, getDirection, getType, isInside, miss, withPosition

    Methods inherited from class net.minecraft.world.phys.HitResult

    distanceTo, getLocation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • hitShape

      @Nullable public final @Nullable net.minecraft.world.phys.shapes.VoxelShape hitShape
      The shape of the part that was hit.
    • part

      public final MultiPart part
      The part that was hit.
    • distance

      public final double distance
      The square distance from the ray trace start location to the hit point.
    • hit

      public final net.minecraft.world.phys.BlockHitResult hit
      The raw BlockHitResult that the part's shape returned.
  • Constructor Details

    • PartRayTraceResult

      public PartRayTraceResult(net.minecraft.world.phys.shapes.VoxelShape hitShape, MultiPart part, net.minecraft.world.phys.BlockHitResult hit, net.minecraft.world.phys.Vec3 start)
    • PartRayTraceResult

      @Deprecated(forRemoval=true) public PartRayTraceResult(MultiPart part, codechicken.lib.raytracer.SubHitBlockHitResult hit)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • PartRayTraceResult

      @Deprecated(forRemoval=true) public PartRayTraceResult(MultiPart part, codechicken.lib.vec.Vector3 hitVec, net.minecraft.core.Direction faceIn, net.minecraft.core.BlockPos posIn, boolean isInside, Object data, double dist)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • compareTo

      public int compareTo(codechicken.lib.raytracer.SubHitBlockHitResult o)
      Specified by:
      compareTo in interface Comparable<codechicken.lib.raytracer.SubHitBlockHitResult>
      Overrides:
      compareTo in class codechicken.lib.raytracer.SubHitBlockHitResult