diff --git a/src/main/java/dev/micle/xptools/proxy/Proxy.java b/src/main/java/dev/micle/xptools/proxy/Proxy.java index 58ea058..48e864d 100644 --- a/src/main/java/dev/micle/xptools/proxy/Proxy.java +++ b/src/main/java/dev/micle/xptools/proxy/Proxy.java @@ -8,6 +8,8 @@ import net.minecraft.client.Minecraft; import net.minecraft.server.MinecraftServer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.AddReloadListenerEvent; import net.minecraftforge.event.server.ServerStartedEvent; @@ -83,11 +85,13 @@ public class Proxy implements IProxy { private static void postSetup(FMLLoadCompleteEvent event) {} @Override + @OnlyIn(Dist.CLIENT) public Player getClientPlayer() { return Minecraft.getInstance().player; } @Override + @OnlyIn(Dist.CLIENT) public Level getClientLevel() { return Minecraft.getInstance().level; } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 46b12e7..83094ab 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -12,7 +12,7 @@ displayName = "${mod_name}" #logoFile="xp_tools.png" #credits="" authors = "${mod_authors}" -#displayTest="MATCH_VERSION" # MATCH_VERSION, IGNORE_SERVER_VERSION (server only), IGNORE_ALL_VERSION (client only), NONE (IExtensionPoint.DisplayTest) +displayTest="IGNORE_SERVER_VERSION" # MATCH_VERSION, IGNORE_SERVER_VERSION (server only), IGNORE_ALL_VERSION (client only), NONE (IExtensionPoint.DisplayTest) description = '''${mod_description}''' [[dependencies."${mod_id}"]]