Record Class DebugSubscription.Update<T>
java.lang.Object
java.lang.Record
net.minecraft.util.debug.DebugSubscription.Update<T>
- Enclosing class:
DebugSubscription<T>
public static record DebugSubscription.Update<T>(DebugSubscription<T> subscription, Optional<T> value)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StreamCodec<RegistryFriendlyByteBuf, DebugSubscription.Update<?>> private final DebugSubscription<T> The field for thesubscriptionrecord component.The field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUpdate(DebugSubscription<T> subscription, Optional<T> value) Creates an instance of aUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.private static <T> StreamCodec<? super RegistryFriendlyByteBuf, DebugSubscription.Update<T>> streamCodec(DebugSubscription<T> subscription) Returns the value of thesubscriptionrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
subscription
The field for thesubscriptionrecord component. -
value
-
STREAM_CODEC
-
-
Constructor Details
-
Update
Creates an instance of aUpdaterecord class.- Parameters:
subscription- the value for thesubscriptionrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
streamCodec
private static <T> StreamCodec<? super RegistryFriendlyByteBuf, DebugSubscription.Update<T>> streamCodec(DebugSubscription<T> subscription) -
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). -
subscription
Returns the value of thesubscriptionrecord component.- Returns:
- the value of the
subscriptionrecord component
-
value
-