Record Class EntityRaycastResult
java.lang.Object
java.lang.Record
com.zenith.feature.player.raycast.EntityRaycastResult
public record EntityRaycastResult(boolean hit, @Nullable RayIntersection intersection, @Nullable Entity entity)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionEntityRaycastResult(boolean hit, @Nullable RayIntersection intersection, @Nullable Entity entity) Creates an instance of aEntityRaycastResultrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Entityentity()Returns the value of theentityrecord component.@Nullable EntityData@Nullable EntityTypefinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhit()Returns the value of thehitrecord component.@Nullable RayIntersectionReturns the value of theintersectionrecord component.static EntityRaycastResultmiss()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EntityRaycastResult
public EntityRaycastResult(boolean hit, @Nullable RayIntersection intersection, @Nullable Entity entity) Creates an instance of aEntityRaycastResultrecord class.- Parameters:
hit- the value for thehitrecord componentintersection- the value for theintersectionrecord componententity- the value for theentityrecord component
-
-
Method Details
-
miss
-
entityType
-
entityData
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
hit
public boolean hit()Returns the value of thehitrecord component.- Returns:
- the value of the
hitrecord component
-
intersection
Returns the value of theintersectionrecord component.- Returns:
- the value of the
intersectionrecord component
-
entity
Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-