Class ReplacementDetectionRegistry
java.lang.Object
com.pixelmonmod.pixelmon.api.replacement.ReplacementDetectionRegistry
Registry for custom detection types
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends SpawnDetectionLogic>
Optional<T>Gets a registered type with the given ID Will return an empty optional if it cannot be foundstatic void
register
(Supplier<? extends SpawnDetectionLogic> detectionLogic) Registers a new logic type
-
Field Details
-
REPLACEMENT_DETECTION_LOGIC
-
-
Constructor Details
-
ReplacementDetectionRegistry
public ReplacementDetectionRegistry()
-
-
Method Details
-
get
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
Registers a new logic type- Parameters:
detectionLogic
- A supplier for the logic type
-