public class ReplacementDetectionRegistry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Map<java.lang.String,java.util.function.Supplier<SpawnDetectionLogic>> |
REPLACEMENT_DETECTION_LOGIC |
Constructor and Description |
---|
ReplacementDetectionRegistry() |
Modifier and Type | Method and Description |
---|---|
static <T extends SpawnDetectionLogic> |
get(java.lang.String type)
Gets a registered type with the given ID
Will return an empty optional if it cannot be found
|
static void |
register(java.util.function.Supplier<? extends SpawnDetectionLogic> detectionLogic)
Registers a new logic type
|
public static final java.util.Map<java.lang.String,java.util.function.Supplier<SpawnDetectionLogic>> REPLACEMENT_DETECTION_LOGIC
public static <T extends SpawnDetectionLogic> java.util.Optional<T> get(java.lang.String type)
T
- The class typetype
- The typepublic static void register(java.util.function.Supplier<? extends SpawnDetectionLogic> detectionLogic)
detectionLogic
- A supplier for the logic type