-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleExpectPlatform.java
More file actions
24 lines (22 loc) · 981 Bytes
/
ExampleExpectPlatform.java
File metadata and controls
24 lines (22 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package net.examplemod;
import dev.architectury.injectables.annotations.ExpectPlatform;
public class ExampleExpectPlatform {
/**
* an example of {@link ExpectPlatform}.
* <p>
* This must be a <b>public static</b> method. The platform-implemented solution must be placed under a
* platform sub-package, with its class suffixed with {@code Impl}.
* <p>
* Example:
* Expect: net.examplemod.ExampleExpectPlatform#platformName()
* Actual Fabric: net.examplemod.fabric.ExampleExpectPlatformImpl#platformName()
* Actual Forge: net.examplemod.forge.ExampleExpectPlatformImpl#platformName()
* <p>
* <a href="https://plugins.jetbrains.com/plugin/16210-architectury">You should also get the IntelliJ plugin to help with @ExpectPlatform.</a>
*/
@ExpectPlatform
public static String platformName() {
// Just throw an error, the content should get replaced at runtime.
throw new AssertionError();
}
}