Package net.minecraft.world.entity.npc
Record Class VillagerProfession
java.lang.Object
java.lang.Record
net.minecraft.world.entity.npc.VillagerProfession
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe field for theacquirableJobSiterecord component.static final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionThe field for theheldJobSiterecord component.static final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionprivate final StringThe field for thenamerecord component.static final VillagerProfessionstatic final VillagerProfessionprivate final com.google.common.collect.ImmutableSet<Item>The field for therequestedItemsrecord component.private final com.google.common.collect.ImmutableSet<Block>The field for thesecondaryPoirecord component.static final VillagerProfessionstatic final VillagerProfessionstatic final VillagerProfessionprivate final SoundEventThe field for theworkSoundrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionVillagerProfession(String name, Predicate<Holder<PoiType>> heldJobSite, Predicate<Holder<PoiType>> acquirableJobSite, com.google.common.collect.ImmutableSet<Item> requestedItems, com.google.common.collect.ImmutableSet<Block> secondaryPoi, SoundEvent workSound) Creates an instance of aVillagerProfessionrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theacquirableJobSiterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theheldJobSiterecord component.name()Returns the value of thenamerecord component.private static VillagerProfessionregister(String p_219659_, Predicate<Holder<PoiType>> p_219660_, Predicate<Holder<PoiType>> p_219661_, com.google.common.collect.ImmutableSet<Item> p_219662_, com.google.common.collect.ImmutableSet<Block> p_219663_, SoundEvent p_219664_) private static VillagerProfessionregister(String p_219654_, Predicate<Holder<PoiType>> p_219655_, Predicate<Holder<PoiType>> p_219656_, SoundEvent p_219657_) private static VillagerProfessionregister(String p_219648_, ResourceKey<PoiType> p_219649_, com.google.common.collect.ImmutableSet<Item> p_219650_, com.google.common.collect.ImmutableSet<Block> p_219651_, SoundEvent p_219652_) private static VillagerProfessionregister(String p_219644_, ResourceKey<PoiType> p_219645_, SoundEvent p_219646_) com.google.common.collect.ImmutableSet<Item>Returns the value of therequestedItemsrecord component.com.google.common.collect.ImmutableSet<Block>Returns the value of thesecondaryPoirecord component.toString()Returns a string representation of this record class.Returns the value of theworkSoundrecord component.
- 
Field Details- 
nameThe field for thenamerecord component.
- 
heldJobSiteThe field for theheldJobSiterecord component.
- 
acquirableJobSiteThe field for theacquirableJobSiterecord component.
- 
requestedItemsThe field for therequestedItemsrecord component.
- 
secondaryPoiThe field for thesecondaryPoirecord component.
- 
workSoundThe field for theworkSoundrecord component.
- 
ALL_ACQUIRABLE_JOBS
- 
NONE
- 
ARMORER
- 
BUTCHER
- 
CARTOGRAPHER
- 
CLERIC
- 
FARMER
- 
FISHERMAN
- 
FLETCHER
- 
LEATHERWORKER
- 
LIBRARIAN
- 
MASON
- 
NITWIT
- 
SHEPHERD
- 
TOOLSMITH
- 
WEAPONSMITH
 
- 
- 
Constructor Details- 
VillagerProfessionpublic VillagerProfession(String name, Predicate<Holder<PoiType>> heldJobSite, Predicate<Holder<PoiType>> acquirableJobSite, com.google.common.collect.ImmutableSet<Item> requestedItems, com.google.common.collect.ImmutableSet<Block> secondaryPoi, @Nullable SoundEvent workSound) Creates an instance of aVillagerProfessionrecord class.- Parameters:
- name- the value for the- namerecord component
- heldJobSite- the value for the- heldJobSiterecord component
- acquirableJobSite- the value for the- acquirableJobSiterecord component
- requestedItems- the value for the- requestedItemsrecord component
- secondaryPoi- the value for the- secondaryPoirecord component
- workSound- the value for the- workSoundrecord 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.
- 
registerprivate static VillagerProfession register(String p_219644_, ResourceKey<PoiType> p_219645_, @Nullable SoundEvent p_219646_) 
- 
registerprivate static VillagerProfession register(String p_219654_, Predicate<Holder<PoiType>> p_219655_, Predicate<Holder<PoiType>> p_219656_, @Nullable SoundEvent p_219657_) 
- 
registerprivate static VillagerProfession register(String p_219648_, ResourceKey<PoiType> p_219649_, com.google.common.collect.ImmutableSet<Item> p_219650_, com.google.common.collect.ImmutableSet<Block> p_219651_, @Nullable SoundEvent p_219652_) 
- 
register
- 
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. All components in this record class are compared withObjects::equals(Object,Object).
- 
nameReturns the value of thenamerecord component.- Returns:
- the value of the namerecord component
 
- 
heldJobSiteReturns the value of theheldJobSiterecord component.- Returns:
- the value of the heldJobSiterecord component
 
- 
acquirableJobSiteReturns the value of theacquirableJobSiterecord component.- Returns:
- the value of the acquirableJobSiterecord component
 
- 
requestedItemsReturns the value of therequestedItemsrecord component.- Returns:
- the value of the requestedItemsrecord component
 
- 
secondaryPoiReturns the value of thesecondaryPoirecord component.- Returns:
- the value of the secondaryPoirecord component
 
- 
workSoundReturns the value of theworkSoundrecord component.- Returns:
- the value of the workSoundrecord component
 
 
-