isIntegratedServerRunning bridge

This commit is contained in:
kirillsaint 2023-11-09 00:27:20 +06:00
parent c1eab8a9fb
commit b2413b8b82
3 changed files with 7 additions and 1 deletions

View File

@ -43,4 +43,9 @@ public class MinecraftBridge implements IMinecraft {
public ITextureManager getTextureManager() {
return textureManager;
}
@Override
public boolean isIntegratedServerRunning() {
return Minecraft.getMinecraft().isIntegratedServerRunning();
}
}

View File

@ -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--;
}

View File

@ -13,4 +13,5 @@ public interface IMinecraft {
void displayGuiScreen(GuiScreen guiScreen);
// Как видишь, TextureManager это класс из net.minecraft, поэтому тебе нужно создать обертку
ITextureManager getTextureManager();
boolean isIntegratedServerRunning();
}