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 Summary
Modifier and TypeFieldDescriptionprivate final ColourScheme
The field for thecolourScheme
record component.private final ElementShader
The field for theelementShader
record component.private final int
The field for theheight
record component.private final PerformanceInfo
The field for theperformance
record component.private final int
The field for thescale
record component.private final int
The field for thewidth
record component. -
Constructor Summary
ConstructorDescriptionDisplayContext
(int width, int height, int scale, ElementShader elementShader, ColourScheme colourScheme, PerformanceInfo performance) Creates an instance of aDisplayContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecolourScheme
record component.Returns the value of theelementShader
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.Returns the value of theperformance
record component.int
scale()
Returns the value of thescale
record component.int
int
final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.
-
Field Details
-
width
private final int widthThe field for thewidth
record component. -
height
private final int heightThe field for theheight
record component. -
scale
private final int scaleThe field for thescale
record component. -
elementShader
The field for theelementShader
record component. -
colourScheme
The field for thecolourScheme
record component. -
performance
The field for theperformance
record component.
-
-
Constructor Details
-
DisplayContext
public DisplayContext(int width, int height, int scale, ElementShader elementShader, ColourScheme colourScheme, PerformanceInfo performance) Creates an instance of aDisplayContext
record class.- Parameters:
width
- the value for thewidth
record componentheight
- the value for theheight
record componentscale
- the value for thescale
record componentelementShader
- the value for theelementShader
record componentcolourScheme
- the value for thecolourScheme
record componentperformance
- the value for theperformance
record component
-
-
Method Details
-
scaledWidth
public int scaledWidth() -
scaledHeight
public int scaledHeight() -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
scale
public int scale()Returns the value of thescale
record component.- Returns:
- the value of the
scale
record component
-
elementShader
Returns the value of theelementShader
record component.- Returns:
- the value of the
elementShader
record component
-
colourScheme
Returns the value of thecolourScheme
record component.- Returns:
- the value of the
colourScheme
record component
-
performance
Returns the value of theperformance
record component.- Returns:
- the value of the
performance
record component
-