diff --git a/src/main/java/net/silentclient/client/bridges/MinecraftBridge.java b/src/main/java/net/silentclient/client/bridges/MinecraftBridge.java index 9e25f38..863b4a5 100644 --- a/src/main/java/net/silentclient/client/bridges/MinecraftBridge.java +++ b/src/main/java/net/silentclient/client/bridges/MinecraftBridge.java @@ -43,4 +43,9 @@ public class MinecraftBridge implements IMinecraft { public ITextureManager getTextureManager() { return textureManager; } + + @Override + public boolean isIntegratedServerRunning() { + return Minecraft.getMinecraft().isIntegratedServerRunning(); + } } diff --git a/src/main/java/net/silentclient/clientcommon/Client.java b/src/main/java/net/silentclient/clientcommon/Client.java index beffa08..b3c1a12 100644 --- a/src/main/java/net/silentclient/clientcommon/Client.java +++ b/src/main/java/net/silentclient/clientcommon/Client.java @@ -482,7 +482,7 @@ public class Client { return; } - if(Minecraft.getMinecraft().getCurrentServerData() != null && !Minecraft.getMinecraft().isIntegratedServerRunning()) { + if(Minecraft.getMinecraft().getCurrentServerData() != null && !Client.getWrapper().getMinecraft().isIntegratedServerRunning()) { if(nextPing > 0) { nextPing--; } diff --git a/src/main/java/net/silentclient/clientcommon/types/interfaces/bridges/IMinecraft.java b/src/main/java/net/silentclient/clientcommon/types/interfaces/bridges/IMinecraft.java index 3537f8d..6956b51 100644 --- a/src/main/java/net/silentclient/clientcommon/types/interfaces/bridges/IMinecraft.java +++ b/src/main/java/net/silentclient/clientcommon/types/interfaces/bridges/IMinecraft.java @@ -13,4 +13,5 @@ public interface IMinecraft { void displayGuiScreen(GuiScreen guiScreen); // Как видишь, TextureManager это класс из net.minecraft, поэтому тебе нужно создать обертку ITextureManager getTextureManager(); + boolean isIntegratedServerRunning(); }