Record Class ProfessionEntry
java.lang.Object
java.lang.Record
com.mrbysco.justenoughprofessions.jei.ProfessionEntry
- Record Components:
professionHolder- The professionHolderblockStacks- The workstation blocks for the professionHolder
-
Constructor Summary
ConstructorsConstructorDescriptionProfessionEntry(net.minecraft.core.Holder<net.minecraft.world.entity.npc.villager.VillagerProfession> professionHolder, List<net.minecraft.world.item.ItemStack> blockStacks) Creates an instance of aProfessionEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.world.item.ItemStack> Returns the value of theblockStacksrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.world.entity.npc.villager.VillagerGet the villager entity for the professionHolderfinal inthashCode()Returns a hash code value for this object.net.minecraft.core.Holder<net.minecraft.world.entity.npc.villager.VillagerProfession> Returns the value of theprofessionHolderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ProfessionEntry
public ProfessionEntry(net.minecraft.core.Holder<net.minecraft.world.entity.npc.villager.VillagerProfession> professionHolder, List<net.minecraft.world.item.ItemStack> blockStacks) Creates an instance of aProfessionEntryrecord class.- Parameters:
professionHolder- the value for theprofessionHolderrecord componentblockStacks- the value for theblockStacksrecord component
-
-
Method Details
-
getVillagerEntity
@Nullable public @Nullable net.minecraft.world.entity.npc.villager.Villager getVillagerEntity()Get the villager entity for the professionHolder- Returns:
- The Villager entity
-
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). -
professionHolder
public net.minecraft.core.Holder<net.minecraft.world.entity.npc.villager.VillagerProfession> professionHolder()Returns the value of theprofessionHolderrecord component.- Returns:
- the value of the
professionHolderrecord component
-
blockStacks
Returns the value of theblockStacksrecord component.- Returns:
- the value of the
blockStacksrecord component
-