Начинающий
			
			
				
					
				
			
		- Статус
- Оффлайн
- Регистрация
- 25 Янв 2024
- Сообщения
- 118
- Реакции
- 0
- Выберите загрузчик игры
- Vanilla
- Forge
- NeoForge
- OptiFine
- Прочие моды
 
ss - 
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
				
			
	Пожалуйста, авторизуйтесь для просмотра ссылки.
			
				Any met:
			
		
		
		private void handleGrimLatestBypass() {
        if (!mc.player.collidedHorizontally) return;
        boolean nearSlime = isNearSlimeBlock();
        double climbSpeed = nearSlime ? 0.45 : motionY.getValue();
        Vector3d motion = mc.player.getMotion();
        mc.player.setMotion(motion.x, climbSpeed, motion.z);
        if (stopWatch.finished(50)) {
            placeSlimeBlock();
            stopWatch.reset();
        }
    }
    private boolean isNearSlimeBlock() {
        BlockPos playerPos = mc.player.getPosition();
        for (int x = -2; x <= 2; x++) {
            for (int y = -1; y <= 2; y++) {
                for (int z = -2; z <= 2; z++) {
                    BlockPos checkPos = playerPos.add(x, y, z);
                    if (mc.world.getBlockState(checkPos).getBlock() == net.minecraft.block.Blocks.SLIME_BLOCK) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
    private void placeSlimeBlock() {
        int slotSlime = getSlotForSlime();
        if (slotSlime == -1) {
            return;
        }
        int lastSlot = mc.player.inventory.currentItem;
        mc.player.inventory.currentItem = slotSlime;
        BlockPos playerPos = mc.player.getPosition();
        BlockPos targetPos = getOptimalSlimePosition(playerPos);
        if (targetPos != null && mc.world.getBlockState(targetPos).isAir()) {
            Vector2f rotation = calculateRotationToBlock(targetPos);
            applyRotation(rotation);
            placeBlock(targetPos);
            placeAttempts++;
        }
        mc.player.inventory.currentItem = lastSlot;
    }
    private BlockPos getOptimalSlimePosition(BlockPos playerPos) {
        Vector3d lookVec = mc.player.getLookVec();
        int offsetX = lookVec.x > 0.5 ? 1 : (lookVec.x < -0.5 ? -1 : 0);
        int offsetZ = lookVec.z > 0.5 ? 1 : (lookVec.z < -0.5 ? -1 : 0);
        if (offsetX == 0 && offsetZ == 0) {
            offsetX = lookVec.x > 0 ? 1 : -1;
        }
        for (int yOffset = 0; yOffset <= 2; yOffset++) {
            BlockPos checkPos = playerPos.add(offsetX, yOffset, offsetZ);
            if (mc.world.getBlockState(checkPos).isAir()) {
                BlockPos below = checkPos.down();
                if (!mc.world.getBlockState(below).isAir() || yOffset == 0) {
                    return checkPos;
                }
            }
        }
        return playerPos.add(offsetX, 1, offsetZ);
    }
    private Vector2f calculateRotationToBlock(BlockPos pos) {
        Vector3d targetPosition = new Vector3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5);
        Vector3d playerEyes = mc.player.getEyePosition(1.0F);
        Vector3d toTarget = targetPosition.subtract(playerEyes).normalize();
        double horizontalLength = Math.sqrt(toTarget.x * toTarget.x + toTarget.z * toTarget.z);
        float rawYaw = (float) Math.toDegrees(Math.atan2(toTarget.z, toTarget.x)) - 90.0F;
        float rawPitch = 76.0F;
        long time = System.currentTimeMillis();
        float microTime = (time % 1000) / 1000.0f;
        double microPhase = Math.sin(microTime * Math.PI * 2) * 0.15;
        float deviationYaw = (float) (microPhase * 0.3);
        float deviationPitch = (float) (microPhase * 0.1);
        float finalYaw = rawYaw + deviationYaw;
        float finalPitch = MathHelper.clamp(rawPitch + deviationPitch, 75.0F, 77.0F);
        finalYaw = GCDUtils.getSensitivity(finalYaw);
        finalPitch = GCDUtils.getSensitivity(finalPitch);
        return new Vector2f(finalYaw, finalPitch);
    }
    private void applyRotation(Vector2f rotation) {
        currentRotation = rotation;
        mc.player.rotationYaw = rotation.x;
        mc.player.rotationPitch = rotation.y;
    }
    private void placeBlock(BlockPos pos) {
        if (!mc.world.getBlockState(pos).isAir()) {
            return;
        }
        Direction[] priorities = {Direction.DOWN, Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST, Direction.UP};
        for (Direction direction : priorities) {
            BlockPos neighbor = pos.offset(direction);
            if (!mc.world.getBlockState(neighbor).isAir()) {
                Vector3d hitVec = new Vector3d(
                        neighbor.getX() + 0.5 + direction.getOpposite().getXOffset() * 0.5,
                        neighbor.getY() + 0.5 + direction.getOpposite().getYOffset() * 0.5,
                        neighbor.getZ() + 0.5 + direction.getOpposite().getZOffset() * 0.5
                );
                BlockRayTraceResult result = new BlockRayTraceResult(hitVec, direction.getOpposite(), neighbor, false);
                mc.playerController.rightClickBlock(mc.player, mc.world, Hand.MAIN_HAND, result);
                mc.player.swingArm(Hand.MAIN_HAND);
                return;
            }
        }
    }
    private int getSlotForSlime() {
        for (int i = 0; i < 36; i++) {
            if (mc.player.inventory.getStackInSlot(i).getItem() == net.minecraft.item.Items.SLIME_BLOCK) {
                return i;
            }
        }
        return -1;
    } 
				 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		