Record Class PictureInPictureRendererRegistration<T extends PictureInPictureRenderState>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.gui.PictureInPictureRendererRegistration<T>
public record PictureInPictureRendererRegistration<T extends PictureInPictureRenderState>(Class<T extends PictureInPictureRenderState> stateClass, Function<MultiBufferSource.BufferSource,PictureInPictureRenderer<T extends PictureInPictureRenderState>> factory)
extends Record
Encapsulates a factory to create
PictureInPictureRenderer and links it to the type of PictureInPictureRenderState
that the created renderers support.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function<MultiBufferSource.BufferSource, PictureInPictureRenderer<T>> The field for thefactoryrecord component.The field for thestateClassrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPictureInPictureRendererRegistration(Class<T> stateClass, Function<MultiBufferSource.BufferSource, PictureInPictureRenderer<T>> factory) Creates an instance of aPictureInPictureRendererRegistrationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.factory()Returns the value of thefactoryrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thestateClassrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
stateClass
The field for thestateClassrecord component. -
factory
private final Function<MultiBufferSource.BufferSource,PictureInPictureRenderer<T extends PictureInPictureRenderState>> factoryThe field for thefactoryrecord component.
-
-
Constructor Details
-
PictureInPictureRendererRegistration
public PictureInPictureRendererRegistration(Class<T> stateClass, Function<MultiBufferSource.BufferSource, PictureInPictureRenderer<T>> factory) Creates an instance of aPictureInPictureRendererRegistrationrecord class.- Parameters:
stateClass- the value for thestateClassrecord componentfactory- the value for thefactoryrecord component
-
-
Method Details
-
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). -
stateClass
Returns the value of thestateClassrecord component.- Returns:
- the value of the
stateClassrecord component
-
factory
Returns the value of thefactoryrecord component.- Returns:
- the value of the
factoryrecord component
-