kastike0_73791

Make me mod that automates bow boosting

Kodari AI
KodariOct 25 at 5:59 am 1
BowBoostAutomation
Automates bow boosting mechanics in Minecraft Fabric 26.2. This mod automatically fires arrows at the player's feet when jumping or falling, propelling them forward. Features include configurable boost strength, cooldown management, and toggleable activation. Players can enable or disable the automation with a keybind, and adjust arrow velocity and launch angle through config files. The mod integrates seamlessly with vanilla bow mechanics, consuming arrows from inventory and supporting custom arrow types. Ideal for speedrunners and parkour enthusiasts seeking consistent, hands-free bow boosting without manual timing.

What should the mod automate? Vanilla Minecraft has no standard bow-boost mechanic. Do you mean automatically charge and fire a bow, perform a specific server’s bow-boost technique, or add a custom ability that launches the player?

kastike0_73791

Make that it shoots arrow at specific angle and to release so that when player sprints they hit their own arrow and gets boosted by knockback

Kodari AI
KodariOct 25 at 6:09 am 2
  1. Add a client keybind that aims the bow upward, charges, and releases it automatically.

  2. Keep sprint active so the player can run into the arrow; use a vanilla bow with Punch for the knockback.

  3. Create the Fabric 26.2 project metadata and client entrypoint.

Added the client-side bow-boost mod. Press G while holding a bow to aim 80° upward, draw for 20 ticks, and release; it then restores your original aim.

Use a Punch-enchanted bow for knockback, and sprint to intersect the arrow. Whether the arrow can hit you depends on the server’s self-hit and team rules.

kastike0_73791

1

Kodari AI
KodariOct 25 at 6:10 am 1

If you mean #1, the automatic aim, draw, and release is already bound to G. Hold a bow and press G; it aims upward, draws for 20 ticks, fires, then restores your aim.

kastike0_73791

Yes

Kodari AI
KodariOct 25 at 6:10 am 1

The automatic bow firing is bound to G. Hold a bow and press G to aim, draw, and release; a Punch enchantment is needed for knockback.

kastike0_73791

Yes

Kodari AI
KodariOct 25 at 6:11 am 1

Press G while holding a bow to start the sequence. Use a Punch bow and sprint into the arrow; whether it boosts you depends on the server allowing your arrow to hit you.

kastike0_73791

Make that it shoots Bow too because now it just aims

Kodari AI
KodariOct 25 at 11:05 am 1

Fixed: the mod now keeps the bow’s use input held for the full draw, then releases it to fire. Press G while holding a bow; a Punch enchantment is needed for knockback.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
6 163
src/client/java/com/kodari/bowboost/BowBoostClient.java
package com.kodari.bowboost;

import com.mojang.blaze3d.platform.InputConstants;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keymapping.v1.KeyMappingHelper;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.Minecraft;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.BowItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.InteractionResult;
import org.lwjgl.glfw.GLFW;

public class BowBoostClient implements ClientModInitializer {
	private static final float SHOT_PITCH = -80.0F;
	private static final int DRAW_TICKS = 20;
	private static KeyMapping activateKey;
	private static boolean charging;
	private static boolean restorePitch;
	private static int chargeTicksRemaining;
	private static float originalPitch;

	@Override
	public void onInitializeClient() {
		activateKey = KeyMappingHelper.registerKeyMapping(new KeyMapping(
				"key.bowboost.activate",
				GLFW.GLFW_KEY_G,
				KeyMapping.Category.GAMEPLAY
		));
		ClientTickEvents.END_CLIENT_TICK.register(BowBoostClient::onEndClientTick);
	}

	private static void onEndClientTick(Minecraft client) {
		boolean activationPressed = activateKey.consumeClick();

		if (charging) {
			if (client.player == null || client.gameMode == null) {
					client.options.keyUse.setDown(false);
				if (client.player != null) {
					client.player.setXRot(originalPitch);
				}
				charging = false;
				chargeTicksRemaining = 0;
				return;
			}

				client.options.keyUse.setDown(true);
			if (--chargeTicksRemaining <= 0) {
					client.options.keyUse.setDown(false);
				client.gameMode.releaseUsingItem(client.player);
				charging = false;
				restorePitch = true;
			}
			return;
		}

		if (restorePitch) {
			if (client.player != null) {
				client.player.setXRot(originalPitch);
			}
			restorePitch = false;
			return;
		}

		if (!activationPressed || client.player == null || client.gameMode == null || client.gui.screen() != null) {
			return;
		}

		Player player = client.player;
		ItemStack heldItem = player.getMainHandItem();
		if (!(heldItem.getItem() instanceof BowItem) || player.isUsingItem()) {
			return;
		}

		originalPitch = player.getXRot();
		player.setXRot(SHOT_PITCH);
		if (client.gameMode.useItem(player, InteractionHand.MAIN_HAND) == InteractionResult.CONSUME) {
				client.options.keyUse.setDown(true);
			chargeTicksRemaining = DRAW_TICKS;
			charging = true;
		} else {
			player.setXRot(originalPitch);
		}
	}
}