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
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionDisplayContext(int width, int height, int scale, ElementShader elementShader, ColourScheme colourScheme, PerformanceInfo performance) Creates an instance of aDisplayContextrecord class. -
Method Summary
Modifier 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
-
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
scale
private final int scaleThe field for thescalerecord component. -
elementShader
The field for theelementShaderrecord component. -
colourScheme
The field for thecolourSchemerecord component. -
performance
The field for theperformancerecord component.
-
-
Constructor Details
-
DisplayContext
public DisplayContext(int width, int height, int scale, ElementShader elementShader, ColourScheme colourScheme, PerformanceInfo performance) Creates an instance of aDisplayContextrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentscale- the value for thescalerecord componentelementShader- the value for theelementShaderrecord componentcolourScheme- the value for thecolourSchemerecord componentperformance- the value for theperformancerecord 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 thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
scale
public int scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
elementShader
Returns the value of theelementShaderrecord component.- Returns:
- the value of the
elementShaderrecord component
-
colourScheme
Returns the value of thecolourSchemerecord component.- Returns:
- the value of the
colourSchemerecord component
-
performance
Returns the value of theperformancerecord component.- Returns:
- the value of the
performancerecord component
-