Record Class TrackedAttachmentImmersiveData<S extends NetworkStorage>
java.lang.Object
java.lang.Record
com.hammy275.immersivemc.server.immersive.TrackedAttachmentImmersiveData<S>
public record TrackedAttachmentImmersiveData<S extends NetworkStorage>(net.minecraft.server.level.ServerPlayer tracker, net.minecraft.server.level.ServerPlayer owner, PlayerAttachmentImmersiveHandler<S extends NetworkStorage> handler)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTrackedAttachmentImmersiveData(net.minecraft.server.level.ServerPlayer tracker, net.minecraft.server.level.ServerPlayer owner, PlayerAttachmentImmersiveHandler<S> handler) Creates an instance of aTrackedAttachmentImmersiveDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.handler()Returns the value of thehandlerrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.server.level.ServerPlayerowner()Returns the value of theownerrecord component.booleanbooleanfinal StringtoString()Returns a string representation of this record class.net.minecraft.server.level.ServerPlayertracker()Returns the value of thetrackerrecord component.
-
Field Details
-
maxDist
public static final double maxDist- See Also:
-
-
Constructor Details
-
TrackedAttachmentImmersiveData
public TrackedAttachmentImmersiveData(net.minecraft.server.level.ServerPlayer tracker, net.minecraft.server.level.ServerPlayer owner, PlayerAttachmentImmersiveHandler<S> handler) Creates an instance of aTrackedAttachmentImmersiveDatarecord class.- Parameters:
tracker- the value for thetrackerrecord componentowner- the value for theownerrecord componenthandler- the value for thehandlerrecord component
-
-
Method Details
-
shouldSync
public boolean shouldSync() -
getSyncPacket
-
stillValid
public boolean stillValid() -
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). -
tracker
public net.minecraft.server.level.ServerPlayer tracker()Returns the value of thetrackerrecord component.- Returns:
- the value of the
trackerrecord component
-
owner
public net.minecraft.server.level.ServerPlayer owner()Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
handler
Returns the value of thehandlerrecord component.- Returns:
- the value of the
handlerrecord component
-