Predictions / Expenis 3.1 Ready

Начинающий
Статус
Оффлайн
Регистрация
8 Июн 2024
Сообщения
258
Реакции[?]
0
Поинты[?]
0
ну дарова, че :roflanEbalo:

ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.


нувот, если есть чайники которые не смогут заменить Theme.штототам на ColorUtils.getColor -анлаки в будующем повезет


Prediction.java:
package ha1kep1dor1337.yasosal4leeenn.modules.impl.render;

import com.google.common.eventbus.Subscribe;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EnderPearlEntity;
import net.minecraft.entity.projectile.ThrowableEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import ha1kep1dor1337.yasosal4leeenn.events.EventDisplay;
import ha1kep1dor1337.yasosal4leeenn.events.WorldEvent;
import ha1kep1dor1337.yasosal4leeenn.modules.api.Category;
import ha1kep1dor1337.yasosal4leeenn.modules.api.Module;
import ha1kep1dor1337.yasosal4leeenn.modules.api.ModuleRegister;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.BooleanSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ColorSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ModeListSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ModeSetting;
import ha1kep1dor1337.yasosal4leeenn.ui.themes.Theme;
import ha1kep1dor1337.yasosal4leeenn.utils.projections.ProjectionUtil;
import ha1kep1dor1337.yasosal4leeenn.utils.render.color.ColorUtils;
import ha1kep1dor1337.yasosal4leeenn.utils.render.font.Fonts;
import ha1kep1dor1337.yasosal4leeenn.utils.render.rect.DisplayUtils;
import ha1kep1dor1337.yasosal4leeenn.utils.text.font.ClientFonts;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;

@ModuleRegister(name = "PearlPredictions", category = Category.Visual)
public class Predictions extends Module {

    public Predictions() {
        addSettings();
    }

    record PearlPoint(Vector3d position, int ticks) {
    }

    final List<PearlPoint> pearlPoints = new ArrayList<>();

    @Subscribe
    public void aa(EventDisplay e) {
        for (PearlPoint pearlPoint : pearlPoints) {
            Vector3d pos = pearlPoint.position;
            Vector2f projection = ProjectionUtil.project(pos.x, pos.y - 0.3F, pos.z);
            int ticks = pearlPoint.ticks;


            if (projection.equals(new Vector2f(Float.MAX_VALUE, Float.MAX_VALUE))) {
                continue;
            }

            double time = ticks * 50 / 1000.0;
            String text = String.format("%.1f" + " с", time);
            float width = Fonts.montserrat.getWidth(text, 7);

            float textWidth = width + 11 + 11;

            float posX = projection.x - textWidth / 2;
            float posX1 = projection.x  / 2;
            float posY = projection.y;


            DisplayUtils.drawRoundedRect(posX + 16, posY + 2 - 3, textWidth - 17, 16 - 3, 3, ColorUtils.setAlpha(Theme.mainRectColor, 100));
            DisplayUtils.drawCircle(posX + 7, posY + 6, 14,  ColorUtils.setAlpha(Theme.darkMainRectColor, 140));
            ClientFonts.icons[16].drawString(e.getMatrixStack(), "G", posX + 3 , posY + 5, ColorUtils.setAlpha(Theme.textColor, 255));
            //DisplayUtils.drawImage(new ResourceLocation("textures/item/ender_pearl.png"), (int) posX + 1.5f , (int) posY + 2 + 2.4f - 4, 11 , 11, -1);
            //ClientFonts.icons[18].drawString(e.getMatrixStack(), "G", posX + 4 , posY + 4 , Theme.textColor);
            Fonts.sfui.drawText(e.getMatrixStack(), text, (float) (posX + 18), (float) (posY + 6.5f - 4), Theme.textColor, 7);
        }
    }

