Class MinecartComparatorLogicRegistry

java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.entity.MinecartComparatorLogicRegistry

public final class MinecartComparatorLogicRegistry extends Object
  • Method Details

    • getCustomComparatorLogic

      @Nullable public static @Nullable MinecartComparatorLogic<AbstractMinecartEntity> getCustomComparatorLogic(EntityType<?> type)
      Gets the registered custom comparator logic for the specified minecart entity type.
      Parameters:
      type - the entity type
      Returns:
      the comparator logic, or null if not registered
    • register

      public static <T extends AbstractMinecartEntity> void register(EntityType<T> type, MinecartComparatorLogic<? super T> logic)
      Registers a comparator logic for a minecart entity type.

      Registering a second value for an entity type will replace the old logic.

      Type Parameters:
      T - the handled minecart type
      Parameters:
      type - the minecart entity type
      logic - the logic to register