Исходник PenusWare | AimBow | exp 3.1 full renamed base

Начинающий
Статус
Оффлайн
Регистрация
20 Июн 2024
Сообщения
285
Реакции[?]
1
Поинты[?]
1K

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

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

Спасибо!

Всё как в прошлой теме со сливом.
Сам шедевро код:


levako_realme_aim.java:
package mpp.venusfr.operationsl.impl.combat;

import com.google.common.eventbus.Subscribe;
import java.util.Iterator;
import java.util.List;
import mpp.venusfr.happening.HappeningUpdate;
import mpp.venusfr.operationsl.api.Category;
import mpp.venusfr.operationsl.api.Module;
import mpp.venusfr.operationsl.api.ModuleRegister;
import mpp.venusfr.operationsl.settings.Setting;
import mpp.venusfr.operationsl.settings.impl.BooleanSetting;
import mpp.venusfr.operationsl.settings.impl.SliderSetting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BowItem;
import net.minecraft.item.CrossbowItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.TridentItem;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;

@ModuleRegister(name = "LevakoAim", type = Category.Combat)
public class AimBow extends Module {
  
    private final BooleanSetting useBow = new BooleanSetting("Лу2к", false);
    private final BooleanSetting useCrossbow = new BooleanSetting("Арбалет", false);
    private final BooleanSetting trident = new BooleanSetting("Трезубец", true);
    private final SliderSetting correctionSlider = new SliderSetting("Ко321ррекция по Y", 1.5F, 0.0F, 5.0F, 0.1F);
    private final SliderSetting distanceSlider = new SliderSetting("Дист321анция", 16.0F, 4.0F, 140.0F, 1.0F);
    private final BooleanSetting targetMobs = new BooleanSetting("Мо312бы", false);
    private final BooleanSetting targetPlayers = new BooleanSetting("Игро312ки", true);
    private final BooleanSetting smoothness = new BooleanSetting("Плавная 3231наводка", false);

    public AimBow() {
        super();
    
        Setting[] settings = new Setting[8];
        settings[0] = this.smoothness;
        settings[1] = this.trident;
        settings[2] = this.targetPlayers;
        settings[3] = this.targetMobs;
        settings[4] = this.useBow;
        settings[5] = this.useCrossbow;
        settings[6] = this.distanceSlider;
        settings[7] = this.correctionSlider;
        this.addSettings(settings);
    }

    public void aimAtNearestEntity(LivingEntity player) {
        double closestDistance = Double.MAX_VALUE;
        Entity closestEntity = null;
        World world = player.world;
        AxisAlignedBB boundingBox = player.getBoundingBox().grow((double) this.distanceSlider.get());
        List<Entity> entities = world.getEntitiesWithinAABBExcludingEntity(player, boundingBox);

        for (Entity entity : entities) {
            if (entity instanceof LivingEntity) {
                if (entity instanceof PlayerEntity && this.targetPlayers.get() || !(entity instanceof PlayerEntity) && this.targetMobs.get()) {
                    double distance = player.getDistanceSq(entity);
                    if (distance < closestDistance && player.canEntityBeSeen(entity)) {
                        closestDistance = distance;
                        closestEntity = entity;
                    }
                }
            }
        }

        if (closestEntity != null) {
            double posX = closestEntity.getPosX();
            double posY = closestEntity.getPosY() + (double) closestEntity.getEyeHeight();
            double posZ = closestEntity.getPosZ();
            double playerPosX = player.getPosX();
            double playerPosY = player.getPosYEye() + (double) player.getEyeHeight();
            double playerPosZ = player.getPosZ();
            double deltaX = posX - playerPosX;
            double deltaY = posY + (double) this.correctionSlider.get() * 1.0 - playerPosY;
            double deltaZ = posZ - playerPosZ;
            double distance = MathHelper.sqrt(deltaX * deltaX + deltaZ * deltaZ);
            float yaw = (float) (MathHelper.atan2(deltaZ, deltaX) * 57.29577951308232) - 90.0F;
            float pitch = (float) (-(MathHelper.atan2(deltaY, distance) * 57.29577951308232));

            if (this.smoothness.get()) {
                player.rotationYawHead = MathHelper.lerp(0.32F, player.rotationYawHead, yaw);
                player.rotationPitchHead = MathHelper.lerp(0.32F, player.rotationPitchHead, pitch);
                player.rotationYaw = MathHelper.lerp(0.32F, player.rotationYaw, yaw);
                player.rotationPitch = MathHelper.lerp(0.32F, player.rotationPitch, pitch);
            } else {
                player.rotationYawHead = yaw;
                player.rotationPitchHead = pitch;
                player.rotationYaw = yaw;
                player.rotationPitch = pitch;
            }
        }
    }