    @Subscribe
    public void onRender(WorldEvent event) {
        glPushMatrix();

        glDisable(GL_TEXTURE_2D);
        glDisable(GL_DEPTH_TEST);

        glEnable(GL_BLEND);
        glEnable(GL_LINE_SMOOTH);

        Vector3d renderOffset = mc.getRenderManager().info.getProjectedView();

        glTranslated(-renderOffset.x, -renderOffset.y, -renderOffset.z);

        glLineWidth(3);

        buffer.begin(1, DefaultVertexFormats.POSITION);
        pearlPoints.clear();
        for (Entity entity : mc.world.getAllEntities()) {
            if (entity instanceof EnderPearlEntity throwable) {
                Vector3d motion = throwable.getMotion();
                Vector3d pos = throwable.getPositionVec();
                Vector3d prevPos;
                int ticks = 0;

                for (int i = 0; i < 150; i++) {
                    prevPos = pos;
                    pos = pos.add(motion);
                    motion = getNextMotion(throwable, motion);

                    buffer.pos(prevPos.x, prevPos.y, prevPos.z).endVertex();

                    RayTraceContext rayTraceContext = new RayTraceContext(
                            prevPos,
                            pos,
                            RayTraceContext.BlockMode.COLLIDER,
                            RayTraceContext.FluidMode.NONE,
                            throwable
                    );

                    BlockRayTraceResult blockHitResult = mc.world.rayTraceBlocks(rayTraceContext);

                    boolean isLast = blockHitResult.getType() == RayTraceResult.Type.BLOCK;

                    if (isLast) {
                        pos = blockHitResult.getHitVec();
                    }

                    buffer.pos(pos.x, pos.y, pos.z).endVertex();

                    if (blockHitResult.getType() == BlockRayTraceResult.Type.BLOCK || pos.y < -128) {
                        pearlPoints.add(new PearlPoint(pos, ticks));
                        break;
                    }
                    ticks++;
                }
            }
        }

        tessellator.draw();

        glDisable(GL_BLEND);
        glDisable(GL_LINE_SMOOTH);

        glEnable(GL_TEXTURE_2D);
        glEnable(GL_DEPTH_TEST);

        glPopMatrix();
    }

    private Vector3d getNextMotion(ThrowableEntity throwable, Vector3d motion) {
        if (throwable.isInWater()) {
            motion = motion.scale(0.8);
        } else {
            motion = motion.scale(0.99);
        }

        if (!throwable.hasNoGravity()) {
            motion.y -= throwable.getGravityVelocity();
        }

        return motion;
    }
}
//by z1dder --> ha1ke with <3
 
Начинающий
Статус
Оффлайн
Регистрация
7 Май 2024
Сообщения
79
Реакции[?]
0
Поинты[?]
0
ну дарова, че :roflanEbalo:

ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.


нувот, если есть чайники которые не смогут заменить Theme.штототам на ColorUtils.getColor -анлаки в будующем повезет


Prediction.java:
package ha1kep1dor1337.yasosal4leeenn.modules.impl.render;

import com.google.common.eventbus.Subscribe;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EnderPearlEntity;
import net.minecraft.entity.projectile.ThrowableEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import ha1kep1dor1337.yasosal4leeenn.events.EventDisplay;
import ha1kep1dor1337.yasosal4leeenn.events.WorldEvent;
import ha1kep1dor1337.yasosal4leeenn.modules.api.Category;
import ha1kep1dor1337.yasosal4leeenn.modules.api.Module;
import ha1kep1dor1337.yasosal4leeenn.modules.api.ModuleRegister;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.BooleanSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ColorSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ModeListSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ModeSetting;
import ha1kep1dor1337.yasosal4leeenn.ui.themes.Theme;
import ha1kep1dor1337.yasosal4leeenn.utils.projections.ProjectionUtil;
import ha1kep1dor1337.yasosal4leeenn.utils.render.color.ColorUtils;
import ha1kep1dor1337.yasosal4leeenn.utils.render.font.Fonts;
import ha1kep1dor1337.yasosal4leeenn.utils.render.rect.DisplayUtils;
import ha1kep1dor1337.yasosal4leeenn.utils.text.font.ClientFonts;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;

@ModuleRegister(name = "PearlPredictions", category = Category.Visual)
public class Predictions extends Module {

    public Predictions() {
        addSettings();
    }

    record PearlPoint(Vector3d position, int ticks) {
    }

    final List<PearlPoint> pearlPoints = new ArrayList<>();

