Record Class MobTrophyInfo
java.lang.Object
java.lang.Record
com.viaversion.viaaprilfools.api.minecraft.item.MobTrophyInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.viaversion.viaversion.api.type.Type<MobTrophyInfo> -
Constructor Summary
ConstructorsConstructorDescriptionMobTrophyInfo(com.viaversion.viaversion.api.minecraft.Holder<String> type, boolean shiny) Creates an instance of aMobTrophyInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanshiny()Returns the value of theshinyrecord component.final StringtoString()Returns a string representation of this record class.com.viaversion.viaversion.api.minecraft.Holder<String>type()Returns the value of thetyperecord component.
-
Field Details
-
TYPE
-
-
Constructor Details
-
MobTrophyInfo
Creates an instance of aMobTrophyInforecord class.- Parameters:
type- the value for thetyperecord componentshiny- the value for theshinyrecord component
-
-
Method Details
-
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
shiny
public boolean shiny()Returns the value of theshinyrecord component.- Returns:
- the value of the
shinyrecord component
-