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 thefactory
record component.The field for thestateClass
record component. -
Constructor Summary
ConstructorsConstructorDescriptionPictureInPictureRendererRegistration
(Class<T> stateClass, Function<MultiBufferSource.BufferSource, PictureInPictureRenderer<T>> factory) Creates an instance of aPictureInPictureRendererRegistration
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.factory()
Returns the value of thefactory
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thestateClass
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
stateClass
The field for thestateClass
record component. -
factory
private final Function<MultiBufferSource.BufferSource,PictureInPictureRenderer<T extends PictureInPictureRenderState>> factoryThe field for thefactory
record component.
-
-
Constructor Details
-
PictureInPictureRendererRegistration
public PictureInPictureRendererRegistration(Class<T> stateClass, Function<MultiBufferSource.BufferSource, PictureInPictureRenderer<T>> factory) Creates an instance of aPictureInPictureRendererRegistration
record class.- Parameters:
stateClass
- the value for thestateClass
record componentfactory
- the value for thefactory
record 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 thestateClass
record component.- Returns:
- the value of the
stateClass
record component
-
factory
Returns the value of thefactory
record component.- Returns:
- the value of the
factory
record component
-