Record Class AnimalMoodModifier
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.entity.animal.mood.AnimalMoodModifier
public record AnimalMoodModifier(net.minecraft.advancements.critereon.EntityPredicate predicate, EntityNumberProvider value, String translationKey, List<StringProvider> translationArgs)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<AnimalMoodModifier>> static final com.mojang.serialization.Codec<AnimalMoodModifier> static final com.mojang.serialization.Codec<AnimalMoodModifier> -
Constructor Summary
ConstructorsConstructorDescriptionAnimalMoodModifier(net.minecraft.advancements.critereon.EntityPredicate predicate, EntityNumberProvider value, String translationKey, List<StringProvider> translationArgs) Creates an instance of aAnimalMoodModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.advancements.critereon.EntityPredicateReturns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationArgsrecord component.Returns the value of thetranslationKeyrecord component.value()Returns the value of thevaluerecord component.
-
Field Details
-
UNVALIDATED_DIRECT_CODEC
-
DIRECT_CODEC
-
CODEC
public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<AnimalMoodModifier>> CODEC
-
-
Constructor Details
-
AnimalMoodModifier
public AnimalMoodModifier(net.minecraft.advancements.critereon.EntityPredicate predicate, EntityNumberProvider value, String translationKey, List<StringProvider> translationArgs) Creates an instance of aAnimalMoodModifierrecord class.- Parameters:
predicate- the value for thepredicaterecord componentvalue- the value for thevaluerecord componenttranslationKey- the value for thetranslationKeyrecord componenttranslationArgs- the value for thetranslationArgsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
predicate
public net.minecraft.advancements.critereon.EntityPredicate predicate()Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
translationKey
Returns the value of thetranslationKeyrecord component.- Returns:
- the value of the
translationKeyrecord component
-
translationArgs
Returns the value of thetranslationArgsrecord component.- Returns:
- the value of the
translationArgsrecord component
-