Record Class VillagerProfessionImpl
java.lang.Object
java.lang.Record
net.minestom.server.entity.VillagerProfessionImpl
- All Implemented Interfaces:
Keyed, VillagerProfession, Holder<VillagerProfession>, RegistryKey<VillagerProfession>, StaticProtocolObject<VillagerProfession>
public record VillagerProfessionImpl(RegistryData.VillagerProfessionEntry registry)
extends Record
implements VillagerProfession
-
Nested Class Summary
Nested classes/interfaces inherited from interface Holder
Holder.Direct<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionFields inherited from interface VillagerProfession
NBT_TYPE, NETWORK_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aVillagerProfessionImplrecord 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.registry()Returns the value of theregistryrecord component.toString()Returns a string representation of this record class.Methods inherited from interface StaticProtocolObject
nameMethods inherited from interface VillagerProfession
id, key
-
Field Details
-
NONE
-
ARMORER
-
BUTCHER
-
CARTOGRAPHER
-
CLERIC
-
FARMER
-
FISHERMAN
-
FLETCHER
-
LEATHERWORKER
-
LIBRARIAN
-
MASON
-
NITWIT
-
SHEPHERD
-
TOOLSMITH
-
WEAPONSMITH
-
-
Constructor Details
-
VillagerProfessionImpl
Creates an instance of aVillagerProfessionImplrecord class.- Parameters:
registry- the value for theregistryrecord component
-
-
Method Details
-
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). -
registry
Returns the value of theregistryrecord component.- Specified by:
registryin interfaceStaticProtocolObject<VillagerProfession>- Specified by:
registryin interfaceVillagerProfession- Returns:
- the value of the
registryrecord component
-