Record Class NamedGuiOverlay
java.lang.Object
java.lang.Record
net.minecraftforge.client.gui.overlay.NamedGuiOverlay
An object representation of an 
overlay with a name.
 
 Useful to identify overlays in RenderGuiOverlayEvent.
 
 Users should not be instantiating this themselves. Retrieve from GuiOverlayManager.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ResourceLocationThe field for theidrecord component.private final IGuiOverlayThe field for theoverlayrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionNamedGuiOverlay(ResourceLocation id, IGuiOverlay overlay) Creates an instance of aNamedGuiOverlayrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.overlay()Returns the value of theoverlayrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
idThe field for theidrecord component.
- 
overlayThe field for theoverlayrecord component.
 
- 
- 
Constructor Details- 
NamedGuiOverlayCreates an instance of aNamedGuiOverlayrecord class.- Parameters:
- id- the value for the- idrecord component
- overlay- the value for the- overlayrecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
idReturns the value of theidrecord component.- Returns:
- the value of the idrecord component
 
- 
overlayReturns the value of theoverlayrecord component.- Returns:
- the value of the overlayrecord component
 
 
-