Package codechicken.multipart.util
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
FieldsModifier and TypeFieldDescriptionfinal doubleThe square distance from the ray trace start location to the hit point.final net.minecraft.world.phys.BlockHitResultThe rawBlockHitResultthat the part's shape returned.final @Nullable net.minecraft.world.phys.shapes.VoxelShapeThe shape of the part that was hit.final MultiPartThe part that was hit.Fields inherited from class codechicken.lib.raytracer.SubHitBlockHitResult
dist, hitInfo, subHitFields inherited from class net.minecraft.world.phys.HitResult
location -
Constructor Summary
ConstructorsConstructorDescriptionPartRayTraceResult(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 TypeMethodDescriptionintcompareTo(codechicken.lib.raytracer.SubHitBlockHitResult o) Methods inherited from class codechicken.lib.raytracer.SubHitBlockHitResult
toString, withDirectionMethods inherited from class net.minecraft.world.phys.BlockHitResult
getBlockPos, getDirection, getType, isInside, miss, withPositionMethods inherited from class net.minecraft.world.phys.HitResult
distanceTo, getLocation
-
Field Details
-
hitShape
@Nullable public final @Nullable net.minecraft.world.phys.shapes.VoxelShape hitShapeThe shape of the part that was hit. -
part
The part that was hit. -
distance
public final double distanceThe square distance from the ray trace start location to the hit point. -
hit
public final net.minecraft.world.phys.BlockHitResult hitThe rawBlockHitResultthat 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:
compareToin interfaceComparable<codechicken.lib.raytracer.SubHitBlockHitResult>- Overrides:
compareToin classcodechicken.lib.raytracer.SubHitBlockHitResult
-