The fishing rod must be diagonally above the carrot to craft the carrot on a stick.
Usage
Riding a pig
To use a carrot on a stick, the player must first saddle a pig, and ride it while holding the carrot on a stick. The pig then moves in the direction of the carrot. Also, if the player holds a carrot on a stick, all nearby pigs (but not rabbits[1][2]) follow the player, but they can't breed using a carrot on a stick.
To make the pig run faster, the player can press use while holding the carrot on a stick. This is called "boosting". Each boost costs 7 durability in Java Edition, or 2 durability in Bedrock Edition. If the carrot on a stick's durability is depleted, it turns back into a fishing rod.
The speed of a mounted pig is 2.42 m/s. Boosting a pig causes its speed to slowly ramp up until it reaches 2.15 times its normal speed, 5.20 m/s. Then speed slowly declines until the pig reaches normal speed again. The boost lasts between 140 and 980 game ticks (7 seconds and 49 seconds respectively), chosen randomly. No matter how many ticks the boost lasts, the average speed of pig during a full boost cycle is roughly 4.19 m/s. These boosted speeds are applied only while holding the carrot on a stick. These speeds are affected by the speed effect.
Dinnerbone released images of saddled pigs being controlled with carrots.[3] They start slow but end up traveling up to 5 blocks per second.[4]Wheat was considered as a "fuel" along with carrots,[5] and Dinnerbone eventually decided upon carrots.[6]
Carrot on a stick now have a durability meter, and can be used to give saddled pigs a burst of speed when right-clicked. The carrot on a stick no longer needs to be held when pigs have the burst of speed.
Datapack Codex — The all-versions Minecraft data pack reference. Community reference; not affiliated with Mojang Studios or Microsoft. “Minecraft” is a trademark of Mojang Synergies AB.
Primary syntax targets Minecraft Java Edition 1.21+ (singular folder names). Version-specific behaviour is flagged inline and mapped on the pack_format history page.