Class ReplacementDetectionRegistry

java.lang.Object
com.pixelmonmod.pixelmon.api.replacement.ReplacementDetectionRegistry

public class ReplacementDetectionRegistry extends Object
Registry for custom detection types
  • Field Details

  • Constructor Details

    • ReplacementDetectionRegistry

      public ReplacementDetectionRegistry()
  • Method Details

    • get

      public static <T extends SpawnDetectionLogic> Optional<T> get(String type)
      Gets a registered type with the given ID Will return an empty optional if it cannot be found
      Type Parameters:
      T - The class type
      Parameters:
      type - The type
      Returns:
      An optional containing a new instance of the given type
    • register

      public static void register(Supplier<? extends SpawnDetectionLogic> detectionLogic)
      Registers a new logic type
      Parameters:
      detectionLogic - A supplier for the logic type