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 Details

    • INSTANCE

      public static Comparator<net.minecraft.core.component.DataComponentMap> 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 interface Comparator<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)