FakeLag new FT

Начинающий
Статус
Оффлайн
Регистрация
9 Окт 2024
Сообщения
39
Реакции[?]
0
Поинты[?]
0
Код:
@ModuleRegister(name = "FakeLag", category = Category.Misc)
public class FakeLag extends Module {

    private final List<EntityPosition> positions = new ArrayList<>();
    private int ticks = 0;
    private static final int MAX_POSITIONS = 20;

    @Subscribe
    private void onUpdate(WorldEvent event) {
        ticks++;
        if (ticks % 2 == 0) {
            positions.add(new EntityPosition(
                    mc.player.getPosX(),
                    mc.player.getPosY(),
                    mc.player.getPosZ(),
                    mc.player.rotationYaw,
                    mc.player.rotationPitch
            ));
        }

        if (positions.size() > MAX_POSITIONS) {
            positions.remove(0);
        }
    }

    @Subscribe
    private void onRender(WorldEvent event) {
        if (positions.isEmpty()) return;

        GlStateManager.pushMatrix();
        RenderSystem.enableBlend();
        RenderSystem.disableTexture();
        RenderSystem.disableDepthTest();

        for (EntityPosition pos : positions) {
            float alpha = (float) positions.indexOf(pos) / positions.size();
            renderGhost(pos, alpha, event.getPartialTicks());
        }

        RenderSystem.enableTexture();
        RenderSystem.enableDepthTest();
        RenderSystem.disableBlend();
        GlStateManager.popMatrix();
    }

    private void renderGhost(EntityPosition pos, float alpha, float partialTicks) {
        GlStateManager.pushMatrix();

        RenderSystem.translated(
                pos.x - mc.getRenderManager().info.getProjectedView().x,
                pos.y - mc.getRenderManager().info.getProjectedView().y,
                pos.z - mc.getRenderManager().info.getProjectedView().z
        );

        RenderSystem.rotatef(-pos.yaw, 0, 1, 0);

        buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
        drawPlayerOutline(0.6f, alpha);
        buffer.finishDrawing();

        GlStateManager.popMatrix();
    }

