Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Вопрос Ктото может дать autoloot

Нужен авто лут чтоб на вулкане с князям Лутаться
сливаль же вот

12312312:
Expand Collapse Copy
package drain.client.module.func;

import drain.client.module.Module;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.World;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;

import java.util.List;

public class TargetItem extends Module {

    public TargetItem() {
        super("TargetItem [Brivta Skid is Beta]");
    }

    @SubscribeEvent
    public void onPlayerTick(TickEvent.PlayerTickEvent event) {
        if (event.phase == TickEvent.Phase.END) {
            PlayerEntity player = event.player;
            World world = player.level;
            AxisAlignedBB searchArea = new AxisAlignedBB(
                    player.position().x - 50, player.position().y - 50, player.position().z - 50,
                    player.position().x + 50, player.position().y + 50, player.position().z + 50
            );

            List<ItemEntity> nearbyItems = world.getEntitiesOfClass(ItemEntity.class, searchArea);

            for (ItemEntity itemEntity : nearbyItems) {
                ItemStack stack = itemEntity.getItem();
                if (stack.getItem() == Items.TOTEM_OF_UNDYING ||
                        stack.getItem() == Items.PLAYER_HEAD ||
                        stack.getItem() == Items.TRIPWIRE_HOOK) {
                    flyTowardsItem(player, itemEntity.position());
                }
            }
        }
    }

    private void flyTowardsItem(PlayerEntity player, Vector3d targetPos) {
        if (isWearingElytra(player)) {
            player.startFallFlying();
            adjustPlayerRotation(player, targetPos);
        }
    }

    private boolean isWearingElytra(PlayerEntity player) {
        ItemStack chestItem = player.getItemBySlot(EquipmentSlotType.CHEST);
        return chestItem.getItem() == Items.ELYTRA;
    }

    private void adjustPlayerRotation(PlayerEntity player, Vector3d targetPos) {
        Vector3d direction = targetPos.subtract(player.position()).normalize();
        double dx = direction.x;
        double dy = direction.y;
        double dz = direction.z;
        double yaw = Math.atan2(dz, dx) - Math.PI / 2;
        double pitch = -Math.atan2(dy, Math.sqrt(dx * dx + dz * dz));
        player.yRot = (float) Math.toDegrees(yaw);
        player.xRot = (float) Math.toDegrees(pitch);
    }
}
Спуки и холитайм
123123:
Expand Collapse Copy
package drain.client.module.func;

import drain.client.module.Module;
import net.minecraft.client.Minecraft;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;

public class VulcanFix extends Module {
    public VulcanFix() {
        super("VulcanFix");
    }

    Minecraft mc = Minecraft.getInstance();

    @SubscribeEvent
    public void VulcanFix(TickEvent e) {
        if (mc.player.isOnGround()) {
            mc.player.stopFallFlying();
        }
    }
}
 
Назад
Сверху Снизу