Начинающий
- Статус
- Оффлайн
- Регистрация
- 24 Июл 2024
- Сообщения
- 78
- Реакции
- 4
- Выберите загрузчик игры
- Fabric
Вспомнил про модуль крутой пенис есп со времен 1.12.2, думаю легко можно его перенести.
База использована была моя Strange Visuals для нахождения каких нибудь методов если не хватает посмотрите я где-то выкладывал сурс.
video:
База использована была моя Strange Visuals для нахождения каких нибудь методов если не хватает посмотрите я где-то выкладывал сурс.
video:
Penis ESP:
package ru.strange.client.module.impl.world;
import com.mojang.blaze3d.pipeline.BlendFunction;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.platform.DepthTestFunction;
import com.mojang.blaze3d.vertex.VertexFormat;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.RenderPipelines;
import net.minecraft.client.render.*;
import net.minecraft.client.util.BufferAllocator;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.Vec3d;
import org.joml.Matrix4f;
import org.joml.Quaternionf;
import ru.strange.client.event.EventInit;
import ru.strange.client.event.impl.EventChangeWorld;
import ru.strange.client.event.impl.EventRender3D;
import ru.strange.client.module.api.Category;
import ru.strange.client.module.api.IModule;
import ru.strange.client.module.api.Module;
import ru.strange.client.module.api.setting.impl.HueSetting;
import ru.strange.client.module.api.setting.impl.ModeSetting;
import ru.strange.client.utils.render.RenderUtil;
import java.awt.*;
import java.util.List;
import java.util.OptionalDouble;
import java.util.Random;
import java.util.stream.Collectors;
@IModule(
name = "PenisESP",
description = "Рендерит пенис",
category = Category.World,
bind = -1
)
public class PenisESP extends Module {
public static HueSetting colorSetting = new HueSetting("Цвет", new Color(100, 200, 255));
public static ModeSetting colorMode = new ModeSetting("Режим цвета", "Client", "Client", "RGB", "Astolfo", "Random");
private static final int LINE_BUFFER_SIZE_BYTES = 1 << 12;
private static final RenderPipeline PIPELINE = RenderPipelines.register(
RenderPipeline.builder(RenderPipelines.POSITION_COLOR_SNIPPET)
.withLocation(Identifier.of("strange", "penis_esp_lines"))
.withVertexFormat(VertexFormats.POSITION_COLOR, VertexFormat.DrawMode.DEBUG_LINES)
.withCull(false)
.withDepthTestFunction(DepthTestFunction.LEQUAL_DEPTH_TEST)
.withDepthWrite(false)
.withBlend(BlendFunction.TRANSLUCENT)
.build()
);
private static final RenderLayer LAYER = RenderLayer.of(
"strange_penis_esp",
LINE_BUFFER_SIZE_BYTES,
false,
true,
PIPELINE,
RenderLayer.MultiPhaseParameters.builder()
.lineWidth(new RenderLayer.LineWidth(OptionalDouble.of(1.5)))
.build(false)
);
private final Random RANDOM = new Random();
private final MinecraftClient mc = MinecraftClient.getInstance();
@EventInit
public void onWorldChange(EventChangeWorld e) {
}
@EventInit
public void onRender3D(EventRender3D e) {
if (mc.world == null || mc.player == null) return;
float partialTicks = e.getTickDelta();
MatrixStack matrices = e.getMatrixStack();
Vec3d cameraPos = mc.gameRenderer.getCamera().getPos();
BufferAllocator allocator = new BufferAllocator(1 << 18);
VertexConsumerProvider.Immediate immediate = VertexConsumerProvider.immediate(allocator);
try {
VertexConsumer buffer = immediate.getBuffer(LAYER);
List<LivingEntity> entities = mc.world.getPlayers().stream()
.filter(LivingEntity::isAlive)
.filter(ent -> ent.distanceTo(mc.player) <= 12.0f)
.collect(Collectors.toList());
for (LivingEntity entity : entities) {
int color = getColorForMode(colorMode.get(), colorSetting);
double x = entity.lastRenderX + (entity.getX() - entity.lastRenderX) * partialTicks;
double y = entity.lastRenderY + (entity.getY() - entity.lastRenderY) * partialTicks + entity.getHeight() * 0.32;
double z = entity.lastRenderZ + (entity.getZ() - entity.lastRenderZ) * partialTicks;
Vec3d basePos = new Vec3d(x, y, z);
matrices.push();
matrices.translate(
basePos.x - cameraPos.x,
basePos.y - cameraPos.y,
basePos.z - cameraPos.z
);
Quaternionf rot = new Quaternionf().rotateY((float) Math.toRadians(-entity.getYaw()));
matrices.multiply(rot);
float length = entity == mc.player ? 0.35f : 0.2f;
renderPenis(buffer, matrices, Vec3d.ZERO, 1, color);
matrices.pop();
}
immediate.draw();
} finally {
allocator.close();
}
}
private int getColorForMode(String mode, HueSetting colorSetting) {
return switch (mode) {
case "RGB" -> RenderUtil.ColorUtil.rainbow(10, 0, 1f, 1f, 1f);
case "Astolfo" -> RenderUtil.ColorUtil.skyRainbow(25, 0);
case "Random" -> Color.getHSBColor(RANDOM.nextFloat(), 1f, 1f).getRGB();
default -> colorSetting.getRGB();
};
}
private void renderPenis(VertexConsumer buffer, MatrixStack matrices, Vec3d pos, float length, int color) {
float shaftRadius = 0.11f;
float ballRadius = 0.16f;
// --- Цилиндр ---
matrices.push();
matrices.translate(0, 0.15, 0.2);
matrices.multiply(new Quaternionf().rotateX((float)Math.toRadians(90)));
renderWireCylinder(buffer, matrices.peek().getPositionMatrix(), Vec3d.ZERO, shaftRadius, length, 20, color);
matrices.pop();
// --- Левое яйцо ---
matrices.push();
matrices.translate(-0.14, 0.15, 0.2);
matrices.multiply(new Quaternionf().rotateX((float)Math.toRadians(90)));
renderWireSphere(buffer, matrices.peek().getPositionMatrix(), Vec3d.ZERO, ballRadius, 10, 16, color, Vec3d.ZERO);
matrices.pop();
// --- Правое яйцо ---
matrices.push();
matrices.translate(0.14, 0.15, 0.2);
matrices.multiply(new Quaternionf().rotateX((float)Math.toRadians(90)));
renderWireSphere(buffer, matrices.peek().getPositionMatrix(), Vec3d.ZERO, ballRadius, 10, 16, color, Vec3d.ZERO);
matrices.pop();
// --- Головка ---
matrices.push();
matrices.translate(0, 0.15, length + 0.03f + 0.2);
matrices.multiply(new Quaternionf().rotateX((float)Math.toRadians(90)));
renderWireSphere(buffer, matrices.peek().getPositionMatrix(), Vec3d.ZERO, 0.12f, 10, 16, color, Vec3d.ZERO);
matrices.pop();
}
private void renderWireCylinder(VertexConsumer buffer, Matrix4f matrix,
Vec3d center, float radius, float height,
int segments, int color) {
int r = RenderUtil.ColorUtil.red(color);
int g = RenderUtil.ColorUtil.green(color);
int b = RenderUtil.ColorUtil.blue(color);
int a = RenderUtil.ColorUtil.alpha(color);
for (int i = 0; i < segments; i++) {
double theta1 = 2 * Math.PI * i / segments;
double theta2 = 2 * Math.PI * (i + 1) / segments;
float x1 = (float)(radius * Math.cos(theta1));
float z1 = (float)(radius * Math.sin(theta1));
float x2 = (float)(radius * Math.cos(theta2));
float z2 = (float)(radius * Math.sin(theta2));
buffer.vertex(matrix, x1, 0, z1).color(r,g,b,a);
buffer.vertex(matrix, x2, 0, z2).color(r,g,b,a);
buffer.vertex(matrix, x1, height, z1).color(r,g,b,a);
buffer.vertex(matrix, x2, height, z2).color(r,g,b,a);
buffer.vertex(matrix, x1, 0, z1).color(r,g,b,a);
buffer.vertex(matrix, x1, height, z1).color(r,g,b,a);
}
}
private void renderWireSphere(VertexConsumer buffer, Matrix4f matrix, Vec3d center,
float radius, int latitudeSegments, int longitudeSegments, int color, Vec3d cameraPos) {
int r = RenderUtil.ColorUtil.red(color);
int g = RenderUtil.ColorUtil.green(color);
int b = RenderUtil.ColorUtil.blue(color);
int a = RenderUtil.ColorUtil.alpha(color);
for (int i = 0; i <= latitudeSegments; i++) {
double phi = Math.PI * i / latitudeSegments;
double y = radius * Math.cos(phi);
double rCircle = radius * Math.sin(phi);
for (int j = 0; j < longitudeSegments; j++) {
double theta1 = 2 * Math.PI * j / longitudeSegments;
double theta2 = 2 * Math.PI * (j + 1) / longitudeSegments;
float x1 = (float) (rCircle * Math.cos(theta1));
float z1 = (float) (rCircle * Math.sin(theta1));
float x2 = (float) (rCircle * Math.cos(theta2));
float z2 = (float) (rCircle * Math.sin(theta2));
buffer.vertex(matrix, (float)(center.x + x1 - cameraPos.x),
(float)(center.y + y - cameraPos.y),
(float)(center.z + z1 - cameraPos.z)).color(r, g, b, a);
buffer.vertex(matrix, (float)(center.x + x2 - cameraPos.x),
(float)(center.y + y - cameraPos.y),
(float)(center.z + z2 - cameraPos.z)).color(r, g, b, a);
}
}
for (int j = 0; j < longitudeSegments; j++) {
double theta = 2 * Math.PI * j / longitudeSegments;
for (int i = 0; i < latitudeSegments; i++) {
double phi1 = Math.PI * i / latitudeSegments;
double phi2 = Math.PI * (i + 1) / latitudeSegments;
float x1 = (float) (radius * Math.sin(phi1) * Math.cos(theta));
float y1 = (float) (radius * Math.cos(phi1));
float z1 = (float) (radius * Math.sin(phi1) * Math.sin(theta));
float x2 = (float) (radius * Math.sin(phi2) * Math.cos(theta));
float y2 = (float) (radius * Math.cos(phi2));
float z2 = (float) (radius * Math.sin(phi2) * Math.sin(theta));
buffer.vertex(matrix, (float)(center.x + x1 - cameraPos.x),
(float)(center.y + y1 - cameraPos.y),
(float)(center.z + z1 - cameraPos.z)).color(r, g, b, a);
buffer.vertex(matrix, (float)(center.x + x2 - cameraPos.x),
(float)(center.y + y2 - cameraPos.y),
(float)(center.z + z2 - cameraPos.z)).color(r, g, b, a);
}
}
}
}