Вопрос Nuker

Начинающий
Статус
Оффлайн
Регистрация
13 Сен 2024
Сообщения
94
Реакции[?]
0
Поинты[?]
0

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

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

Спасибо!

у меня есть такой нюкер но он не ломает блоки помогите пж


Код:
package me.kuraga.functions.impl.player;

import me.kuraga.functions.api.Category;
import me.kuraga.functions.api.Function;
import me.kuraga.functions.api.FunctionRegister;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.OreBlock;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector3d;

import java.util.*;

@FunctionRegister(name = "Nuker", type = Category.Player)
public class Nuker extends Function {
    private final Minecraft mc = Minecraft.getInstance();
    private List<BlockPos> targetedPoses = new ArrayList<>();

    private Vector3d playerVec3dPos() {
        return new Vector3d(mc.player.getPosX(), mc.player.getPosY() + 0.51, mc.player.getPosZ());
    }

    private ArrayList<BlockPos> positionsZone(Vector3d playerPos, float[] ranges) {
        ArrayList<BlockPos> poses = new ArrayList<>();

        for (int x = (int) (-ranges[0]); x < ranges[0]; x++) {
            for (int z = (int) (-ranges[0]); z < ranges[0]; z++) {
                for (int y = (int) (-ranges[2]); y < ranges[1]; y++) {
                    BlockPos pos = new BlockPos(playerPos.x + x, playerPos.y + y, playerPos.z + z);
                    poses.add(pos);
                }
            }
        }

        poses.sort(Comparator.comparingDouble(posx -> posx.distanceSq(mc.player.getPosition())));
        return poses;
    }

    private boolean isUnbreakableBlock(Block block) {
        return block == Blocks.AIR || block == Blocks.BEDROCK || block == Blocks.BARRIER && !mc.player.isCreative();
    }

    private boolean seenBlockPos(BlockPos pos) {
        return mc.player.canEntityBeSeen(new Vector3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5));
    }

    private boolean canSeenBlock(BlockPos pos, boolean ignoreNoSeen) {
        return !this.seenBlockPos(pos) && pos != mc.player.getPosition().add(0, 1, 0) ? ignoreNoSeen : true;
    }

    private boolean blockIsInRange(BlockPos pos, float[] ranges, boolean returnTrue) {
        double dX = pos.getX() - mc.player.getPosX();
        double dY = pos.getY() - mc.player.getPosY();
        double dZ = pos.getZ() - mc.player.getPosZ();
        double distance = Math.sqrt(dX * dX + dY * dY + dZ * dZ);
        return returnTrue || distance <= ranges[0];
    }

    private boolean canBreakBlock(BlockPos pos) {
        BlockState state = mc.world.getBlockState(pos);
        Block block = state.getBlock();
        return (block instanceof OreBlock || block == Blocks.REDSTONE_ORE || state.getMaterial() == Material.ROCK);
    }

    private List<BlockPos> getTargetBlocks(int maxCount, Vector3d playerPos, float[] ranges, boolean ignoreWalls, boolean checkDistance) {
        this.targetedPoses.clear();
        for (BlockPos position : this.positionsZone(playerPos, ranges)) {
            BlockState state = mc.world.getBlockState(position);
            Block block = state.getBlock();
            if (this.blockIsInRange(position, ranges, checkDistance) && !this.isUnbreakableBlock(block) && this.canSeenBlock(position, ignoreWalls) && this.canBreakBlock(position) && this.targetedPoses.size() < maxCount) {
                this.targetedPoses.add(position);
            }
        }

        return this.targetedPoses;
    }

    private float[] getRanges() {
        return new float[]{3.5F, 5.0F, 0.0F};
    }

    private void setTargetPositions(Vector3d playerPos, float[] ranges, boolean ignoreWalls, boolean checkDistance, int maxPosesCount) {
        this.targetedPoses = this.getTargetBlocks(maxPosesCount, playerPos, ranges, ignoreWalls, checkDistance);
    }

    public void onUpdate() {
        setTargetPositions(this.playerVec3dPos(), this.getRanges(), false, true, 10);
        processBreakBlock(targetedPoses);
    }

    private void processBreakBlock(List<BlockPos> poses) {
        poses.forEach(pos -> {
            if (pos != null) {
                BlockState state = mc.world.getBlockState(pos);
                Block block = state.getBlock();


                if (!isUnbreakableBlock(block)) {
                    boolean success = mc.playerController.onPlayerDamageBlock(pos, mc.player.getHorizontalFacing());

                    if (success) {
                        mc.player.swingArm(Hand.MAIN_HAND);
                    }
                }
            }
        });
    }

}
 