    @Subscribe
    public void onUpdate(HappeningUpdate event) {
        Minecraft mc = Minecraft.getInstance();
        ClientPlayerEntity player = mc.player;

        if (player.isHandActive()) {
            ItemStack activeItem = player.getActiveItemStack();
            if ((activeItem.getItem() instanceof BowItem && this.useBow.get()) ||
                (activeItem.getItem() instanceof CrossbowItem && this.useCrossbow.get()) ||
                (activeItem.getItem() instanceof TridentItem && this.trident.get())) {
                this.aimAtNearestEntity(player);
            }
        }
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
30 Июл 2023
Сообщения
423
Реакции[?]
2
Поинты[?]
1K
Всё как в прошлой теме со сливом.
Сам шедевро код:


levako_realme_aim.java:
package mpp.venusfr.operationsl.impl.combat;

import com.google.common.eventbus.Subscribe;
import java.util.Iterator;
import java.util.List;
import mpp.venusfr.happening.HappeningUpdate;
import mpp.venusfr.operationsl.api.Category;
import mpp.venusfr.operationsl.api.Module;
import mpp.venusfr.operationsl.api.ModuleRegister;
import mpp.venusfr.operationsl.settings.Setting;
import mpp.venusfr.operationsl.settings.impl.BooleanSetting;
import mpp.venusfr.operationsl.settings.impl.SliderSetting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BowItem;
import net.minecraft.item.CrossbowItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.TridentItem;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;

@ModuleRegister(name = "LevakoAim", type = Category.Combat)
public class AimBow extends Module {
 
    private final BooleanSetting useBow = new BooleanSetting("Лу2к", false);
    private final BooleanSetting useCrossbow = new BooleanSetting("Арбалет", false);
    private final BooleanSetting trident = new BooleanSetting("Трезубец", true);
    private final SliderSetting correctionSlider = new SliderSetting("Ко321ррекция по Y", 1.5F, 0.0F, 5.0F, 0.1F);
    private final SliderSetting distanceSlider = new SliderSetting("Дист321анция", 16.0F, 4.0F, 140.0F, 1.0F);
    private final BooleanSetting targetMobs = new BooleanSetting("Мо312бы", false);
    private final BooleanSetting targetPlayers = new BooleanSetting("Игро312ки", true);
    private final BooleanSetting smoothness = new BooleanSetting("Плавная 3231наводка", false);

    public AimBow() {
        super();
   
        Setting[] settings = new Setting[8];
        settings[0] = this.smoothness;
        settings[1] = this.trident;
        settings[2] = this.targetPlayers;
        settings[3] = this.targetMobs;
        settings[4] = this.useBow;
        settings[5] = this.useCrossbow;
        settings[6] = this.distanceSlider;
        settings[7] = this.correctionSlider;
        this.addSettings(settings);
    }

    public void aimAtNearestEntity(LivingEntity player) {
        double closestDistance = Double.MAX_VALUE;
        Entity closestEntity = null;
        World world = player.world;
        AxisAlignedBB boundingBox = player.getBoundingBox().grow((double) this.distanceSlider.get());
        List<Entity> entities = world.getEntitiesWithinAABBExcludingEntity(player, boundingBox);

        for (Entity entity : entities) {
            if (entity instanceof LivingEntity) {
                if (entity instanceof PlayerEntity && this.targetPlayers.get() || !(entity instanceof PlayerEntity) && this.targetMobs.get()) {
                    double distance = player.getDistanceSq(entity);
                    if (distance < closestDistance && player.canEntityBeSeen(entity)) {
                        closestDistance = distance;
                        closestEntity = entity;
                    }
                }
            }
        }

        if (closestEntity != null) {
            double posX = closestEntity.getPosX();
            double posY = closestEntity.getPosY() + (double) closestEntity.getEyeHeight();
            double posZ = closestEntity.getPosZ();
            double playerPosX = player.getPosX();
            double playerPosY = player.getPosYEye() + (double) player.getEyeHeight();
            double playerPosZ = player.getPosZ();
            double deltaX = posX - playerPosX;
            double deltaY = posY + (double) this.correctionSlider.get() * 1.0 - playerPosY;
            double deltaZ = posZ - playerPosZ;
            double distance = MathHelper.sqrt(deltaX * deltaX + deltaZ * deltaZ);
            float yaw = (float) (MathHelper.atan2(deltaZ, deltaX) * 57.29577951308232) - 90.0F;
            float pitch = (float) (-(MathHelper.atan2(deltaY, distance) * 57.29577951308232));

            if (this.smoothness.get()) {
                player.rotationYawHead = MathHelper.lerp(0.32F, player.rotationYawHead, yaw);
                player.rotationPitchHead = MathHelper.lerp(0.32F, player.rotationPitchHead, pitch);
                player.rotationYaw = MathHelper.lerp(0.32F, player.rotationYaw, yaw);
                player.rotationPitch = MathHelper.lerp(0.32F, player.rotationPitch, pitch);
            } else {
                player.rotationYawHead = yaw;
                player.rotationPitchHead = pitch;
                player.rotationYaw = yaw;
                player.rotationPitch = pitch;
            }
        }
    }

    @Subscribe
    public void onUpdate(HappeningUpdate event) {
        Minecraft mc = Minecraft.getInstance();
        ClientPlayerEntity player = mc.player;

        if (player.isHandActive()) {
            ItemStack activeItem = player.getActiveItemStack();
            if ((activeItem.getItem() instanceof BowItem && this.useBow.get()) ||
                (activeItem.getItem() instanceof CrossbowItem && this.useCrossbow.get()) ||
                (activeItem.getItem() instanceof TridentItem && this.trident.get())) {
                this.aimAtNearestEntity(player);
            }
        }
    }
}
Го не будем пастить
 
Сверху Снизу