public class ReplacementLogicRegistry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static com.google.gson.Gson |
GSON |
static java.util.Map<java.lang.String,java.util.function.Supplier<SpawnReplacementLogic>> |
SPAWN_REPLACEMENT_LOGIC |
Constructor and Description |
---|
ReplacementLogicRegistry() |
Modifier and Type | Method and Description |
---|---|
static <T extends SpawnReplacementLogic> |
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 SpawnReplacementLogic> replacementLogic)
Registers a new logic type
|
public static final com.google.gson.Gson GSON
public static final java.util.Map<java.lang.String,java.util.function.Supplier<SpawnReplacementLogic>> SPAWN_REPLACEMENT_LOGIC
public static <T extends SpawnReplacementLogic> java.util.Optional<T> get(java.lang.String type)
T
- The class typetype
- The typepublic static void register(java.util.function.Supplier<? extends SpawnReplacementLogic> replacementLogic)
replacementLogic
- A supplier for the logic type