Исходник Моя первая работа, Не бейте палками

Начинающий
Статус
Оффлайн
Регистрация
14 Ноя 2024
Сообщения
2
Реакции[?]
0
Поинты[?]
0

Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:

  • бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
  • маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
  • приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
  • обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.

Спасибо!

RadarRenderer

package im.expensive.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.utils.render.DisplayUtils;
import java.util.Iterator;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.ResourceLocation;

public class RadarRenderer implements ElementRenderer {
private final Minecraft mc = Minecraft.getInstance();
private float radarSize = 100.0F;
private float maxDistance = 50.0F;

public RadarRenderer() {
}

public void render(EventDisplay eventDisplay) {
MatrixStack ms = eventDisplay.getMatrixStack();
float centerX = (float)this.mc.getMainWindow().getScaledWidth() / 2.0F - 425.0F;
float centerY = (float)this.mc.getMainWindow().getScaledHeight() / 2.0F - 180.0F;
float radarPosX = centerX - this.radarSize / 2.0F;
float radarPosY = centerY - this.radarSize / 2.0F;
DisplayUtils.drawStyledShadowRect(radarPosX, radarPosY, this.radarSize, this.radarSize);
DisplayUtils.drawImage(new ResourceLocation("expensive/images/self.png"), centerX - 8.0F, centerY - 8.0F, 12.0F, 12.0F, -1);
Iterator var7 = this.mc.world.getPlayers().iterator();

while(var7.hasNext()) {
PlayerEntity player = (PlayerEntity)var7.next();
if (player != this.mc.player) {
double deltaX = player.getPosX() - this.mc.player.getPosX();
double deltaZ = player.getPosZ() - this.mc.player.getPosZ();
double distance = Math.sqrt(deltaX * deltaX + deltaZ * deltaZ);
if (!(distance > (double)this.maxDistance)) {
double angle = Math.atan2(deltaZ, deltaX) - Math.toRadians((this.mc.player.rotationYaw - 180.0F));
double scaledDistance = distance / (double)this.maxDistance * (double)(this.radarSize / 2.0F);
float radarPlayerX = (float)((double)centerX + scaledDistance * Math.cos(angle));
float radarPlayerY = (float)((double)centerY + scaledDistance * Math.sin(angle));
DisplayUtils.drawImage(new ResourceLocation("expensive/images/player.png"), radarPlayerX, radarPlayerY, 5.0F, 5.0F, -1);
}
}
}
}
}
DisplayUtil

public static void drawStyledShadowRect(float x, float y, float width, float height) {
shadowRect(x, y, width, height, 140);
}

public static void drawStyledRect(float x, float y, float width, float height, int alpha, int upRectAlpha) {
renderRectClient(x, y, width, height, alpha, upRectAlpha);
}

