Record Class ComponentModifiers.Definition
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.helper.ComponentModifiers.Definition
- Enclosing class:
ComponentModifiers
public static record ComponentModifiers.Definition(ExtensibleCodecBase.Entry<Predicate<net.minecraft.world.item.ItemStack>> predicate, Map<net.minecraft.core.component.DataComponentType<?>, Object> components)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ComponentModifiers.Definition> -
Constructor Summary
ConstructorsConstructorDescriptionDefinition(ExtensibleCodecBase.Entry<Predicate<net.minecraft.world.item.ItemStack>> predicate, Map<net.minecraft.core.component.DataComponentType<?>, Object> components) Creates an instance of aDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.ExtensibleCodecBase.Entry<Predicate<net.minecraft.world.item.ItemStack>> Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Definition
public Definition(ExtensibleCodecBase.Entry<Predicate<net.minecraft.world.item.ItemStack>> predicate, Map<net.minecraft.core.component.DataComponentType<?>, Object> components) Creates an instance of aDefinitionrecord class.- Parameters:
predicate- the value for thepredicaterecord componentcomponents- the value for thecomponentsrecord component
-
-
Method Details
-
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). -
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
components
-