Начинающий
Статус
Оффлайн
Регистрация
4 Апр 2023
Сообщения
12
Реакции[?]
0
Поинты[?]
0
У тебя нюкер работает на определенные блоки, вот код где он ломает все блоки
Код:
package me.kuraga.functions.impl.player;

import me.kuraga.functions.api.Category;
import me.kuraga.functions.api.Function;
import me.kuraga.functions.api.FunctionRegister;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector3d;

import java.util.*;

@FunctionRegister(name = "Nuker", type = Category.Player)
public class Nuker extends Function {
    private final Minecraft mc = Minecraft.getInstance();
    private List<BlockPos> targetedPoses = new ArrayList<>();

    private Vector3d playerVec3dPos() {
        return new Vector3d(mc.player.getPosX(), mc.player.getPosY() + 0.51, mc.player.getPosZ());
    }

    private ArrayList<BlockPos> positionsZone(Vector3d playerPos, float[] ranges) {
        ArrayList<BlockPos> poses = new ArrayList<>();

        for (int x = (int) (-ranges[0]); x < ranges[0]; x++) {
            for (int z = (int) (-ranges[0]); z < ranges[0]; z++) {
                for (int y = (int) (-ranges[2]); y < ranges[1]; y++) {
                    BlockPos pos = new BlockPos(playerPos.x + x, playerPos.y + y, playerPos.z + z);
                    poses.add(pos);
                }
            }
        }

        poses.sort(Comparator.comparingDouble(posx -> posx.distanceSq(mc.player.getPosition())));
        return poses;
    }

    private boolean isUnbreakableBlock(Block block) {
        return block == Blocks.AIR || block == Blocks.BEDROCK || block == Blocks.BARRIER && !mc.player.isCreative();
    }