private static void shadowRect(float x, float y, float width, float height, int alpha) {
int colorWithAlpha1 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
int colorWithAlpha2 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
float off = 1.5F;
Stencil.initStencilToWrite();
drawRoundedRect(x, y, width, height, new Vector4f(5.5F, 5.5F, 5.5F, 5.5F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
Stencil.readStencilBuffer(0);
drawRoundedRect(x - off, y - off, width + off * 2.0F, height + off * 2.0F, new Vector4f(6.0F, 6.0F, 6.0F, 6.0F), new Vector4i(HUD.getColor(2), HUD.getColor(2), HUD.getColor(2), HUD.getColor(2)));
drawShadow(x - off, y - off, width + off * 2.0F, height + off * 2.0F, 8, HUD.getColor(2), HUD.getColor(2));
Stencil.uninitStencilBuffer();
drawRoundedRect(x, y, width, height, new Vector4f(4.0F, 4.0F, 4.0F, 4.0F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
drawShadow(x, y, width, height, 8, colorWithAlpha1, colorWithAlpha2);
}

private static void renderRectClient(float x, float y, float width, float height, int alpha, int upRectAlpha) {
int colorWithAlpha1 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
int colorWithAlpha2 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
Stencil.initStencilToWrite();
drawRoundedRect(x, y, width, 17.0F, new Vector4f(4.0F, 0.0F, 4.0F, 0.0F), -1);
Stencil.readStencilBuffer(0);
drawRoundedRect(x, y, width, height, new Vector4f(4.0F, 4.0F, 4.0F, 4.0F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
Stencil.uninitStencilBuffer();
drawShadow(x, y, width, height, 8, colorWithAlpha1, colorWithAlpha2);
drawRoundedRect(x, y, width, 17.0F, new Vector4f(4.0F, 0.0F, 4.0F, 0.0F), ColorUtils.reAlphaInt(HUD.getColor(2), upRectAlpha));
}
ColorUtil

public static int reAlphaInt(int color, int alpha) {
return MathHelper.clamp(alpha, 0, 255) << 24 | color & 16777215;
}
 
Начинающий
Статус
Оффлайн
Регистрация
26 Мар 2021
Сообщения
78
Реакции[?]
1
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
9 Ноя 2023
Сообщения
50
Реакции[?]
1
Поинты[?]
0
Мдааа кем же ты будешь в будущем, если у тебя в первой работе перемены вары
 
Начинающий
Статус
Оффлайн
Регистрация
12 Дек 2022
Сообщения
141
Реакции[?]
0
Поинты[?]
0
RadarRenderer

package im.expensive.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.utils.render.DisplayUtils;
import java.util.Iterator;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.ResourceLocation;

public class RadarRenderer implements ElementRenderer {
private final Minecraft mc = Minecraft.getInstance();
private float radarSize = 100.0F;
private float maxDistance = 50.0F;

public RadarRenderer() {
}

public void render(EventDisplay eventDisplay) {
MatrixStack ms = eventDisplay.getMatrixStack();
float centerX = (float)this.mc.getMainWindow().getScaledWidth() / 2.0F - 425.0F;
float centerY = (float)this.mc.getMainWindow().getScaledHeight() / 2.0F - 180.0F;
float radarPosX = centerX - this.radarSize / 2.0F;
float radarPosY = centerY - this.radarSize / 2.0F;
DisplayUtils.drawStyledShadowRect(radarPosX, radarPosY, this.radarSize, this.radarSize);
DisplayUtils.drawImage(new ResourceLocation("expensive/images/self.png"), centerX - 8.0F, centerY - 8.0F, 12.0F, 12.0F, -1);
Iterator var7 = this.mc.world.getPlayers().iterator();

while(var7.hasNext()) {
PlayerEntity player = (PlayerEntity)var7.next();
if (player != this.mc.player) {
double deltaX = player.getPosX() - this.mc.player.getPosX();
double deltaZ = player.getPosZ() - this.mc.player.getPosZ();
double distance = Math.sqrt(deltaX * deltaX + deltaZ * deltaZ);
if (!(distance > (double)this.maxDistance)) {
double angle = Math.atan2(deltaZ, deltaX) - Math.toRadians((this.mc.player.rotationYaw - 180.0F));
double scaledDistance = distance / (double)this.maxDistance * (double)(this.radarSize / 2.0F);
float radarPlayerX = (float)((double)centerX + scaledDistance * Math.cos(angle));
float radarPlayerY = (float)((double)centerY + scaledDistance * Math.sin(angle));
DisplayUtils.drawImage(new ResourceLocation("expensive/images/player.png"), radarPlayerX, radarPlayerY, 5.0F, 5.0F, -1);
}
}
}
}
}
DisplayUtil

public static void drawStyledShadowRect(float x, float y, float width, float height) {
shadowRect(x, y, width, height, 140);
}

public static void drawStyledRect(float x, float y, float width, float height, int alpha, int upRectAlpha) {
renderRectClient(x, y, width, height, alpha, upRectAlpha);
}

private static void shadowRect(float x, float y, float width, float height, int alpha) {
int colorWithAlpha1 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
int colorWithAlpha2 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
float off = 1.5F;
Stencil.initStencilToWrite();
drawRoundedRect(x, y, width, height, new Vector4f(5.5F, 5.5F, 5.5F, 5.5F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
Stencil.readStencilBuffer(0);
drawRoundedRect(x - off, y - off, width + off * 2.0F, height + off * 2.0F, new Vector4f(6.0F, 6.0F, 6.0F, 6.0F), new Vector4i(HUD.getColor(2), HUD.getColor(2), HUD.getColor(2), HUD.getColor(2)));
drawShadow(x - off, y - off, width + off * 2.0F, height + off * 2.0F, 8, HUD.getColor(2), HUD.getColor(2));
Stencil.uninitStencilBuffer();
drawRoundedRect(x, y, width, height, new Vector4f(4.0F, 4.0F, 4.0F, 4.0F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
drawShadow(x, y, width, height, 8, colorWithAlpha1, colorWithAlpha2);
}

private static void renderRectClient(float x, float y, float width, float height, int alpha, int upRectAlpha) {
int colorWithAlpha1 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
int colorWithAlpha2 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
Stencil.initStencilToWrite();
drawRoundedRect(x, y, width, 17.0F, new Vector4f(4.0F, 0.0F, 4.0F, 0.0F), -1);
Stencil.readStencilBuffer(0);
drawRoundedRect(x, y, width, height, new Vector4f(4.0F, 4.0F, 4.0F, 4.0F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
Stencil.uninitStencilBuffer();
drawShadow(x, y, width, height, 8, colorWithAlpha1, colorWithAlpha2);
drawRoundedRect(x, y, width, 17.0F, new Vector4f(4.0F, 0.0F, 4.0F, 0.0F), ColorUtils.reAlphaInt(HUD.getColor(2), upRectAlpha));
}
ColorUtil

public static int reAlphaInt(int color, int alpha) {
return MathHelper.clamp(alpha, 0, 255) << 24 | color & 16777215;
}
ss?
 
Начинающий
Статус
Онлайн
Регистрация
19 Фев 2024
Сообщения
297
Реакции[?]
1
Поинты[?]
1K
RadarRenderer

package im.expensive.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.utils.render.DisplayUtils;
import java.util.Iterator;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.ResourceLocation;

public class RadarRenderer implements ElementRenderer {
private final Minecraft mc = Minecraft.getInstance();
private float radarSize = 100.0F;
private float maxDistance = 50.0F;

public RadarRenderer() {
}

public void render(EventDisplay eventDisplay) {
MatrixStack ms = eventDisplay.getMatrixStack();
float centerX = (float)this.mc.getMainWindow().getScaledWidth() / 2.0F - 425.0F;
float centerY = (float)this.mc.getMainWindow().getScaledHeight() / 2.0F - 180.0F;
float radarPosX = centerX - this.radarSize / 2.0F;
float radarPosY = centerY - this.radarSize / 2.0F;
DisplayUtils.drawStyledShadowRect(radarPosX, radarPosY, this.radarSize, this.radarSize);
DisplayUtils.drawImage(new ResourceLocation("expensive/images/self.png"), centerX - 8.0F, centerY - 8.0F, 12.0F, 12.0F, -1);
Iterator var7 = this.mc.world.getPlayers().iterator();

while(var7.hasNext()) {
PlayerEntity player = (PlayerEntity)var7.next();
if (player != this.mc.player) {
double deltaX = player.getPosX() - this.mc.player.getPosX();
double deltaZ = player.getPosZ() - this.mc.player.getPosZ();
double distance = Math.sqrt(deltaX * deltaX + deltaZ * deltaZ);
if (!(distance > (double)this.maxDistance)) {
double angle = Math.atan2(deltaZ, deltaX) - Math.toRadians((this.mc.player.rotationYaw - 180.0F));
double scaledDistance = distance / (double)this.maxDistance * (double)(this.radarSize / 2.0F);
float radarPlayerX = (float)((double)centerX + scaledDistance * Math.cos(angle));
float radarPlayerY = (float)((double)centerY + scaledDistance * Math.sin(angle));
DisplayUtils.drawImage(new ResourceLocation("expensive/images/player.png"), radarPlayerX, radarPlayerY, 5.0F, 5.0F, -1);
}
}
}
}
}
DisplayUtil

public static void drawStyledShadowRect(float x, float y, float width, float height) {
shadowRect(x, y, width, height, 140);
}

public static void drawStyledRect(float x, float y, float width, float height, int alpha, int upRectAlpha) {
renderRectClient(x, y, width, height, alpha, upRectAlpha);
}

private static void shadowRect(float x, float y, float width, float height, int alpha) {
int colorWithAlpha1 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
int colorWithAlpha2 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
float off = 1.5F;
Stencil.initStencilToWrite();
drawRoundedRect(x, y, width, height, new Vector4f(5.5F, 5.5F, 5.5F, 5.5F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
Stencil.readStencilBuffer(0);
drawRoundedRect(x - off, y - off, width + off * 2.0F, height + off * 2.0F, new Vector4f(6.0F, 6.0F, 6.0F, 6.0F), new Vector4i(HUD.getColor(2), HUD.getColor(2), HUD.getColor(2), HUD.getColor(2)));
drawShadow(x - off, y - off, width + off * 2.0F, height + off * 2.0F, 8, HUD.getColor(2), HUD.getColor(2));
Stencil.uninitStencilBuffer();
drawRoundedRect(x, y, width, height, new Vector4f(4.0F, 4.0F, 4.0F, 4.0F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
drawShadow(x, y, width, height, 8, colorWithAlpha1, colorWithAlpha2);
}

private static void renderRectClient(float x, float y, float width, float height, int alpha, int upRectAlpha) {
int colorWithAlpha1 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
int colorWithAlpha2 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
Stencil.initStencilToWrite();
drawRoundedRect(x, y, width, 17.0F, new Vector4f(4.0F, 0.0F, 4.0F, 0.0F), -1);
Stencil.readStencilBuffer(0);
drawRoundedRect(x, y, width, height, new Vector4f(4.0F, 4.0F, 4.0F, 4.0F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
Stencil.uninitStencilBuffer();
drawShadow(x, y, width, height, 8, colorWithAlpha1, colorWithAlpha2);
drawRoundedRect(x, y, width, 17.0F, new Vector4f(4.0F, 0.0F, 4.0F, 0.0F), ColorUtils.reAlphaInt(HUD.getColor(2), upRectAlpha));
}
ColorUtil

public static int reAlphaInt(int color, int alpha) {
return MathHelper.clamp(alpha, 0, 255) << 24 | color & 16777215;
}
Окей палками не будем а вот ногами
 
Начинающий
Статус
Оффлайн
Регистрация
11 Апр 2024
Сообщения
57
Реакции[?]
0
Поинты[?]
0
RadarRenderer

package im.expensive.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.utils.render.DisplayUtils;
import java.util.Iterator;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.ResourceLocation;

public class RadarRenderer implements ElementRenderer {
private final Minecraft mc = Minecraft.getInstance();
private float radarSize = 100.0F;
private float maxDistance = 50.0F;

public RadarRenderer() {
}

public void render(EventDisplay eventDisplay) {
MatrixStack ms = eventDisplay.getMatrixStack();
float centerX = (float)this.mc.getMainWindow().getScaledWidth() / 2.0F - 425.0F;
float centerY = (float)this.mc.getMainWindow().getScaledHeight() / 2.0F - 180.0F;
float radarPosX = centerX - this.radarSize / 2.0F;
float radarPosY = centerY - this.radarSize / 2.0F;
DisplayUtils.drawStyledShadowRect(radarPosX, radarPosY, this.radarSize, this.radarSize);
DisplayUtils.drawImage(new ResourceLocation("expensive/images/self.png"), centerX - 8.0F, centerY - 8.0F, 12.0F, 12.0F, -1);
Iterator var7 = this.mc.world.getPlayers().iterator();

while(var7.hasNext()) {
PlayerEntity player = (PlayerEntity)var7.next();
if (player != this.mc.player) {
double deltaX = player.getPosX() - this.mc.player.getPosX();
double deltaZ = player.getPosZ() - this.mc.player.getPosZ();
double distance = Math.sqrt(deltaX * deltaX + deltaZ * deltaZ);
if (!(distance > (double)this.maxDistance)) {
double angle = Math.atan2(deltaZ, deltaX) - Math.toRadians((this.mc.player.rotationYaw - 180.0F));
double scaledDistance = distance / (double)this.maxDistance * (double)(this.radarSize / 2.0F);
float radarPlayerX = (float)((double)centerX + scaledDistance * Math.cos(angle));
float radarPlayerY = (float)((double)centerY + scaledDistance * Math.sin(angle));
DisplayUtils.drawImage(new ResourceLocation("expensive/images/player.png"), radarPlayerX, radarPlayerY, 5.0F, 5.0F, -1);
}
}
}
}
}
DisplayUtil

public static void drawStyledShadowRect(float x, float y, float width, float height) {
shadowRect(x, y, width, height, 140);
}

public static void drawStyledRect(float x, float y, float width, float height, int alpha, int upRectAlpha) {
renderRectClient(x, y, width, height, alpha, upRectAlpha);
}

private static void shadowRect(float x, float y, float width, float height, int alpha) {
int colorWithAlpha1 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
int colorWithAlpha2 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
float off = 1.5F;
Stencil.initStencilToWrite();
drawRoundedRect(x, y, width, height, new Vector4f(5.5F, 5.5F, 5.5F, 5.5F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
Stencil.readStencilBuffer(0);
drawRoundedRect(x - off, y - off, width + off * 2.0F, height + off * 2.0F, new Vector4f(6.0F, 6.0F, 6.0F, 6.0F), new Vector4i(HUD.getColor(2), HUD.getColor(2), HUD.getColor(2), HUD.getColor(2)));
drawShadow(x - off, y - off, width + off * 2.0F, height + off * 2.0F, 8, HUD.getColor(2), HUD.getColor(2));
Stencil.uninitStencilBuffer();
drawRoundedRect(x, y, width, height, new Vector4f(4.0F, 4.0F, 4.0F, 4.0F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
drawShadow(x, y, width, height, 8, colorWithAlpha1, colorWithAlpha2);
}

private static void renderRectClient(float x, float y, float width, float height, int alpha, int upRectAlpha) {
int colorWithAlpha1 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
int colorWithAlpha2 = ColorUtils.reAlphaInt(HUD.getColor(2), alpha);
Stencil.initStencilToWrite();
drawRoundedRect(x, y, width, 17.0F, new Vector4f(4.0F, 0.0F, 4.0F, 0.0F), -1);
Stencil.readStencilBuffer(0);
drawRoundedRect(x, y, width, height, new Vector4f(4.0F, 4.0F, 4.0F, 4.0F), new Vector4i(colorWithAlpha1, colorWithAlpha1, colorWithAlpha2, colorWithAlpha2));
Stencil.uninitStencilBuffer();
drawShadow(x, y, width, height, 8, colorWithAlpha1, colorWithAlpha2);
drawRoundedRect(x, y, width, 17.0F, new Vector4f(4.0F, 0.0F, 4.0F, 0.0F), ColorUtils.reAlphaInt(HUD.getColor(2), upRectAlpha));
}
ColorUtil

public static int reAlphaInt(int color, int alpha) {
return MathHelper.clamp(alpha, 0, 255) << 24 | color & 16777215;
}
"Ударил Палкой" var1000 moment
 

Вложения

Сверху Снизу