Class Lodestone
java.lang.Object
dev.jaxydog.lodestone.Lodestone
- All Implemented Interfaces:
net.fabricmc.api.ModInitializer
Lodestone's common entrypoint.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Loaded>
voidcreateEnvironment(Class<? extends T> type, Consumer<? super T> load) Creates and registers a new environment for the givenLoadedinterface.Returns a set containing all registered interface instances.static <T extends Loaded>
voidLoads the target environment for the given mod identifier.static <T extends Loaded>
voidLoads the target environment for the given mod identifier.static <T extends Loaded>
voidload(Class<? extends T> type, Collection<String> modIds) Loads the target environment for the given mod identifier.static <T extends Loaded>
voidLoads the target environment for the given mod identifier.voidstatic <T extends Loaded>
voidregister(Class<? extends T> type, Collection<? extends T> values) Registers the given values for automatic registration.static <T extends Loaded>
voidRegisters the given values for automatic registration.static <T extends Loaded>
voidRegisters a value for automatic registration.static <T extends Loaded>
voidRegisters the given values for automatic registration.
-
Constructor Details
-
Lodestone
public Lodestone()Creates a new instance of this entrypoint.- Since:
- 1.5.3
-
-
Method Details
-
createEnvironment
-
getInterfaces
-
register
-
register
Registers the given values for automatic registration. -
register
-
register
public static <T extends Loaded> void register(Class<? extends T> type, Collection<? extends T> values) Registers the given values for automatic registration. -
load
-
load
public static <T extends Loaded> void load(Class<? extends T> type, String... modIds) throws IllegalArgumentException Loads the target environment for the given mod identifier.- Type Parameters:
T- The type of theLoadedinterface.- Parameters:
type- TheLoadedinterface.modIds- The requesting mod's identifiers.- Throws:
IllegalArgumentException- If the given list of mod identifiers is empty.- Since:
- 1.0.0
-
load
public static <T extends Loaded> void load(Class<? extends T> type, Iterator<String> modIds) throws IllegalArgumentException Loads the target environment for the given mod identifier.- Type Parameters:
T- The type of theLoadedinterface.- Parameters:
type- TheLoadedinterface.modIds- The requesting mod's identifiers.- Throws:
IllegalArgumentException- If the given list of mod identifiers is empty.- Since:
- 1.0.0
-
load
public static <T extends Loaded> void load(Class<? extends T> type, Collection<String> modIds) throws IllegalArgumentException Loads the target environment for the given mod identifier.- Type Parameters:
T- The type of theLoadedinterface.- Parameters:
type- TheLoadedinterface.modIds- The requesting mod's identifiers.- Throws:
IllegalArgumentException- If the given list of mod identifiers is empty.- Since:
- 1.0.0
-
onInitialize
public void onInitialize()- Specified by:
onInitializein interfacenet.fabricmc.api.ModInitializer
-