Record Class MobVisibility
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.MobVisibility
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMobVisibility(HolderSet targetingEntityTypes, float visibility) Creates an instance of aMobVisibilityrecord 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.Returns the value of thetargetingEntityTypesrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thevisibilityrecord component.
-
Field Details
-
TYPE
-
-
Constructor Details
-
MobVisibility
Creates an instance of aMobVisibilityrecord class.- Parameters:
targetingEntityTypes- the value for thetargetingEntityTypesrecord componentvisibility- the value for thevisibilityrecord 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 '=='. -
targetingEntityTypes
Returns the value of thetargetingEntityTypesrecord component.- Returns:
- the value of the
targetingEntityTypesrecord component
-
visibility
public float visibility()Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-