Record Class ItemGuideColorData
java.lang.Object
java.lang.Record
com.hammy275.immersivemc.common.config.ItemGuideColorData
- Record Components:
colors- Supplier of a list of colors to transition between for item guides.selectedColors- Supplier of a list of colors to transition between for selected item guides.rangedGrabColors- Supplier of a list of colors to transition between for ranged grab particles.transitionTimeMS- Supplier of the time to transition between colors in the list in milliseconds. Should be a constant time!
public record ItemGuideColorData(Supplier<List<RGBA>> colors, Supplier<List<RGBA>> selectedColors, Supplier<List<RGBA>> rangedGrabColors, Supplier<Integer> transitionTimeMS)
extends Record
Contains the data for item guide coloring.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolors()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.static ItemGuideColorDatastatic ItemGuideColorDataReturns the value of therangedGrabColorsrecord component.Returns the value of theselectedColorsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransitionTimeMSrecord component.withChangedTransitionTime(int newTransitionTimeMS)
-
Field Details
-
DEFAULT_CUSTOM
-
-
Constructor Details
-
ItemGuideColorData
public ItemGuideColorData(Supplier<List<RGBA>> colors, Supplier<List<RGBA>> selectedColors, Supplier<List<RGBA>> rangedGrabColors, Supplier<Integer> transitionTimeMS) Creates an instance of aItemGuideColorDatarecord class.- Parameters:
colors- the value for thecolorsrecord componentselectedColors- the value for theselectedColorsrecord componentrangedGrabColors- the value for therangedGrabColorsrecord componenttransitionTimeMS- the value for thetransitionTimeMSrecord component
-
-
Method Details
-
of
-
of
-
withChangedTransitionTime
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
colors
Returns the value of thecolorsrecord component.- Returns:
- the value of the
colorsrecord component
-
selectedColors
Returns the value of theselectedColorsrecord component.- Returns:
- the value of the
selectedColorsrecord component
-
rangedGrabColors
Returns the value of therangedGrabColorsrecord component.- Returns:
- the value of the
rangedGrabColorsrecord component
-
transitionTimeMS
Returns the value of thetransitionTimeMSrecord component.- Returns:
- the value of the
transitionTimeMSrecord component
-