Начинающий
- Статус
- Оффлайн
- Регистрация
- 11 Окт 2025
- Сообщения
- 19
- Реакции
- 0
нормас, если первая работа то тем более пойдетСалам югейму и пастерам
Делайте больше тем на базе Javelin(Zenith Recode) пж.
Сливаю свои кристаллы(ну почти,там есть чутка GPT,эта тема(клик) и эта(клик),ну и чуть чуть я пописал)
P.S - моя первая работа,прошу не гнобить да и к тому же не особо шарю за джаву
Пожалуйста, авторизуйтесь для просмотра ссылки.
TargetESP://Добавить в настройки private final NumberSetting crystalSize = new NumberSetting("Размер кристалов", 0.8F, 0.1F, 2.0F, 0.1F, () -> { return mode.getValue().getName().equals("Кристалы"); }); private final NumberSetting crystalCount = new NumberSetting("Кол-во кристалов", 20.0F, 8.0F, 30.0F, 1.0F, () -> { return mode.getValue().getName().equals("Кристалы"); }); private void renderCrystals(EventRender3D event) { Entity target = Aura.INSTANCE.getTarget(); if (target != null) { this.lastTarget = target; this.crystalsAnimation.update(true); } else { this.crystalsAnimation.update(false); if (this.crystalsAnimation.getValue() == 0.0F) { this.lastTarget = null; return; } } float alpha = this.crystalsAnimation.getValue(); if (alpha <= 0.0F) return; if (this.lastTarget == null || !(this.lastTarget instanceof LivingEntity)) return; LivingEntity livingEntity = (LivingEntity) this.lastTarget; float easedAnim = (float) easeOutCubic(alpha); float tickDelta = event.getPartialTicks(); Camera camera = mc.gameRenderer.getCamera(); Vec3d targetPos = MathUtil.interpolate(livingEntity); Vec3d cameraPos = camera.getPos(); Vec3d renderPos = targetPos.subtract(cameraPos); float time = (mc.player.age + tickDelta) * 3.2f; // Немного медленнее float entityHeight = livingEntity.getHeight(); float entityWidth = livingEntity.getWidth(); float halfWidth = entityWidth * 0.5f; MatrixStack matrices = event.getMatrix(); matrices.push(); matrices.translate(renderPos.x, renderPos.y, renderPos.z); RenderSystem.enableBlend(); RenderSystem.blendFunc(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE); RenderSystem.disableCull(); RenderSystem.enableDepthTest(); RenderSystem.depthMask(false); int crystalCount = (int)this.crystalCount.getCurrent(); // Настраиваемое количество float crystalScaleSetting = this.crystalSize.getCurrent(); // Рисуем свечение кристалов for (int i = 0; i < crystalCount; i++) { float seed1 = (float) Math.sin(i * 1.7f + 0.3f) * 0.5f + 0.5f; float seed2 = (float) Math.cos(i * 2.3f + 0.7f) * 0.5f + 0.5f; float seed3 = (float) Math.sin(i * 3.1f + 1.1f) * 0.5f + 0.5f; float angleOffset = i * (360f / crystalCount) + seed1 * 12f; float angle = time + angleOffset; float radius = halfWidth + 0.25f + seed3 * 0.15f; float x = radius * (float) Math.cos(Math.toRadians(angle)); float z = radius * (float) Math.sin(Math.toRadians(angle)); float y = seed2 * entityHeight * 1.05f; // амплитуда по высоте float crystalScale = 0.15f * easedAnim * crystalScaleSetting; // Немного меньше int color = getCurrentColor().getRGB(); // Используем метод drawCrystalB для свечения drawCrystalB(matrices, camera, x, y, z, crystalScale * 3.2f, color, alpha * 0.25f); // Меньше свечения } RenderSystem.blendFunc(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA); RenderSystem.setShader(ShaderProgramKeys.POSITION_COLOR); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder buffer = tessellator.begin(VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION_COLOR); // Рисуем основные кристалы for (int i = 0; i < crystalCount; i++) { float seed1 = (float) Math.sin(i * 1.7f + 0.3f) * 0.5f + 0.5f; float seed2 = (float) Math.cos(i * 2.3f + 0.7f) * 0.5f + 0.5f; float seed3 = (float) Math.sin(i * 3.1f + 1.1f) * 0.5f + 0.5f; float angleOffset = i * (360f / crystalCount) + seed1 * 12f; float angle = time + angleOffset; float radius = halfWidth + 0.25f + seed3 * 0.15f; float x = radius * (float) Math.cos(Math.toRadians(angle)); float z = radius * (float) Math.sin(Math.toRadians(angle)); float y = seed2 * entityHeight * 1.05f; float crystalScale = 0.15f * easedAnim * crystalScaleSetting; float dirAngle = angle; int color = getCurrentColor().getRGB(); drawCrystalH(buffer, matrices, x, y, z, crystalScale, dirAngle, color, alpha * 0.8f); // Больше непрозрачности } BufferRenderer.drawWithGlobalProgram(buffer.end()); matrices.pop(); RenderSystem.enableCull(); RenderSystem.depthMask(true); RenderSystem.enableDepthTest(); RenderSystem.defaultBlendFunc(); RenderSystem.disableBlend(); } private void drawCrystalB(MatrixStack matrices, Camera camera, float x, float y, float z, float size, int color, float alpha) { MatrixStack tempMatrix = new MatrixStack(); tempMatrix.multiplyPositionMatrix(matrices.peek().getPositionMatrix()); tempMatrix.translate(x, y, z); tempMatrix.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(-camera.getYaw())); tempMatrix.multiply(RotationAxis.POSITIVE_X.rotationDegrees(camera.getPitch())); MatrixStack.Entry entry = tempMatrix.peek().copy(); int finalColor = ColorUtil.multAlpha(color, alpha); Vector4i vColor = new Vector4i(finalColor, finalColor, finalColor, finalColor); // Используем glow.png для свечения Render3DUtil.drawGlowTexture(entry, Javelin.id("icons/glow.png"), -size / 2, -size / 2, size, size, vColor, true); } private void drawCrystalH(BufferBuilder buffer, MatrixStack matrices, float x, float y, float z, float scale, float yaw, int color, float alpha) { matrices.push(); matrices.translate(x, y, z); matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(-yaw + 90f)); matrices.scale(scale, scale, scale); MatrixStack.Entry entry = matrices.peek(); int r = (color >> 16) & 0xFF; int g = (color >> 8) & 0xFF; int b = color & 0xFF; int a = (int) (180 * alpha); int rL = Math.min(255, (int)(r * 1.3f)); int gL = Math.min(255, (int)(g * 1.3f)); int bL = Math.min(255, (int)(b * 1.3f)); int rD = (int)(r * 0.6f); int gD = (int)(g * 0.6f); int bD = (int)(b * 0.6f); float w = 0.5f; float h = 1.0f; drawTriangle(buffer, entry, 0, 0, h, -w, 0, 0, 0, w, 0, rL, gL, bL, a); drawTriangle(buffer, entry, 0, 0, h, 0, w, 0, w, 0, 0, rL, gL, bL, a); drawTriangle(buffer, entry, 0, 0, h, w, 0, 0, 0, -w, 0, r, g, b, a); drawTriangle(buffer, entry, 0, 0, h, 0, -w, 0, -w, 0, 0, r, g, b, a); drawTriangle(buffer, entry, 0, 0, -h, 0, w, 0, -w, 0, 0, rD, gD, bD, a); drawTriangle(buffer, entry, 0, 0, -h, w, 0, 0, 0, w, 0, rD, gD, bD, a); drawTriangle(buffer, entry, 0, 0, -h, 0, -w, 0, w, 0, 0, rD, gD, bD, a); drawTriangle(buffer, entry, 0, 0, -h, -w, 0, 0, 0, -w, 0, rD, gD, bD, a); matrices.pop(); } //В конец кода вставляйте,я не помню что тут отвечает за краснение ну ладно public static double interpolate(double current, double old, double scale) { return old + (current - old) * scale; } private ColorRGBA getCurrentColor() { if (!redOnHit.isEnabled() || hitAnimation.getValue() <= 0.0F) { return Javelin.getInstance().getThemeManager().getCurrentTheme().getColor(); } float hitProgress = hitAnimation.getValue(); Theme theme = Javelin.getInstance().getThemeManager().getCurrentTheme(); ColorRGBA themeColor = theme.getColor(); ColorRGBA redColor = new ColorRGBA(255, 50, 50, 255); int r = (int)(redColor.getRed() * hitProgress + themeColor.getRed() * (1 - hitProgress)); int g = (int)(redColor.getGreen() * hitProgress + themeColor.getGreen() * (1 - hitProgress)); int b = (int)(redColor.getBlue() * hitProgress + themeColor.getBlue() * (1 - hitProgress)); return new ColorRGBA(r, g, b, 255); }
и вот код для того чтоб при ударе они краснели(вставлять в ауру)
Hit:@EventTarget public void onTick(EventTick e) { if (this.target == null || !this.isValid(this.target)) { this.target = this.updateTarget(); } if (this.target != null) { if (this.isCanAttack() && this.hurtTimer.finished(458L) && !this.target.isBlocking()) { if (mc.player.isSprinting() && !mc.player.isOnGround() && !mc.player.isSwimming()) { mc.player.setSprinting(false); mc.getNetworkHandler().sendPacket(new ClientCommandC2SPacket(mc.player, Mode.STOP_SPRINTING)); if (!AutoSprint.INSTANCE.isEnabled()) { mc.options.sprintKey.setPressed(false); } } // Вызываем onHit перед атакой для TargetESP if (TargetESP.INSTANCE.isEnabled()) { TargetESP.INSTANCE.onHit(); } mc.interactionManager.attackEntity(mc.player, this.target); mc.player.swingHand(Hand.MAIN_HAND); this.hurtTimer.reset(); } } }

