Package net.minestom.server.registry
Record Class Registry.VillagerProfession
java.lang.Object
java.lang.Record
net.minestom.server.registry.Registry.VillagerProfession
- All Implemented Interfaces:
- Registry.Entry
- Enclosing class:
- Registry
public static record Registry.VillagerProfession(NamespaceID namespace, int id, SoundEvent soundEvent, Registry.Properties custom)
extends Record
implements Registry.Entry
- 
Constructor SummaryConstructorsConstructorDescriptionVillagerProfession(String namespace, Registry.Properties main, Registry.Properties custom) VillagerProfession(NamespaceID namespace, int id, SoundEvent soundEvent, Registry.Properties custom) Creates an instance of aVillagerProfessionrecord class.
- 
Method SummaryModifier and TypeMethodDescriptioncustom()Returns the value of thecustomrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.Returns the value of thenamespacerecord component.Returns the value of thesoundEventrecord component.final StringtoString()Returns a string representation of this record class.
- 
Constructor Details- 
VillagerProfession
- 
VillagerProfessionpublic VillagerProfession(NamespaceID namespace, int id, SoundEvent soundEvent, Registry.Properties custom) Creates an instance of aVillagerProfessionrecord class.- Parameters:
- namespace- the value for the- namespacerecord component
- id- the value for the- idrecord component
- soundEvent- the value for the- soundEventrecord component
- custom- the value for the- customrecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
namespaceReturns the value of thenamespacerecord component.- Returns:
- the value of the namespacerecord component
 
- 
idpublic int id()Returns the value of theidrecord component.- Returns:
- the value of the idrecord component
 
- 
soundEventReturns the value of thesoundEventrecord component.- Returns:
- the value of the soundEventrecord component
 
- 
customReturns the value of thecustomrecord component.- Specified by:
- customin interface- Registry.Entry
- Returns:
- the value of the customrecord component
 
 
-