Record Class CommonEvents.DefaultDataComponents.FilteredEntry
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.core.CommonEvents.DefaultDataComponents.FilteredEntry
- Enclosing class:
CommonEvents.DefaultDataComponents
public static record CommonEvents.DefaultDataComponents.FilteredEntry(Predicate<net.minecraft.world.item.Item> filter, org.apache.logging.log4j.util.TriConsumer<net.minecraft.world.item.Item, net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.core.HolderLookup.Provider> modifier)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionFilteredEntry(Predicate<net.minecraft.world.item.Item> filter, org.apache.logging.log4j.util.TriConsumer<net.minecraft.world.item.Item, net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.core.HolderLookup.Provider> modifier) Creates an instance of aFilteredEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Predicate<net.minecraft.world.item.Item> filter()Returns the value of thefilterrecord component.final inthashCode()Returns a hash code value for this object.org.apache.logging.log4j.util.TriConsumer<net.minecraft.world.item.Item, net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.core.HolderLookup.Provider> modifier()Returns the value of themodifierrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FilteredEntry
public FilteredEntry(Predicate<net.minecraft.world.item.Item> filter, org.apache.logging.log4j.util.TriConsumer<net.minecraft.world.item.Item, net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.core.HolderLookup.Provider> modifier) Creates an instance of aFilteredEntryrecord class.- Parameters:
filter- the value for thefilterrecord componentmodifier- the value for themodifierrecord 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). -
filter
Returns the value of thefilterrecord component.- Returns:
- the value of the
filterrecord component
-
modifier
public org.apache.logging.log4j.util.TriConsumer<net.minecraft.world.item.Item, net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.core.HolderLookup.Provider> modifier()Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-