Fix package for ExampleExpectPlatform

This commit is contained in:
shedaniel
2021-11-29 01:44:44 +08:00
parent 7d8a11c58b
commit d885fca336

View File

@@ -1,7 +1,7 @@
package net.examplemod;
import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.platform.Platform;
import @ARCHITECTURY_PACKAGE@.platform.Platform;
import java.nio.file.Path;
@@ -9,13 +9,15 @@ public class ExampleExpectPlatform {
/**
* We can use {@link Platform#getConfigFolder()} but this is just an example of {@link ExpectPlatform}.
* <p>
* This must be a public static method. The platform-implemented solution must be placed under a
* 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#getConfigDirectory()
* Actual Fabric: net.examplemod.fabric.ExampleExpectPlatformImpl#getConfigDirectory()
* Actual Forge: net.examplemod.forge.ExampleExpectPlatformImpl#getConfigDirectory()
* <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 Path getConfigDirectory() {