Record Class NumberComparisonTeamPredicate
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.entity.player.team.predicate.NumberComparisonTeamPredicate
- All Implemented Interfaces:
net.minecraft.world.level.storage.loot.LootContextUser,ITeamPredicate
@ParametersAreNonnullByDefault
public record NumberComparisonTeamPredicate(TeamNumberProvider first, TeamNumberProvider second, NumberComparisonLootCondition.Comparison comparison, boolean useInts)
extends Record
implements ITeamPredicate
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.world.entity.player.team.predicate.ITeamPredicate
ITeamPredicate.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<NumberComparisonTeamPredicate> Fields inherited from interface petrolpark.mc.library.core.world.entity.player.team.predicate.ITeamPredicate
DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionNumberComparisonTeamPredicate(TeamNumberProvider first, TeamNumberProvider second, NumberComparisonLootCondition.Comparison comparison, boolean useInts) Creates an instance of aNumberComparisonTeamPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomparisonrecord component.final booleanIndicates whether some other object is "equal to" this one.first()Returns the value of thefirstrecord component.final inthashCode()Returns a hash code value for this object.second()Returns the value of thesecondrecord component.booleanfinal StringtoString()Returns a string representation of this record class.booleanuseInts()Returns the value of theuseIntsrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParams, validate
-
Field Details
-
CODEC
-
-
Constructor Details
-
NumberComparisonTeamPredicate
public NumberComparisonTeamPredicate(TeamNumberProvider first, TeamNumberProvider second, NumberComparisonLootCondition.Comparison comparison, boolean useInts) Creates an instance of aNumberComparisonTeamPredicaterecord class.- Parameters:
first- the value for thefirstrecord componentsecond- the value for thesecondrecord componentcomparison- the value for thecomparisonrecord componentuseInts- the value for theuseIntsrecord component
-
-
Method Details
-
test
- Specified by:
testin interfaceITeamPredicate
-
getTeamPredicateType
- Specified by:
getTeamPredicateTypein interfaceITeamPredicate
-
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 '=='. -
first
Returns the value of thefirstrecord component.- Returns:
- the value of the
firstrecord component
-
second
Returns the value of thesecondrecord component.- Returns:
- the value of the
secondrecord component
-
comparison
Returns the value of thecomparisonrecord component.- Returns:
- the value of the
comparisonrecord component
-
useInts
public boolean useInts()Returns the value of theuseIntsrecord component.- Returns:
- the value of the
useIntsrecord component
-