    private void drawPlayerOutline(float width, float alpha) {
        buffer.pos(-width, 0, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(-width, 1.8f, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(width, 1.8f, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(width, 0, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
    }

    private static class EntityPosition {
        double x, y, z;
        float yaw, pitch;

        public EntityPosition(double x, double y, double z, float yaw, float pitch) {
            this.x = x;
            this.y = y;
            this.z = z;
            this.yaw = yaw;
            this.pitch = pitch;
        }
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
26 Окт 2024
Сообщения
252
Реакции[?]
0
Поинты[?]
0
Код:
@ModuleRegister(name = "FakeLag", category = Category.Misc)
public class FakeLag extends Module {

    private final List<EntityPosition> positions = new ArrayList<>();
    private int ticks = 0;
    private static final int MAX_POSITIONS = 20;

    @Subscribe
    private void onUpdate(WorldEvent event) {
        ticks++;
        if (ticks % 2 == 0) {
            positions.add(new EntityPosition(
                    mc.player.getPosX(),
                    mc.player.getPosY(),
                    mc.player.getPosZ(),
                    mc.player.rotationYaw,
                    mc.player.rotationPitch
            ));
        }

        if (positions.size() > MAX_POSITIONS) {
            positions.remove(0);
        }
    }

    @Subscribe
    private void onRender(WorldEvent event) {
        if (positions.isEmpty()) return;

        GlStateManager.pushMatrix();
        RenderSystem.enableBlend();
        RenderSystem.disableTexture();
        RenderSystem.disableDepthTest();

        for (EntityPosition pos : positions) {
            float alpha = (float) positions.indexOf(pos) / positions.size();
            renderGhost(pos, alpha, event.getPartialTicks());
        }

        RenderSystem.enableTexture();
        RenderSystem.enableDepthTest();
        RenderSystem.disableBlend();
        GlStateManager.popMatrix();
    }

    private void renderGhost(EntityPosition pos, float alpha, float partialTicks) {
        GlStateManager.pushMatrix();

        RenderSystem.translated(
                pos.x - mc.getRenderManager().info.getProjectedView().x,
                pos.y - mc.getRenderManager().info.getProjectedView().y,
                pos.z - mc.getRenderManager().info.getProjectedView().z
        );

        RenderSystem.rotatef(-pos.yaw, 0, 1, 0);

        buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
        drawPlayerOutline(0.6f, alpha);
        buffer.finishDrawing();

        GlStateManager.popMatrix();
    }

    private void drawPlayerOutline(float width, float alpha) {
        buffer.pos(-width, 0, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(-width, 1.8f, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(width, 1.8f, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(width, 0, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
    }

    private static class EntityPosition {
        double x, y, z;
        float yaw, pitch;

        public EntityPosition(double x, double y, double z, float yaw, float pitch) {
            this.x = x;
            this.y = y;
            this.z = z;
            this.yaw = yaw;
            this.pitch = pitch;
        }
    }
}
спасибо
 
Начинающий
Статус
Оффлайн
Регистрация
20 Июн 2024
Сообщения
427
Реакции[?]
1
Поинты[?]
2K
Код:
@ModuleRegister(name = "FakeLag", category = Category.Misc)
public class FakeLag extends Module {

    private final List<EntityPosition> positions = new ArrayList<>();
    private int ticks = 0;
    private static final int MAX_POSITIONS = 20;

    @Subscribe
    private void onUpdate(WorldEvent event) {
        ticks++;
        if (ticks % 2 == 0) {
            positions.add(new EntityPosition(
                    mc.player.getPosX(),
                    mc.player.getPosY(),
                    mc.player.getPosZ(),
                    mc.player.rotationYaw,
                    mc.player.rotationPitch
            ));
        }

        if (positions.size() > MAX_POSITIONS) {
            positions.remove(0);
        }
    }

    @Subscribe
    private void onRender(WorldEvent event) {
        if (positions.isEmpty()) return;

        GlStateManager.pushMatrix();
        RenderSystem.enableBlend();
        RenderSystem.disableTexture();
        RenderSystem.disableDepthTest();

        for (EntityPosition pos : positions) {
            float alpha = (float) positions.indexOf(pos) / positions.size();
            renderGhost(pos, alpha, event.getPartialTicks());
        }

        RenderSystem.enableTexture();
        RenderSystem.enableDepthTest();
        RenderSystem.disableBlend();
        GlStateManager.popMatrix();
    }

    private void renderGhost(EntityPosition pos, float alpha, float partialTicks) {
        GlStateManager.pushMatrix();

        RenderSystem.translated(
                pos.x - mc.getRenderManager().info.getProjectedView().x,
                pos.y - mc.getRenderManager().info.getProjectedView().y,
                pos.z - mc.getRenderManager().info.getProjectedView().z
        );

        RenderSystem.rotatef(-pos.yaw, 0, 1, 0);

        buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
        drawPlayerOutline(0.6f, alpha);
        buffer.finishDrawing();

        GlStateManager.popMatrix();
    }

    private void drawPlayerOutline(float width, float alpha) {
        buffer.pos(-width, 0, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(-width, 1.8f, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(width, 1.8f, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(width, 0, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
    }

    private static class EntityPosition {
        double x, y, z;
        float yaw, pitch;

        public EntityPosition(double x, double y, double z, float yaw, float pitch) {
            this.x = x;
            this.y = y;
            this.z = z;
            this.yaw = yaw;
            this.pitch = pitch;
        }
    }
}
real lag
 
ЧВК EB_LAN
Эксперт
Статус
Оффлайн
Регистрация
26 Янв 2021
Сообщения
1,719
Реакции[?]
564
Поинты[?]
233K
Код:
@ModuleRegister(name = "FakeLag", category = Category.Misc)
public class FakeLag extends Module {

    private final List<EntityPosition> positions = new ArrayList<>();
    private int ticks = 0;
    private static final int MAX_POSITIONS = 20;

    @Subscribe
    private void onUpdate(WorldEvent event) {
        ticks++;
        if (ticks % 2 == 0) {
            positions.add(new EntityPosition(
                    mc.player.getPosX(),
                    mc.player.getPosY(),
                    mc.player.getPosZ(),
                    mc.player.rotationYaw,
                    mc.player.rotationPitch
            ));
        }

        if (positions.size() > MAX_POSITIONS) {
            positions.remove(0);
        }
    }

    @Subscribe
    private void onRender(WorldEvent event) {
        if (positions.isEmpty()) return;

        GlStateManager.pushMatrix();
        RenderSystem.enableBlend();
        RenderSystem.disableTexture();
        RenderSystem.disableDepthTest();

        for (EntityPosition pos : positions) {
            float alpha = (float) positions.indexOf(pos) / positions.size();
            renderGhost(pos, alpha, event.getPartialTicks());
        }

        RenderSystem.enableTexture();
        RenderSystem.enableDepthTest();
        RenderSystem.disableBlend();
        GlStateManager.popMatrix();
    }

    private void renderGhost(EntityPosition pos, float alpha, float partialTicks) {
        GlStateManager.pushMatrix();

        RenderSystem.translated(
                pos.x - mc.getRenderManager().info.getProjectedView().x,
                pos.y - mc.getRenderManager().info.getProjectedView().y,
                pos.z - mc.getRenderManager().info.getProjectedView().z
        );

        RenderSystem.rotatef(-pos.yaw, 0, 1, 0);

        buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
        drawPlayerOutline(0.6f, alpha);
        buffer.finishDrawing();

        GlStateManager.popMatrix();
    }

    private void drawPlayerOutline(float width, float alpha) {
        buffer.pos(-width, 0, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(-width, 1.8f, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(width, 1.8f, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
        buffer.pos(width, 0, -width).color(1f, 1f, 1f, alpha * 0.3f).endVertex();
    }

    private static class EntityPosition {
        double x, y, z;
        float yaw, pitch;

        public EntityPosition(double x, double y, double z, float yaw, float pitch) {
            this.x = x;
            this.y = y;
            this.z = z;
            this.yaw = yaw;
            this.pitch = pitch;
        }
    }
}
я не кубоголовый конечно, но почему ты сделал неверный спам на подобии тиккаунта, а также что в игре клемпит до 20 твои макс позиции, референс с игры или сервера который что-то такое делает предоставишь?

помоему тебе проще было бы сделать на подобии чего-то такого что-бы и код был чище в этом плане и всё следовало как раз таки верно а не тикс % 2 == 0 что странно братуль
Java:
     for (int i = 0; i < MAX_POSITIONS; i++)  {
        positions.add(new EntityPosition(
                mc.player.getPosX(), mc.player.getPosY(), mc.player.getPosZ(),
                mc.player.rotationYaw, mc.player.rotationPitch
        ));

        if (positions.size() >= MAX_POSITIONS)
            positions.remove(0);
    };
я конечно не майнкрафтер но может мне всетаки попробовать взять клиент какой либо и просто фулл ребилднуть что-бы всё было идеально по полочкам и заполнено много чем по фану ибо я так и не обмазывался в этом даже, только на фоне так базарил
 
Последнее редактирование:
Сверху Снизу