-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Fabric entrypoint to allow other mods to register providers safely.
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
common/src/main/java/li/cil/tis3d/api/platform/FabricProviderInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package li.cil.tis3d.api.platform; | ||
|
||
/** | ||
* Fabric specific interface, used to define an entrypoint that is invoked when all | ||
* TIS-3D owned registries have been created, and entries may be registered with | ||
* them. This is Fabric's approach to allowing ordered initialization. For Forge this | ||
* is not required, since it allows declaring mod initialization ordering. | ||
*/ | ||
public interface FabricProviderInitializer { | ||
/** | ||
* Registers providers with provider registries. | ||
*/ | ||
void registerProviders(); | ||
} |
7 changes: 7 additions & 0 deletions
7
common/src/main/java/li/cil/tis3d/api/platform/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@ParametersAreNonnullByDefault | ||
@MethodsReturnNonnullByDefault | ||
package li.cil.tis3d.api.platform; | ||
|
||
import net.minecraft.MethodsReturnNonnullByDefault; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters