Начинающий
- Статус
- Оффлайн
- Регистрация
- 3 Апр 2025
- Сообщения
- 54
- Реакции
- 0
- Выберите загрузчик игры
- Vanilla
Последнее редактирование:
Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
Не очень,можно блум добавить,ниже примерПожалуйста, авторизуйтесь для просмотра ссылки.
Посмотреть вложение 316816ss
Вроде красиво пастеры пастите
public class BlockOutline extends Module {
private final CheckBoxSetting fill = new CheckBoxSetting( "Заполнять", true);
private final SliderSetting fillAlpha = new SliderSetting( "Заполнять альфу", 0.2f, 0.1f, 1f, 0.1f).setVisible(fill::get);
public BlockOutline() {
addSettings(fill,fillAlpha);
}
@Subscribe
public void onRenderWorldLast(WorldEvent e) {
BlockPos blockPos = findBlockToDisplay();
if (blockPos != null && mc.gameSettings.getPointOfView() == PointOfView.FIRST_PERSON) {
BlockState state = mc.world.getBlockState(blockPos);
if (state.getBlock() != Blocks.AIR && state.getBlock() != Blocks.WATER && state.getBlock() != Blocks.LAVA && state.getBlock() != Blocks.CAVE_AIR && state.getBlock() != Blocks.VOID_AIR) {
VoxelShape shape = state.getShape(mc.world, blockPos);
if (shape.isEmpty()) {
shape = Block.makeCuboidShape(0, 0, 0, 16, 16, 16);
}
renderBlockOutline(e.getMatrix(), shape, blockPos);
}
}
}
private void renderBlockOutline(MatrixStack matrixStack, VoxelShape shape, BlockPos blockPos) {
matrixStack.push();
RenderSystem.pushMatrix();
RenderSystem.multMatrix(matrixStack.getLast().getMatrix());
double renderX = mc.getRenderManager().renderPosX();
double renderY = mc.getRenderManager().renderPosY();
double renderZ = mc.getRenderManager().renderPosZ();
RenderSystem.translated(-renderX, -renderY, -renderZ);
RenderSystem.disableTexture();
RenderSystem.disableDepthTest();
RenderSystem.enableBlend();
RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE);
RenderSystem.disableCull();
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glHint(GL11.GL_LINE_SMOOTH_HINT, GL11.GL_NICEST);
RenderSystem.lineWidth(1.0f);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder bufferBuilder = tessellator.getBuffer();
int outlineColorValue = HUD.getColor(90);
int fillColorValue = ColorUtils.multAlpha(outlineColorValue, fillAlpha.get());
for (AxisAlignedBB aabb : shape.toBoundingBoxList()) {
double minX = blockPos.getX() + aabb.minX;
double minY = blockPos.getY() + aabb.minY;
double minZ = blockPos.getZ() + aabb.minZ;
double maxX = blockPos.getX() + aabb.maxX;
double maxY = blockPos.getY() + aabb.maxY;
double maxZ = blockPos.getZ() + aabb.maxZ;
if (fill.get()) {
bufferBuilder.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
RenderUtil.renderFilledBox(bufferBuilder, minX, minY, minZ, maxX, maxY, maxZ, fillColorValue);
tessellator.draw();
}
bufferBuilder.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR);
RenderUtil.renderWireframeBox(bufferBuilder, minX, minY, minZ, maxX, maxY, maxZ, outlineColorValue);
tessellator.draw();
}
GL11.glDisable(GL11.GL_LINE_SMOOTH);
RenderSystem.enableTexture();
RenderSystem.enableDepthTest();
RenderSystem.disableBlend();
RenderSystem.enableCull();
RenderSystem.translated(renderX, renderY, renderZ);
RenderSystem.popMatrix();
matrixStack.pop();
}
private BlockPos findBlockToDisplay() {
RayTraceResult result = mc.objectMouseOver;
if (result instanceof BlockRayTraceResult overlay) {
BlockPos pos = overlay.getPos();
PlayerEntity player = mc.player;
if (player != null) {
double reachDistance = 6.0;
double distanceSq = player.getDistanceSq(pos.getX(), pos.getY(), pos.getZ());
if (distanceSq <= reachDistance * reachDistance) {
return pos;
}
}
}
return null;
}
}
Любимый пастпенсивПожалуйста, авторизуйтесь для просмотра ссылки.
Посмотреть вложение 316816ss
Вроде красиво пастеры пастите

