Record Class RecruitmentItemsListener.RecruitCost
java.lang.Object
java.lang.Record
com.minecolonies.core.datalistener.RecruitmentItemsListener.RecruitCost
- Record Components:
boots- the boots the visitor will wear.recruitItem- the item to recruit with.recruitLevel- the recruitLevel of the given item.
- Enclosing class:
- RecruitmentItemsListener
public static record RecruitmentItemsListener.RecruitCost(net.minecraft.world.item.ItemStack recruitItem, int recruitLevel, net.minecraft.world.item.ItemStack boots)
extends Record
A recruit cost item.
-
Constructor Summary
ConstructorsConstructorDescriptionRecruitCost(net.minecraft.world.item.ItemStack recruitItem, int recruitLevel, net.minecraft.world.item.ItemStack boots) Creates an instance of aRecruitCostrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackboots()Returns the value of thebootsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.ItemStackReturns the value of therecruitItemrecord component.intReturns the value of therecruitLevelrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecruitCost
public RecruitCost(net.minecraft.world.item.ItemStack recruitItem, int recruitLevel, net.minecraft.world.item.ItemStack boots) Creates an instance of aRecruitCostrecord class.- Parameters:
recruitItem- the value for therecruitItemrecord componentrecruitLevel- the value for therecruitLevelrecord componentboots- the value for thebootsrecord component
-
-
Method Details
-
toString
Returns 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. -
hashCode
public 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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
recruitItem
public net.minecraft.world.item.ItemStack recruitItem()Returns the value of therecruitItemrecord component.- Returns:
- the value of the
recruitItemrecord component
-
recruitLevel
public int recruitLevel()Returns the value of therecruitLevelrecord component.- Returns:
- the value of the
recruitLevelrecord component
-
boots
public net.minecraft.world.item.ItemStack boots()Returns the value of thebootsrecord component.- Returns:
- the value of the
bootsrecord component
-