Record Class GoggleComponent
java.lang.Object
java.lang.Record
com.cake.azimuth.goggle.component.GoggleComponent
- Record Components:
modId- owning mod id for generated keyskeySuffix- key suffix under tooltip namespacedefaultEnglish- optional default english string for datagenabsoluteTranslationKey- optional fully-qualified translation key override
public record GoggleComponent(String modId, String keySuffix, @Nullable String defaultEnglish, @Nullable String absoluteTranslationKey)
extends Record
A reusable tooltip component reference.
-
Constructor Summary
ConstructorsConstructorDescriptionGoggleComponent(String modId, String keySuffix, @Nullable String defaultEnglish, @Nullable String absoluteTranslationKey) Creates an instance of aGoggleComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic GoggleComponent@Nullable StringReturns the value of theabsoluteTranslationKeyrecord component.@Nullable StringReturns the value of thedefaultEnglishrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thekeySuffixrecord component.modId()Returns the value of themodIdrecord component.static GoggleComponentfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GoggleComponent
public GoggleComponent(String modId, String keySuffix, @Nullable @Nullable String defaultEnglish, @Nullable @Nullable String absoluteTranslationKey) Creates an instance of aGoggleComponentrecord class.- Parameters:
modId- the value for themodIdrecord componentkeySuffix- the value for thekeySuffixrecord componentdefaultEnglish- the value for thedefaultEnglishrecord componentabsoluteTranslationKey- the value for theabsoluteTranslationKeyrecord component
-
-
Method Details
-
scoped
public static GoggleComponent scoped(String modId, String keySuffix, @Nullable @Nullable String defaultEnglish) -
absolute
-
fullTranslationKey
-
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). -
modId
Returns the value of themodIdrecord component.- Returns:
- the value of the
modIdrecord component
-
keySuffix
Returns the value of thekeySuffixrecord component.- Returns:
- the value of the
keySuffixrecord component
-
defaultEnglish
Returns the value of thedefaultEnglishrecord component.- Returns:
- the value of the
defaultEnglishrecord component
-
absoluteTranslationKey
Returns the value of theabsoluteTranslationKeyrecord component.- Returns:
- the value of the
absoluteTranslationKeyrecord component
-