Record Class LookAt.LookAtEntity
java.lang.Object
java.lang.Record
net.minecraft.server.commands.LookAt.LookAtEntity
- All Implemented Interfaces:
LookAt
- Enclosing interface:
LookAt
public static record LookAt.LookAtEntity(Entity entity, EntityAnchorArgument.Anchor anchor)
extends Record
implements LookAt
-
Nested Class Summary
Nested classes/interfaces inherited from interface LookAt
LookAt.LookAtEntity, LookAt.LookAtPosition -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EntityAnchorArgument.AnchorThe field for theanchorrecord component.private final EntityThe field for theentityrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLookAtEntity(Entity entity, EntityAnchorArgument.Anchor anchor) Creates an instance of aLookAtEntityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionanchor()Returns the value of theanchorrecord component.entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidperform(CommandSourceStack source, Entity target) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
entity
The field for theentityrecord component. -
anchor
The field for theanchorrecord component.
-
-
Constructor Details
-
LookAtEntity
Creates an instance of aLookAtEntityrecord class.- Parameters:
entity- the value for theentityrecord componentanchor- the value for theanchorrecord component
-
-
Method Details
-
perform
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
entity
Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-
anchor
Returns the value of theanchorrecord component.- Returns:
- the value of the
anchorrecord component
-