Package net.minecraft.world.attribute
Record Class EnvironmentAttributeMap.Entry<Value,Argument>
java.lang.Object
java.lang.Record
net.minecraft.world.attribute.EnvironmentAttributeMap.Entry<Value,Argument>
- Enclosing class:
EnvironmentAttributeMap
public static record EnvironmentAttributeMap.Entry<Value,Argument> (Argument argument, AttributeModifier<Value,Argument> modifier)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEntry(Argument argument, AttributeModifier<Value, Argument> modifier) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapplyModifier(Value pValue) argument()Returns the value of theargumentrecord component.private static <Value> com.mojang.serialization.Codec<EnvironmentAttributeMap.Entry<Value, ?>> createCodec(EnvironmentAttribute<Value> pAttribute) private static <Value,Argument>
com.mojang.serialization.MapCodec<EnvironmentAttributeMap.Entry<Value, Argument>> createFullCodec(EnvironmentAttribute<Value> pAttribute, AttributeModifier<Value, Argument> pModifier) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modifier()Returns the value of themodifierrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
argument
The field for theargumentrecord component. -
modifier
The field for themodifierrecord component.
-
-
Constructor Details
-
Entry
Creates an instance of aEntryrecord class.- Parameters:
argument- the value for theargumentrecord componentmodifier- the value for themodifierrecord component
-
-
Method Details
-
createCodec
private static <Value> com.mojang.serialization.Codec<EnvironmentAttributeMap.Entry<Value,?>> createCodec(EnvironmentAttribute<Value> pAttribute) -
createFullCodec
private static <Value,Argument> com.mojang.serialization.MapCodec<EnvironmentAttributeMap.Entry<Value,Argument>> createFullCodec(EnvironmentAttribute<Value> pAttribute, AttributeModifier<Value, Argument> pModifier) -
applyModifier
-
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). -
argument
Returns the value of theargumentrecord component.- Returns:
- the value of the
argumentrecord component
-
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-