а я только вчера похожый написал пиздецПожалуйста, авторизуйтесь для просмотра ссылки.
Посмотреть вложение 316816ss
Вроде красиво пастеры пастите
Аргументируйнахуя ты это выложил
более менее,еще бы обводку добавить,или слайдер для точной настройки,а так норм.Пожалуйста, авторизуйтесь для просмотра ссылки.
Посмотреть вложение 316816ss
Вроде красиво пастеры пастите
Окей хочу заранее сказать что моды на обводку появились 2-3 года назад или даже большену у меня такое уже как месяца 4-5
дайНе очень,можно блум добавить,ниже пример
BlockOutline:public class BlockOutline extends Module { private final CheckBoxSetting fill = new CheckBoxSetting( "Заполнять", true); private final SliderSetting fillAlpha = new SliderSetting( "Заполнять альфу", 0.2f, 0.1f, 1f, 0.1f).setVisible(fill::get); public BlockOutline() { addSettings(fill,fillAlpha); } @Subscribe public void onRenderWorldLast(WorldEvent e) { BlockPos blockPos = findBlockToDisplay(); if (blockPos != null && mc.gameSettings.getPointOfView() == PointOfView.FIRST_PERSON) { BlockState state = mc.world.getBlockState(blockPos); if (state.getBlock() != Blocks.AIR && state.getBlock() != Blocks.WATER && state.getBlock() != Blocks.LAVA && state.getBlock() != Blocks.CAVE_AIR && state.getBlock() != Blocks.VOID_AIR) { VoxelShape shape = state.getShape(mc.world, blockPos); if (shape.isEmpty()) { shape = Block.makeCuboidShape(0, 0, 0, 16, 16, 16); } renderBlockOutline(e.getMatrix(), shape, blockPos); } } } private void renderBlockOutline(MatrixStack matrixStack, VoxelShape shape, BlockPos blockPos) { matrixStack.push(); RenderSystem.pushMatrix(); RenderSystem.multMatrix(matrixStack.getLast().getMatrix()); double renderX = mc.getRenderManager().renderPosX(); double renderY = mc.getRenderManager().renderPosY(); double renderZ = mc.getRenderManager().renderPosZ(); RenderSystem.translated(-renderX, -renderY, -renderZ); RenderSystem.disableTexture(); RenderSystem.disableDepthTest(); RenderSystem.enableBlend(); RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE); RenderSystem.disableCull(); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glHint(GL11.GL_LINE_SMOOTH_HINT, GL11.GL_NICEST); RenderSystem.lineWidth(1.0f); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferBuilder = tessellator.getBuffer(); int outlineColorValue = HUD.getColor(90); int fillColorValue = ColorUtils.multAlpha(outlineColorValue, fillAlpha.get()); for (AxisAlignedBB aabb : shape.toBoundingBoxList()) { double minX = blockPos.getX() + aabb.minX; double minY = blockPos.getY() + aabb.minY; double minZ = blockPos.getZ() + aabb.minZ; double maxX = blockPos.getX() + aabb.maxX; double maxY = blockPos.getY() + aabb.maxY; double maxZ = blockPos.getZ() + aabb.maxZ; if (fill.get()) { bufferBuilder.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR); RenderUtil.renderFilledBox(bufferBuilder, minX, minY, minZ, maxX, maxY, maxZ, fillColorValue); tessellator.draw(); } bufferBuilder.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR); RenderUtil.renderWireframeBox(bufferBuilder, minX, minY, minZ, maxX, maxY, maxZ, outlineColorValue); tessellator.draw(); } GL11.glDisable(GL11.GL_LINE_SMOOTH); RenderSystem.enableTexture(); RenderSystem.enableDepthTest(); RenderSystem.disableBlend(); RenderSystem.enableCull(); RenderSystem.translated(renderX, renderY, renderZ); RenderSystem.popMatrix(); matrixStack.pop(); } private BlockPos findBlockToDisplay() { RayTraceResult result = mc.objectMouseOver; if (result instanceof BlockRayTraceResult overlay) { BlockPos pos = overlay.getPos(); PlayerEntity player = mc.player; if (player != null) { double reachDistance = 6.0; double distanceSq = player.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()); if (distanceSq <= reachDistance * reachDistance) { return pos; } } } return null; } }
public int red(int c) {дай
multAlpha плс
легенда,аpublic int red(int c) {
return c >> 16 & 0xFF;
}
public int green(int c) {
return c >> 8 & 0xFF;
}
public int blue(int c) {
return c & 0xFF;
}
public int alpha(int c) {
return c >> 24 & 0xFF;
}
public int multDark(int c, float brpc) {
return getColor((float) red(c) * brpc, (float) green(c) * brpc, (float) blue(c) * brpc, (float) alpha(c));
}
public static void renderWireframeBox(BufferBuilder bufferBuilder, double minX, double minY, double minZ, double maxX, double maxY, double maxZ, int color) {легенда,а
renderWireframeBox еще можн?))
легенда югаpublic static void renderWireframeBox(BufferBuilder bufferBuilder, double minX, double minY, double minZ, double maxX, double maxY, double maxZ, int color) {
float red = ((color >> 16) & 0xFF) / 255.0f;
float green = ((color >> 8) & 0xFF) / 255.0f;
float blue = (color & 0xFF) / 255.0f;
float alpha = ((color >> 24) & 0xFF) / 255.0f;
bufferBuilder.pos(minX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
}
renderFilledBox еще можн плсpublic static void renderWireframeBox(BufferBuilder bufferBuilder, double minX, double minY, double minZ, double maxX, double maxY, double maxZ, int color) {
float red = ((color >> 16) & 0xFF) / 255.0f;
float green = ((color >> 8) & 0xFF) / 255.0f;
float blue = (color & 0xFF) / 255.0f;
float alpha = ((color >> 24) & 0xFF) / 255.0f;
bufferBuilder.pos(minX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, minZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(maxX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, minY, maxZ).color(red, green, blue, alpha).endVertex();
bufferBuilder.pos(minX, maxY, maxZ).color(red, green, blue, alpha).endVertex();
}
это любой школьник напишет, чат гпт по первому запросу сделает, нахуй ты это выкладываешь, были бы шейдеры я бы подумалАргументируй
Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz