Class DataComparator
java.lang.Object
org.cyclops.commoncapabilities.ingredient.DataComparator
- All Implemented Interfaces:
Comparator<net.minecraft.core.component.DataComponentMap>
public class DataComparator
extends Object
implements Comparator<net.minecraft.core.component.DataComponentMap>
A comparator implementation for Data Components.
-
Field Summary
Modifier and TypeFieldDescriptionstatic Comparator
<net.minecraft.core.component.DataComponentMap> A comparator for Data Components. -
Constructor Summary
ConstructorDescriptionDataComparator
(Set<net.minecraft.resources.ResourceLocation> ignoreDataComponentTypes) -
Method Summary
Modifier and TypeMethodDescriptionint
compare
(net.minecraft.core.component.DataComponentMap o1, net.minecraft.core.component.DataComponentMap o2) protected int
compare
(net.minecraft.core.component.DataComponentMap o1, net.minecraft.core.component.DataComponentMap o2, Set<net.minecraft.resources.ResourceLocation> ignoreDataComponentTypes) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
INSTANCE
A comparator for Data Components. (This is set in GeneralConfig)
-
-
Constructor Details
-
DataComparator
public DataComparator(@Nullable Set<net.minecraft.resources.ResourceLocation> ignoreDataComponentTypes)
-
-
Method Details
-
compare
public int compare(net.minecraft.core.component.DataComponentMap o1, net.minecraft.core.component.DataComponentMap o2) - Specified by:
compare
in interfaceComparator<net.minecraft.core.component.DataComponentMap>
-
compare
protected int compare(net.minecraft.core.component.DataComponentMap o1, net.minecraft.core.component.DataComponentMap o2, @Nullable Set<net.minecraft.resources.ResourceLocation> ignoreDataComponentTypes)
-