    private boolean seenBlockPos(BlockPos pos) {
        return mc.player.canEntityBeSeen(new Vector3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5));
    }

    private boolean canSeenBlock(BlockPos pos, boolean ignoreNoSeen) {
        return !this.seenBlockPos(pos) && pos != mc.player.getPosition().add(0, 1, 0) ? ignoreNoSeen : true;
    }

    private boolean blockIsInRange(BlockPos pos, float[] ranges, boolean returnTrue) {
        double dX = pos.getX() - mc.player.getPosX();
        double dY = pos.getY() - mc.player.getPosY();
        double dZ = pos.getZ() - mc.player.getPosZ();
        double distance = Math.sqrt(dX * dX + dY * dY + dZ * dZ);
        return returnTrue || distance <= ranges[0];
    }

    private boolean canBreakBlock(BlockPos pos) {
        // На true для всех блоков
        return true;
    }

    private List<BlockPos> getTargetBlocks(int maxCount, Vector3d playerPos, float[] ranges, boolean ignoreWalls, boolean checkDistance) {
        this.targetedPoses.clear();
        for (BlockPos position : this.positionsZone(playerPos, ranges)) {
            BlockState state = mc.world.getBlockState(position);
            Block block = state.getBlock();
            if (this.blockIsInRange(position, ranges, checkDistance) && !this.isUnbreakableBlock(block) && this.canSeenBlock(position, ignoreWalls) && this.canBreakBlock(position) && this.targetedPoses.size() < maxCount) {
                this.targetedPoses.add(position);
            }
        }

        return this.targetedPoses;
    }

    private float[] getRanges() {
        return new float[]{3.5F, 5.0F, 0.0F};
    }

    private void setTargetPositions(Vector3d playerPos, float[] ranges, boolean ignoreWalls, boolean checkDistance, int maxPosesCount) {
        this.targetedPoses = this.getTargetBlocks(maxPosesCount, playerPos, ranges, ignoreWalls, checkDistance);
    }

    public void onUpdate() {
        setTargetPositions(this.playerVec3dPos(), this.getRanges(), false, true, 10);
        processBreakBlock(targetedPoses);
    }

    private void processBreakBlock(List<BlockPos> poses) {
        poses.forEach(pos -> {
            if (pos != null) {
                BlockState state = mc.world.getBlockState(pos);
                Block block = state.getBlock();

                if (!isUnbreakableBlock(block)) {
                    boolean success = mc.playerController.onPlayerDamageBlock(pos, mc.player.getHorizontalFacing());

                    if (success) {
                        mc.player.swingArm(Hand.MAIN_HAND);
                    }
                }
            }
        });
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
13 Сен 2024
Сообщения
94
Реакции[?]
0
Поинты[?]
0
У тебя нюкер работает на определенные блоки, вот код где он ломает все блоки
Код:
package me.kuraga.functions.impl.player;

import me.kuraga.functions.api.Category;
import me.kuraga.functions.api.Function;
import me.kuraga.functions.api.FunctionRegister;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector3d;

import java.util.*;

@FunctionRegister(name = "Nuker", type = Category.Player)
public class Nuker extends Function {
    private final Minecraft mc = Minecraft.getInstance();
    private List<BlockPos> targetedPoses = new ArrayList<>();

    private Vector3d playerVec3dPos() {
        return new Vector3d(mc.player.getPosX(), mc.player.getPosY() + 0.51, mc.player.getPosZ());
    }

    private ArrayList<BlockPos> positionsZone(Vector3d playerPos, float[] ranges) {
        ArrayList<BlockPos> poses = new ArrayList<>();

        for (int x = (int) (-ranges[0]); x < ranges[0]; x++) {
            for (int z = (int) (-ranges[0]); z < ranges[0]; z++) {
                for (int y = (int) (-ranges[2]); y < ranges[1]; y++) {
                    BlockPos pos = new BlockPos(playerPos.x + x, playerPos.y + y, playerPos.z + z);
                    poses.add(pos);
                }
            }
        }

        poses.sort(Comparator.comparingDouble(posx -> posx.distanceSq(mc.player.getPosition())));
        return poses;
    }

    private boolean isUnbreakableBlock(Block block) {
        return block == Blocks.AIR || block == Blocks.BEDROCK || block == Blocks.BARRIER && !mc.player.isCreative();
    }

    private boolean seenBlockPos(BlockPos pos) {
        return mc.player.canEntityBeSeen(new Vector3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5));
    }

    private boolean canSeenBlock(BlockPos pos, boolean ignoreNoSeen) {
        return !this.seenBlockPos(pos) && pos != mc.player.getPosition().add(0, 1, 0) ? ignoreNoSeen : true;
    }

    private boolean blockIsInRange(BlockPos pos, float[] ranges, boolean returnTrue) {
        double dX = pos.getX() - mc.player.getPosX();
        double dY = pos.getY() - mc.player.getPosY();
        double dZ = pos.getZ() - mc.player.getPosZ();
        double distance = Math.sqrt(dX * dX + dY * dY + dZ * dZ);
        return returnTrue || distance <= ranges[0];
    }

    private boolean canBreakBlock(BlockPos pos) {
        // На true для всех блоков
        return true;
    }

    private List<BlockPos> getTargetBlocks(int maxCount, Vector3d playerPos, float[] ranges, boolean ignoreWalls, boolean checkDistance) {
        this.targetedPoses.clear();
        for (BlockPos position : this.positionsZone(playerPos, ranges)) {
            BlockState state = mc.world.getBlockState(position);
            Block block = state.getBlock();
            if (this.blockIsInRange(position, ranges, checkDistance) && !this.isUnbreakableBlock(block) && this.canSeenBlock(position, ignoreWalls) && this.canBreakBlock(position) && this.targetedPoses.size() < maxCount) {
                this.targetedPoses.add(position);
            }
        }

        return this.targetedPoses;
    }

    private float[] getRanges() {
        return new float[]{3.5F, 5.0F, 0.0F};
    }

    private void setTargetPositions(Vector3d playerPos, float[] ranges, boolean ignoreWalls, boolean checkDistance, int maxPosesCount) {
        this.targetedPoses = this.getTargetBlocks(maxPosesCount, playerPos, ranges, ignoreWalls, checkDistance);
    }

    public void onUpdate() {
        setTargetPositions(this.playerVec3dPos(), this.getRanges(), false, true, 10);
        processBreakBlock(targetedPoses);
    }

    private void processBreakBlock(List<BlockPos> poses) {
        poses.forEach(pos -> {
            if (pos != null) {
                BlockState state = mc.world.getBlockState(pos);
                Block block = state.getBlock();

                if (!isUnbreakableBlock(block)) {
                    boolean success = mc.playerController.onPlayerDamageBlock(pos, mc.player.getHorizontalFacing());

                    if (success) {
                        mc.player.swingArm(Hand.MAIN_HAND);
                    }
                }
            }
        });
    }
}
спасибо но я уже написал другой рабочий нюкер
 
Сверху Снизу