Class ReplacementLogicRegistry

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

public class ReplacementLogicRegistry extends Object
Registry containing all the custom replacement logic types
  • Field Details

  • Constructor Details

    • ReplacementLogicRegistry

      public ReplacementLogicRegistry()
  • Method Details

    • get

      public static <T extends SpawnReplacementLogic> 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 SpawnReplacementLogic> replacementLogic)
      Registers a new logic type
      Parameters:
      replacementLogic - A supplier for the logic type