Record Class RenderElement.DisplayContext
java.lang.Object
java.lang.Record
net.minecraftforge.fml.earlydisplay.RenderElement.DisplayContext
- Enclosing class:
- RenderElement
public static record RenderElement.DisplayContext(int width, int height, int scale, ElementShader elementShader, ColourScheme colourScheme, PerformanceInfo performance)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ColourSchemeThe field for thecolourSchemerecord component.private final ElementShaderThe field for theelementShaderrecord component.private final intThe field for theheightrecord component.private final PerformanceInfoThe field for theperformancerecord component.private final intThe field for thescalerecord component.private final intThe field for thewidthrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionDisplayContext(int width, int height, int scale, ElementShader elementShader, ColourScheme colourScheme, PerformanceInfo performance) Creates an instance of aDisplayContextrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thecolourSchemerecord component.Returns the value of theelementShaderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.Returns the value of theperformancerecord component.intscale()Returns the value of thescalerecord component.intintfinal StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
- 
Field Details- 
widthprivate final int widthThe field for thewidthrecord component.
- 
heightprivate final int heightThe field for theheightrecord component.
- 
scaleprivate final int scaleThe field for thescalerecord component.
- 
elementShaderThe field for theelementShaderrecord component.
- 
colourSchemeThe field for thecolourSchemerecord component.
- 
performanceThe field for theperformancerecord component.
 
- 
- 
Constructor Details- 
DisplayContextpublic DisplayContext(int width, int height, int scale, ElementShader elementShader, ColourScheme colourScheme, PerformanceInfo performance) Creates an instance of aDisplayContextrecord class.- Parameters:
- width- the value for the- widthrecord component
- height- the value for the- heightrecord component
- scale- the value for the- scalerecord component
- elementShader- the value for the- elementShaderrecord component
- colourScheme- the value for the- colourSchemerecord component
- performance- the value for the- performancerecord component
 
 
- 
- 
Method Details- 
scaledWidthpublic int scaledWidth()
- 
scaledHeightpublic int scaledHeight()
- 
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
widthpublic int width()Returns the value of thewidthrecord component.- Returns:
- the value of the widthrecord component
 
- 
heightpublic int height()Returns the value of theheightrecord component.- Returns:
- the value of the heightrecord component
 
- 
scalepublic int scale()Returns the value of thescalerecord component.- Returns:
- the value of the scalerecord component
 
- 
elementShaderReturns the value of theelementShaderrecord component.- Returns:
- the value of the elementShaderrecord component
 
- 
colourSchemeReturns the value of thecolourSchemerecord component.- Returns:
- the value of the colourSchemerecord component
 
- 
performanceReturns the value of theperformancerecord component.- Returns:
- the value of the performancerecord component
 
 
-