    @Subscribe
    public void aa(EventDisplay e) {
        for (PearlPoint pearlPoint : pearlPoints) {
            Vector3d pos = pearlPoint.position;
            Vector2f projection = ProjectionUtil.project(pos.x, pos.y - 0.3F, pos.z);
            int ticks = pearlPoint.ticks;


            if (projection.equals(new Vector2f(Float.MAX_VALUE, Float.MAX_VALUE))) {
                continue;
            }

            double time = ticks * 50 / 1000.0;
            String text = String.format("%.1f" + " с", time);
            float width = Fonts.montserrat.getWidth(text, 7);

            float textWidth = width + 11 + 11;

            float posX = projection.x - textWidth / 2;
            float posX1 = projection.x  / 2;
            float posY = projection.y;


            DisplayUtils.drawRoundedRect(posX + 16, posY + 2 - 3, textWidth - 17, 16 - 3, 3, ColorUtils.setAlpha(Theme.mainRectColor, 100));
            DisplayUtils.drawCircle(posX + 7, posY + 6, 14,  ColorUtils.setAlpha(Theme.darkMainRectColor, 140));
            ClientFonts.icons[16].drawString(e.getMatrixStack(), "G", posX + 3 , posY + 5, ColorUtils.setAlpha(Theme.textColor, 255));
            //DisplayUtils.drawImage(new ResourceLocation("textures/item/ender_pearl.png"), (int) posX + 1.5f , (int) posY + 2 + 2.4f - 4, 11 , 11, -1);
            //ClientFonts.icons[18].drawString(e.getMatrixStack(), "G", posX + 4 , posY + 4 , Theme.textColor);
            Fonts.sfui.drawText(e.getMatrixStack(), text, (float) (posX + 18), (float) (posY + 6.5f - 4), Theme.textColor, 7);
        }
    }

    @Subscribe
    public void onRender(WorldEvent event) {
        glPushMatrix();

        glDisable(GL_TEXTURE_2D);
        glDisable(GL_DEPTH_TEST);

        glEnable(GL_BLEND);
        glEnable(GL_LINE_SMOOTH);

        Vector3d renderOffset = mc.getRenderManager().info.getProjectedView();

        glTranslated(-renderOffset.x, -renderOffset.y, -renderOffset.z);

        glLineWidth(3);

        buffer.begin(1, DefaultVertexFormats.POSITION);
        pearlPoints.clear();
        for (Entity entity : mc.world.getAllEntities()) {
            if (entity instanceof EnderPearlEntity throwable) {
                Vector3d motion = throwable.getMotion();
                Vector3d pos = throwable.getPositionVec();
                Vector3d prevPos;
                int ticks = 0;

                for (int i = 0; i < 150; i++) {
                    prevPos = pos;
                    pos = pos.add(motion);
                    motion = getNextMotion(throwable, motion);

                    buffer.pos(prevPos.x, prevPos.y, prevPos.z).endVertex();

                    RayTraceContext rayTraceContext = new RayTraceContext(
                            prevPos,
                            pos,
                            RayTraceContext.BlockMode.COLLIDER,
                            RayTraceContext.FluidMode.NONE,
                            throwable
                    );

                    BlockRayTraceResult blockHitResult = mc.world.rayTraceBlocks(rayTraceContext);

                    boolean isLast = blockHitResult.getType() == RayTraceResult.Type.BLOCK;

                    if (isLast) {
                        pos = blockHitResult.getHitVec();
                    }

                    buffer.pos(pos.x, pos.y, pos.z).endVertex();

                    if (blockHitResult.getType() == BlockRayTraceResult.Type.BLOCK || pos.y < -128) {
                        pearlPoints.add(new PearlPoint(pos, ticks));
                        break;
                    }
                    ticks++;
                }
            }
        }

        tessellator.draw();

        glDisable(GL_BLEND);
        glDisable(GL_LINE_SMOOTH);

        glEnable(GL_TEXTURE_2D);
        glEnable(GL_DEPTH_TEST);

        glPopMatrix();
    }

    private Vector3d getNextMotion(ThrowableEntity throwable, Vector3d motion) {
        if (throwable.isInWater()) {
            motion = motion.scale(0.8);
        } else {
            motion = motion.scale(0.99);
        }

        if (!throwable.hasNoGravity()) {
            motion.y -= throwable.getGravityVelocity();
        }

        return motion;
    }
}
//by z1dder --> ha1ke with <3
public Predictions() {
addSettings();
}
:roflanEbalo:
 
Забаненный
Статус
Оффлайн
Регистрация
5 Окт 2024
Сообщения
2
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
помоги у меня жалуется на fonts. а у тебя clientfonts которых нет совсем
 
Начинающий
Статус
Оффлайн
Регистрация
4 Май 2023
Сообщения
91
Реакции[?]
0
Поинты[?]
0
ну дарова, че :roflanEbalo:

ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.


нувот, если есть чайники которые не смогут заменить Theme.штототам на ColorUtils.getColor -анлаки в будующем повезет


