кидай дс
package im.expensive.utils.client;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
public class PingUtil implements IMinecraft {
public static String calculateBPS() {
return String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * (double) mc.timer.timerSpeed * 20.0D);
}
public static void drawItemStack(ItemStack stack, float x, float y, boolean withoutOverlay, boolean scale, float scaleValue) {
RenderSystem.pushMatrix();
RenderSystem.translatef(x, y, 0);
if (scale) GL11.glScaled(scaleValue, scaleValue, scaleValue);
mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, 0, 0);
if (withoutOverlay) mc.getItemRenderer().renderItemOverlays(mc.fontRenderer, stack, 0, 0);
RenderSystem.popMatrix();
}
public static int calculatePing() {
return mc.player.connection.getPlayerInfo(mc.player.getUniqueID()) != null ?
mc.player.connection.getPlayerInfo(mc.player.getUniqueID()).getResponseTime() : 0;
}
public static String serverIP() {
return mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP != null && !mc.isSingleplayer() ? mc.getCurrentServerData().serverIP : "";
}
}
Это утилка пинг кому надо