Record Class VillagerMeta.VillagerData
java.lang.Object
java.lang.Record
net.minestom.server.entity.metadata.villager.VillagerMeta.VillagerData
- Enclosing class:
VillagerMeta
public static record VillagerMeta.VillagerData(VillagerType type, VillagerProfession profession, VillagerMeta.Level level)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VillagerMeta.VillagerDatastatic final NetworkBuffer.Type<VillagerMeta.VillagerData> -
Constructor Summary
ConstructorsConstructorDescriptionVillagerData(VillagerType type, VillagerProfession profession, VillagerMeta.Level level) Creates an instance of aVillagerDatarecord 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.level()Returns the value of thelevelrecord component.Returns the value of theprofessionrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.withLevel(VillagerMeta.Level level) withProfession(VillagerProfession profession) withType(VillagerType type)
-
Field Details
-
DEFAULT
-
NETWORK_TYPE
-
-
Constructor Details
-
VillagerData
Creates an instance of aVillagerDatarecord class.- Parameters:
type- the value for thetyperecord componentprofession- the value for theprofessionrecord componentlevel- the value for thelevelrecord component
-
-
Method Details
-
withType
-
withProfession
-
withLevel
-
toString
-
hashCode
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
profession
Returns the value of theprofessionrecord component.- Returns:
- the value of the
professionrecord component
-
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-