Prediction.java:
package ha1kep1dor1337.yasosal4leeenn.modules.impl.render;

import com.google.common.eventbus.Subscribe;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EnderPearlEntity;
import net.minecraft.entity.projectile.ThrowableEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import ha1kep1dor1337.yasosal4leeenn.events.EventDisplay;
import ha1kep1dor1337.yasosal4leeenn.events.WorldEvent;
import ha1kep1dor1337.yasosal4leeenn.modules.api.Category;
import ha1kep1dor1337.yasosal4leeenn.modules.api.Module;
import ha1kep1dor1337.yasosal4leeenn.modules.api.ModuleRegister;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.BooleanSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ColorSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ModeListSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ModeSetting;
import ha1kep1dor1337.yasosal4leeenn.ui.themes.Theme;
import ha1kep1dor1337.yasosal4leeenn.utils.projections.ProjectionUtil;
import ha1kep1dor1337.yasosal4leeenn.utils.render.color.ColorUtils;
import ha1kep1dor1337.yasosal4leeenn.utils.render.font.Fonts;
import ha1kep1dor1337.yasosal4leeenn.utils.render.rect.DisplayUtils;
import ha1kep1dor1337.yasosal4leeenn.utils.text.font.ClientFonts;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;

@ModuleRegister(name = "PearlPredictions", category = Category.Visual)
public class Predictions extends Module {

    public Predictions() {
        addSettings();
    }

    record PearlPoint(Vector3d position, int ticks) {
    }

    final List<PearlPoint> pearlPoints = new ArrayList<>();

    @Subscribe
    public void aa(EventDisplay e) {
        for (PearlPoint pearlPoint : pearlPoints) {
            Vector3d pos = pearlPoint.position;
            Vector2f projection = ProjectionUtil.project(pos.x, pos.y - 0.3F, pos.z);
            int ticks = pearlPoint.ticks;


            if (projection.equals(new Vector2f(Float.MAX_VALUE, Float.MAX_VALUE))) {
                continue;
            }

            double time = ticks * 50 / 1000.0;
            String text = String.format("%.1f" + " с", time);
            float width = Fonts.montserrat.getWidth(text, 7);

            float textWidth = width + 11 + 11;

            float posX = projection.x - textWidth / 2;
            float posX1 = projection.x  / 2;
            float posY = projection.y;


            DisplayUtils.drawRoundedRect(posX + 16, posY + 2 - 3, textWidth - 17, 16 - 3, 3, ColorUtils.setAlpha(Theme.mainRectColor, 100));
            DisplayUtils.drawCircle(posX + 7, posY + 6, 14,  ColorUtils.setAlpha(Theme.darkMainRectColor, 140));
            ClientFonts.icons[16].drawString(e.getMatrixStack(), "G", posX + 3 , posY + 5, ColorUtils.setAlpha(Theme.textColor, 255));
            //DisplayUtils.drawImage(new ResourceLocation("textures/item/ender_pearl.png"), (int) posX + 1.5f , (int) posY + 2 + 2.4f - 4, 11 , 11, -1);
            //ClientFonts.icons[18].drawString(e.getMatrixStack(), "G", posX + 4 , posY + 4 , Theme.textColor);
            Fonts.sfui.drawText(e.getMatrixStack(), text, (float) (posX + 18), (float) (posY + 6.5f - 4), Theme.textColor, 7);
        }
    }

