Record Class ConfigEffect.Context
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcore.api.config.client.ConfigEffect.Context
- Record Components:
mouseX- the mouse, in GUI pixels; -1 (both) while a popup redraws the page under ittime- seconds since the game started, for animating without keeping statepartialTick- how far between ticks this frame isinWorld- whether a world is open (the screen shows it, blurred)
- Enclosing interface:
ConfigEffect
public static record ConfigEffect.Context(int width, int height, int mouseX, int mouseY, float time, float partialTick, ConfigTheme theme, ConfigColorScheme colors, ConfigTheme.Mode mode, boolean inWorld)
extends Record
The screen being drawn.
-
Constructor Summary
ConstructorsConstructorDescriptionContext(int width, int height, int mouseX, int mouseY, float time, float partialTick, ConfigTheme theme, ConfigColorScheme colors, ConfigTheme.Mode mode, boolean inWorld) Creates an instance of aContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintaccent()The accent color of the current mode, ARGB.colors()Returns the value of thecolorsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhasMouse()Whether the mouse is over the screen (not a popup's redraw of the page under it).intheight()Returns the value of theheightrecord component.booleaninWorld()Returns the value of theinWorldrecord component.mode()Returns the value of themoderecord component.intmouseX()Returns the value of themouseXrecord component.intmouseY()Returns the value of themouseYrecord component.floatReturns the value of thepartialTickrecord component.theme()Returns the value of thethemerecord component.floattime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
Context
public Context(int width, int height, int mouseX, int mouseY, float time, float partialTick, ConfigTheme theme, ConfigColorScheme colors, ConfigTheme.Mode mode, boolean inWorld) Creates an instance of aContextrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentmouseX- the value for themouseXrecord componentmouseY- the value for themouseYrecord componenttime- the value for thetimerecord componentpartialTick- the value for thepartialTickrecord componenttheme- the value for thethemerecord componentcolors- the value for thecolorsrecord componentmode- the value for themoderecord componentinWorld- the value for theinWorldrecord component
-
-
Method Details
-
accent
public int accent()The accent color of the current mode, ARGB. -
hasMouse
public boolean hasMouse()Whether the mouse is over the screen (not a popup's redraw of the page under it). -
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
-
mouseX
public int mouseX()Returns the value of themouseXrecord component.- Returns:
- the value of the
mouseXrecord component
-
mouseY
public int mouseY()Returns the value of themouseYrecord component.- Returns:
- the value of the
mouseYrecord component
-
time
public float time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
partialTick
public float partialTick()Returns the value of thepartialTickrecord component.- Returns:
- the value of the
partialTickrecord component
-
theme
Returns the value of thethemerecord component.- Returns:
- the value of the
themerecord component
-
colors
Returns the value of thecolorsrecord component.- Returns:
- the value of the
colorsrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
inWorld
public boolean inWorld()Returns the value of theinWorldrecord component.- Returns:
- the value of the
inWorldrecord component
-