Record Class SyncAttachmentsPayload.EntityTarget
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.payload.SyncAttachmentsPayload.EntityTarget
- All Implemented Interfaces:
SyncAttachmentsPayload.Target
- Enclosing class:
SyncAttachmentsPayload
public static record SyncAttachmentsPayload.EntityTarget(int entity)
extends Record
implements SyncAttachmentsPayload.Target
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theentityrecord component.Fields inherited from interface SyncAttachmentsPayload.Target
STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionEntityTarget(int entity) Creates an instance of aEntityTargetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintentity()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.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
entity
private final int entityThe field for theentityrecord component.
-
-
Constructor Details
-
EntityTarget
public EntityTarget(int entity) Creates an instance of aEntityTargetrecord class.- Parameters:
entity- the value for theentityrecord component
-
-
Method Details
-
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 with thecomparemethod from their corresponding wrapper classes. -
entity
public int entity()Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-