- Статус
- Оффлайн
- Регистрация
- 27 Апр 2025
- Сообщения
- 391
- Реакции
- 2
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:
- бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
- маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
- приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
- обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.
Спасибо!
рендерит криво я пытался пофиксить но не получилось брух
Я на 1.21.4
ем:
@FunctionAdd(name = "HitBoxESP", alias = "Hit Box ESP", category = Category.Appearance)
public class HitBoxESP extends Function {
public ModeSetting colorMode = new ModeSetting("Цвет", "Из темы", "Из темы", "Свой");
public ColorSetting color = new ColorSetting("Цвет", new Color(133, 166, 255).getRGB());
public SliderSetting width = new SliderSetting("Ширина линий", 1.0f, 0.2f, 5.0f, 0.1f);
public SliderSetting fillAlpha = new SliderSetting("Прозрачность заливки", 0.3f, 0.0f, 1.0f, 0.05f);
public BooleanSetting filled = new BooleanSetting("Заливка", true);
public BooleanSetting themeBased = new BooleanSetting("Брать тему чита", true);
public HitBoxESP() {
addSettings(colorMode, color, width, fillAlpha, filled, themeBased);
}
@EventHandler
public void onRender3D(EventRender3D event) {
RenderSystem.setShader(ShaderProgramKeys.POSITION);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.disableDepthTest();
RenderSystem.disableCull();
RenderSystem.lineWidth(width.get());
Matrix4f matrix = event.getMatrixStack().peek().getPositionMatrix();
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexBuffer = new VertexBuffer(GlUsage.STATIC_WRITE);
for (PlayerEntity player : mc.world.getPlayers()) {
if (player != mc.player && player.isAlive()) {
Vec3d position = player.getPos().subtract(mc.gameRenderer.getCamera().getPos());
float redValue, greenValue, blueValue;
if (themeBased.get()) {
int themeColor = getThemeColor();
redValue = ((themeColor >> 16) & 0xFF) / 255.0f;
greenValue = ((themeColor >> 8) & 0xFF) / 255.0f;
blueValue = (themeColor & 0xFF) / 255.0f;
} else {
Color customColor = new Color(color.get());
redValue = customColor.getRed() / 255.0f;
greenValue = customColor.getGreen() / 255.0f;
blueValue = customColor.getBlue() / 255.0f;
}
float fillAlphaValue = fillAlpha.get();
if (filled.get()) {
RenderSystem.setShaderColor(redValue, greenValue, blueValue, fillAlphaValue);
BufferBuilder bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION);
drawFilledBox(bufferBuilder, position, player.getHeight(), matrix);
BuiltBuffer builtBuffer = bufferBuilder.end();
vertexBuffer.bind();
vertexBuffer.upload(builtBuffer);
vertexBuffer.draw(matrix, RenderSystem.getProjectionMatrix(), RenderSystem.getShader());
builtBuffer.close();
}
RenderSystem.setShaderColor(redValue, greenValue, blueValue, 1.0f);
BufferBuilder bufferBuilder = tessellator.begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION);
drawSquare(bufferBuilder, position, player.getHeight(), matrix);
drawSquare(bufferBuilder, position, 0.0, matrix);
drawVerticalLines(bufferBuilder, position, player.getHeight(), matrix);
BuiltBuffer builtBuffer = bufferBuilder.end();
vertexBuffer.bind();
vertexBuffer.upload(builtBuffer);
vertexBuffer.draw(matrix, RenderSystem.getProjectionMatrix(), RenderSystem.getShader());
builtBuffer.close();
}
}
vertexBuffer.close();
VertexBuffer.unbind();
RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
RenderSystem.disableBlend();
RenderSystem.enableDepthTest();
RenderSystem.enableCull();
}
private void drawFilledBox(BufferBuilder bufferBuilder, Vec3d position, double height, Matrix4f matrix) {
double minX = position.x - 0.33;
double maxX = position.x + 0.33;
double minY = position.y;
double maxY = position.y + height;
double minZ = position.z - 0.33;
double maxZ = position.z + 0.33;
// Нижняя грань
bufferBuilder.vertex(matrix, (float) minX, (float) minY, (float) minZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) minY, (float) minZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) minY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) minX, (float) minY, (float) maxZ);
// Верхняя грань
bufferBuilder.vertex(matrix, (float) minX, (float) maxY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) maxY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) maxY, (float) minZ);
bufferBuilder.vertex(matrix, (float) minX, (float) maxY, (float) minZ);
// Передняя грань
bufferBuilder.vertex(matrix, (float) minX, (float) minY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) minY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) maxY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) minX, (float) maxY, (float) maxZ);
// Задняя грань
bufferBuilder.vertex(matrix, (float) minX, (float) maxY, (float) minZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) maxY, (float) minZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) minY, (float) minZ);
bufferBuilder.vertex(matrix, (float) minX, (float) minY, (float) minZ);
// Левая грань
bufferBuilder.vertex(matrix, (float) minX, (float) minY, (float) minZ);
bufferBuilder.vertex(matrix, (float) minX, (float) minY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) minX, (float) maxY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) minX, (float) maxY, (float) minZ);
// Правая грань
bufferBuilder.vertex(matrix, (float) maxX, (float) maxY, (float) minZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) maxY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) minY, (float) maxZ);
bufferBuilder.vertex(matrix, (float) maxX, (float) minY, (float) minZ);
}
private void drawSquare(BufferBuilder bufferBuilder, Vec3d position, double height, Matrix4f matrix) {
// Верхний квадрат
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) (position.y + height), (float) (position.z - 0.33));
bufferBuilder.vertex(matrix, (float) (position.x + 0.33), (float) (position.y + height), (float) (position.z - 0.33));
bufferBuilder.vertex(matrix, (float) (position.x + 0.33), (float) (position.y + height), (float) (position.z + 0.33));
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) (position.y + height), (float) (position.z + 0.33));
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) (position.y + height), (float) (position.z - 0.33));
// Нижний квадрат
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) position.y, (float) (position.z - 0.33));
bufferBuilder.vertex(matrix, (float) (position.x + 0.33), (float) position.y, (float) (position.z - 0.33));
bufferBuilder.vertex(matrix, (float) (position.x + 0.33), (float) position.y, (float) (position.z + 0.33));
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) position.y, (float) (position.z + 0.33));
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) position.y, (float) (position.z - 0.33));
}
private void drawVerticalLines(BufferBuilder bufferBuilder, Vec3d position, double height, Matrix4f matrix) {
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) position.y, (float) (position.z - 0.33));
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) (position.y + height), (float) (position.z - 0.33));
bufferBuilder.vertex(matrix, (float) (position.x + 0.33), (float) position.y, (float) (position.z - 0.33));
bufferBuilder.vertex(matrix, (float) (position.x + 0.33), (float) (position.y + height), (float) (position.z - 0.33));
bufferBuilder.vertex(matrix, (float) (position.x + 0.33), (float) position.y, (float) (position.z + 0.33));
bufferBuilder.vertex(matrix, (float) (position.x + 0.33), (float) (position.y + height), (float) (position.z + 0.33));
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) position.y, (float) (position.z + 0.33));
bufferBuilder.vertex(matrix, (float) (position.x - 0.33), (float) (position.y + height), (float) (position.z + 0.33));
}
private int getThemeColor() {
return new Color(133, 166, 255).getRGB();
}
}
Последнее редактирование: