Package net.minecraft.util.debug
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> pSubscription) 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
The field for thevaluerecord component. -
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> pSubscription) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-