Начинающий
- Статус
- Оффлайн
- Регистрация
- 2 Июн 2024
- Сообщения
- 136
- Реакции
- 1
- Выберите загрузчик игры
- Vanilla
Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:
- бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
- маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
- приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
- обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.
Спасибо!
Вроде норм визуал делал я(говнокод присутствует не переживайте)
анимки гпт делал
NotifyMng.java
Notify.java
а если ты вообще отбитый далбаеб то вот как их юзать
а для ваще ебанутых и вы не понимаете что такое getNotifyMng() то заходите в главный класс и пишете там в полях типо
@Getter
public static NotifyMng notifyMng;
потом в методе init пишите типо
notifyMng = new NotifyMng();вот типо
в худе еще пропишите
Enrgy.getNotifyMng().render(stack); или в другом месте рендера хз мне похуй
анимки гпт делал
Пожалуйста, авторизуйтесь для просмотра ссылки.
NotifyMng.java
NotifyMng:
public class NotifyMng {
public ArrayList<Notify> notifies = new ArrayList<>();
public void add(Notify notify) {
if (notifies.isEmpty()) {
notify.yOffset = 0;
}
notifies.add(notify);
}
public void render(PoseStack poseStack) {
float offset = 0;
float cX = Minecraft.getInstance().getWindow().getGuiScaledWidth() / 2f;
float bY = Minecraft.getInstance().getWindow().getGuiScaledHeight() / 2f + 10;
notifies.removeIf(Notify::isExpired);
for (Notify notify : notifies) {
notify.update();
float alpha = notify.getAlpha();
float x = cX - (FontRenderers.msSemi16.getStringWidth(notify.text) + 24) / 2f;
float y = bY + notify.yOffset + offset;
int backgroundColor = new Color(14, 14, 14, (int)(255 * alpha)).getRGB();
DrawShader.drawRoundBlur(poseStack, x - 22, y, 20, 15, 3, backgroundColor, 12, 0.35f);
DrawShader.drawRoundBlur(poseStack, x, y, FontRenderers.msSemi16.getStringWidth(notify.text) + 24, 15, 3, backgroundColor, 12, 0.35f);
String icon = notify.type == Notify.Type.Enable ? "H" : notify.type == Notify.Type.Disable ? "S" : "D";
float icoX = (x - 22 + 20 / 2f) - FontRenderers.nuricon20.getStringWidth(icon) / 2f;
if(notify.type==Notify.Type.Warn){
FontRenderers.generalgui18.drawString(poseStack, "D", icoX+0.5f, y + 5f, Color.orange.getRGB());
}else {
FontRenderers.nuricon20.drawString(poseStack, icon, icoX, y + 4f, new Color(1f, 1f, 1f, alpha).getRGB());
}
FontRenderers.msSemi16.drawCenteredString(poseStack, notify.text, cX, y + 4f, new Color(1f, 1f, 1f, alpha).getRGB());
offset += 18;
}
}
}
Notify:
public class Notify {
public enum Type {
Enable, Disable, Warn
}
public String text;
public Type type;
public float alpha = 0f;
public float yOffset = -20f;
private final long displayDuration = 2000;
private final long fadeDuration = 100;
private long startTime;
public Notify(String text, Type type) {
this.text = text;
this.type = type;
this.startTime = System.currentTimeMillis();
}
public void update() {
long elapsed = System.currentTimeMillis() - startTime;
long totalDuration = displayDuration + fadeDuration;
if (elapsed < fadeDuration) {
alpha = elapsed / (float) fadeDuration;
yOffset = 20f - 20f * alpha;
} else if (elapsed < totalDuration) {
alpha = 1f;
yOffset = 0f;
} else {
float fadeOut = 1f - (elapsed - totalDuration) / (float) fadeDuration;
alpha = Math.max(0f, fadeOut);
yOffset = 0f;
}
}
public boolean isExpired() {
return System.currentTimeMillis() - startTime > displayDuration + fadeDuration * 2;
}
public float getAlpha() {
return alpha;
}
}
toggle:
public void toggle() {
this.state = !state;
if (!state) {
onDisable();
EventManager.unregister(this);
} else {
onEnable();
EventManager.register(this);
}
Enrgy.getNotifyMng().add(new Notify(this.name, this.state ? Notify.Type.Enable : Notify.Type.Disable));
}
@Getter
public static NotifyMng notifyMng;
потом в методе init пишите типо
notifyMng = new NotifyMng();вот типо
в худе еще пропишите
Enrgy.getNotifyMng().render(stack); или в другом месте рендера хз мне похуй