    @Subscribe
    public void onRender(WorldEvent event) {
        glPushMatrix();

        glDisable(GL_TEXTURE_2D);
        glDisable(GL_DEPTH_TEST);

        glEnable(GL_BLEND);
        glEnable(GL_LINE_SMOOTH);

        Vector3d renderOffset = mc.getRenderManager().info.getProjectedView();

        glTranslated(-renderOffset.x, -renderOffset.y, -renderOffset.z);

        glLineWidth(3);

        buffer.begin(1, DefaultVertexFormats.POSITION);
        pearlPoints.clear();
        for (Entity entity : mc.world.getAllEntities()) {
            if (entity instanceof EnderPearlEntity throwable) {
                Vector3d motion = throwable.getMotion();
                Vector3d pos = throwable.getPositionVec();
                Vector3d prevPos;
                int ticks = 0;

                for (int i = 0; i < 150; i++) {
                    prevPos = pos;
                    pos = pos.add(motion);
                    motion = getNextMotion(throwable, motion);

                    buffer.pos(prevPos.x, prevPos.y, prevPos.z).endVertex();

                    RayTraceContext rayTraceContext = new RayTraceContext(
                            prevPos,
                            pos,
                            RayTraceContext.BlockMode.COLLIDER,
                            RayTraceContext.FluidMode.NONE,
                            throwable
                    );

                    BlockRayTraceResult blockHitResult = mc.world.rayTraceBlocks(rayTraceContext);

                    boolean isLast = blockHitResult.getType() == RayTraceResult.Type.BLOCK;

                    if (isLast) {
                        pos = blockHitResult.getHitVec();
                    }

                    buffer.pos(pos.x, pos.y, pos.z).endVertex();

                    if (blockHitResult.getType() == BlockRayTraceResult.Type.BLOCK || pos.y < -128) {
                        pearlPoints.add(new PearlPoint(pos, ticks));
                        break;
                    }
                    ticks++;
                }
            }
        }

        tessellator.draw();

        glDisable(GL_BLEND);
        glDisable(GL_LINE_SMOOTH);

        glEnable(GL_TEXTURE_2D);
        glEnable(GL_DEPTH_TEST);

        glPopMatrix();
    }

    private Vector3d getNextMotion(ThrowableEntity throwable, Vector3d motion) {
        if (throwable.isInWater()) {
            motion = motion.scale(0.8);
        } else {
            motion = motion.scale(0.99);
        }

        if (!throwable.hasNoGravity()) {
            motion.y -= throwable.getGravityVelocity();
        }

        return motion;
    }
}
//by z1dder --> ha1ke with <3
/дель ни экспа риди
 
Забаненный
Статус
Оффлайн
Регистрация
26 Окт 2024
Сообщения
122
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ну дарова, че :roflanEbalo:

ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.


нувот, если есть чайники которые не смогут заменить Theme.штототам на ColorUtils.getColor -анлаки в будующем повезет


Prediction.java:
package ha1kep1dor1337.yasosal4leeenn.modules.impl.render;

import com.google.common.eventbus.Subscribe;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EnderPearlEntity;
import net.minecraft.entity.projectile.ThrowableEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import ha1kep1dor1337.yasosal4leeenn.events.EventDisplay;
import ha1kep1dor1337.yasosal4leeenn.events.WorldEvent;
import ha1kep1dor1337.yasosal4leeenn.modules.api.Category;
import ha1kep1dor1337.yasosal4leeenn.modules.api.Module;
import ha1kep1dor1337.yasosal4leeenn.modules.api.ModuleRegister;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.BooleanSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ColorSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ModeListSetting;
import ha1kep1dor1337.yasosal4leeenn.modules.settings.impl.ModeSetting;
import ha1kep1dor1337.yasosal4leeenn.ui.themes.Theme;
import ha1kep1dor1337.yasosal4leeenn.utils.projections.ProjectionUtil;
import ha1kep1dor1337.yasosal4leeenn.utils.render.color.ColorUtils;
import ha1kep1dor1337.yasosal4leeenn.utils.render.font.Fonts;
import ha1kep1dor1337.yasosal4leeenn.utils.render.rect.DisplayUtils;
import ha1kep1dor1337.yasosal4leeenn.utils.text.font.ClientFonts;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;

@ModuleRegister(name = "PearlPredictions", category = Category.Visual)
public class Predictions extends Module {

    public Predictions() {
        addSettings();
    }

    record PearlPoint(Vector3d position, int ticks) {
    }

    final List<PearlPoint> pearlPoints = new ArrayList<>();

    @Subscribe
    public void aa(EventDisplay e) {
        for (PearlPoint pearlPoint : pearlPoints) {
            Vector3d pos = pearlPoint.position;
            Vector2f projection = ProjectionUtil.project(pos.x, pos.y - 0.3F, pos.z);
            int ticks = pearlPoint.ticks;


            if (projection.equals(new Vector2f(Float.MAX_VALUE, Float.MAX_VALUE))) {
                continue;
            }

            double time = ticks * 50 / 1000.0;
            String text = String.format("%.1f" + " с", time);
            float width = Fonts.montserrat.getWidth(text, 7);

            float textWidth = width + 11 + 11;

            float posX = projection.x - textWidth / 2;
            float posX1 = projection.x  / 2;
            float posY = projection.y;


            DisplayUtils.drawRoundedRect(posX + 16, posY + 2 - 3, textWidth - 17, 16 - 3, 3, ColorUtils.setAlpha(Theme.mainRectColor, 100));
            DisplayUtils.drawCircle(posX + 7, posY + 6, 14,  ColorUtils.setAlpha(Theme.darkMainRectColor, 140));
            ClientFonts.icons[16].drawString(e.getMatrixStack(), "G", posX + 3 , posY + 5, ColorUtils.setAlpha(Theme.textColor, 255));
            //DisplayUtils.drawImage(new ResourceLocation("textures/item/ender_pearl.png"), (int) posX + 1.5f , (int) posY + 2 + 2.4f - 4, 11 , 11, -1);
            //ClientFonts.icons[18].drawString(e.getMatrixStack(), "G", posX + 4 , posY + 4 , Theme.textColor);
            Fonts.sfui.drawText(e.getMatrixStack(), text, (float) (posX + 18), (float) (posY + 6.5f - 4), Theme.textColor, 7);
        }
    }

    @Subscribe
    public void onRender(WorldEvent event) {
        glPushMatrix();

        glDisable(GL_TEXTURE_2D);
        glDisable(GL_DEPTH_TEST);

        glEnable(GL_BLEND);
        glEnable(GL_LINE_SMOOTH);

        Vector3d renderOffset = mc.getRenderManager().info.getProjectedView();

        glTranslated(-renderOffset.x, -renderOffset.y, -renderOffset.z);

        glLineWidth(3);

        buffer.begin(1, DefaultVertexFormats.POSITION);
        pearlPoints.clear();
        for (Entity entity : mc.world.getAllEntities()) {
            if (entity instanceof EnderPearlEntity throwable) {
                Vector3d motion = throwable.getMotion();
                Vector3d pos = throwable.getPositionVec();
                Vector3d prevPos;
                int ticks = 0;

                for (int i = 0; i < 150; i++) {
                    prevPos = pos;
                    pos = pos.add(motion);
                    motion = getNextMotion(throwable, motion);

                    buffer.pos(prevPos.x, prevPos.y, prevPos.z).endVertex();

                    RayTraceContext rayTraceContext = new RayTraceContext(
                            prevPos,
                            pos,
                            RayTraceContext.BlockMode.COLLIDER,
                            RayTraceContext.FluidMode.NONE,
                            throwable
                    );

                    BlockRayTraceResult blockHitResult = mc.world.rayTraceBlocks(rayTraceContext);

                    boolean isLast = blockHitResult.getType() == RayTraceResult.Type.BLOCK;

                    if (isLast) {
                        pos = blockHitResult.getHitVec();
                    }

                    buffer.pos(pos.x, pos.y, pos.z).endVertex();

                    if (blockHitResult.getType() == BlockRayTraceResult.Type.BLOCK || pos.y < -128) {
                        pearlPoints.add(new PearlPoint(pos, ticks));
                        break;
                    }
                    ticks++;
                }
            }
        }

        tessellator.draw();

        glDisable(GL_BLEND);
        glDisable(GL_LINE_SMOOTH);

        glEnable(GL_TEXTURE_2D);
        glEnable(GL_DEPTH_TEST);

        glPopMatrix();
    }

    private Vector3d getNextMotion(ThrowableEntity throwable, Vector3d motion) {
        if (throwable.isInWater()) {
            motion = motion.scale(0.8);
        } else {
            motion = motion.scale(0.99);
        }

        if (!throwable.hasNoGravity()) {
            motion.y -= throwable.getGravityVelocity();
        }

        return motion;
    }
}
//by z1dder --> ha1ke with <3
1730535486238.png


Смешной ты челик)

1730535507528.png
/дель ни экспа риди
помоги у меня жалуется на fonts. а у тебя clientfonts которых нет совсем
потому что это даже не ты писал, а дев арикса (noad) с помощью чат гпт
 
Начинающий
Статус
Оффлайн
Регистрация
8 Июн 2024
Сообщения
258
Реакции[?]
0
Поинты[?]
0
че блять
у меня этот перл предикт с конца июля
хз че сливали че нет
 
Начинающий
Статус
Оффлайн
Регистрация
11 Май 2024
Сообщения
241
Реакции[?]
3
Поинты[?]
0
Посмотреть вложение 289298


Смешной ты челик)

Посмотреть вложение 289299



потому что это даже не ты писал, а дев арикса (noad) с помощью чат гпт
Так то я их писал но ок
 
Забаненный
Статус
Оффлайн
Регистрация
26 Окт 2024
Сообщения
122
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу