[GH-ISSUE #549] Hoes cannot till dirt or grass blocks into farmland while shield equipped in offhand #163

Closed
opened 2026-11-02 15:36:55 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @Doopz93 on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/549

Image

Environment

  • Horizon version: 2026.10.16.05
  • Operating system: Fedora Kinoite 44 (Linux)
  • Desktop environment: KDE Plasma (Wayland)
  • GPU: AMD Radeon RX 7900 XTX
  • Graphics driver: Mesa RADV (Vulkan)

Steps to reproduce

  1. Equip a hoe (tested with wooden, stone and iron hoes).
  2. Find a dirt or grass block with unobstructed space above it.
  3. Right-click the block to till it into farmland.

Expected behavior

Right-clicking a suitable dirt or grass block with a hoe should convert it into farmland.

Actual behavior

Nothing happens when right-clicking the block. No farmland is created.

Additional information

  • Tested with wooden, stone and iron hoes.
  • Tested on both dirt and grass blocks.
  • Tested with water directly adjacent to the dirt block.
  • All three hoe types fail to till the soil.
  • This prevents normal crop farming.

Screenshot available showing the tested dirt block and surrounding area.

EDIT:

After further testing, I discovered that hoes work correctly when my offhand is empty.

However, when a shield is equipped in the offhand, right-clicking dirt or grass with a hoe does nothing.

This affects wooden, stone and iron hoes.

Expected behavior: The hoe should till suitable blocks even when a shield is equipped in the offhand, as in vanilla Minecraft Java Edition.

Workaround: Unequip the shield before tilling farmland.

This appears to be an offhand interaction-priority issue rather than a problem with farmland itself.

Originally created by @Doopz93 on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/549 <img width="2552" height="1437" alt="Image" src="https://github.com/user-attachments/assets/e946d554-0ec1-4da4-b0b2-aa05d5d42eb0" /> ### Environment - **Horizon version:** 2026.10.16.05 - **Operating system:** Fedora Kinoite 44 (Linux) - **Desktop environment:** KDE Plasma (Wayland) - **GPU:** AMD Radeon RX 7900 XTX - **Graphics driver:** Mesa RADV (Vulkan) ### Steps to reproduce 1. Equip a hoe (tested with wooden, stone and iron hoes). 2. Find a dirt or grass block with unobstructed space above it. 3. Right-click the block to till it into farmland. ### Expected behavior Right-clicking a suitable dirt or grass block with a hoe should convert it into farmland. ### Actual behavior Nothing happens when right-clicking the block. No farmland is created. ### Additional information - Tested with wooden, stone and iron hoes. - Tested on both dirt and grass blocks. - Tested with water directly adjacent to the dirt block. - All three hoe types fail to till the soil. - This prevents normal crop farming. Screenshot available showing the tested dirt block and surrounding area. EDIT: After further testing, I discovered that hoes work correctly when my offhand is empty. However, when a shield is equipped in the offhand, right-clicking dirt or grass with a hoe does nothing. This affects wooden, stone and iron hoes. Expected behavior: The hoe should till suitable blocks even when a shield is equipped in the offhand, as in vanilla Minecraft Java Edition. Workaround: Unequip the shield before tilling farmland. This appears to be an offhand interaction-priority issue rather than a problem with farmland itself.
bsakaguchi 2026-11-02 15:36:55 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Online5277 commented on GitHub (Oct 16, 2026):

@Doopz93 I don't get this issue on the latest release. Could you try again and let me know if you had a sserver open at the time of making this issue?

<!-- gh-comment-id:6223134247 --> @Online5277 commented on GitHub (Oct 16, 2026): @Doopz93 I don't get this issue on the latest release. Could you try again and let me know if you had a sserver open at the time of making this issue?
Author
Owner

@Doopz93 commented on GitHub (Oct 16, 2026):

@Online5277 I tested again, its only while having a shield equipped in off hand the hoe doesn't work

<!-- gh-comment-id:6223197408 --> @Doopz93 commented on GitHub (Oct 16, 2026): @Online5277 I tested again, its only while having a shield equipped in off hand the hoe doesn't work
Author
Owner

@ludovic111 commented on GitHub (Oct 17, 2026):

Thanks for narrowing it down to the shield, @Doopz93. I checked this against vanilla 26.3's bytecode, and in 26.3 this is vanilla behaviour, so Horizon matches it.

In 26.3, hoes, axes and shovels no longer have their own useOn. They carry a minecraft:block_transformer component (minecraft:hoe for every hoe), and Item.useOn calls BlockTransformer.transformBlock, which starts with:

private static boolean playerHasBlockingItemUseIntent(final UseOnContext context) {
    Player player = context.getPlayer();
    return context.getHand().equals(InteractionHand.MAIN_HAND)
        && player.getOffhandItem().has(DataComponents.BLOCKS_ATTACKS)
        && !player.isSecondaryUseActive();
}

So with a shield (any blocks_attacks item) in the off hand, the main-hand hoe passes and the off hand's turn raises the shield. Older versions only did this for axes, so the hoe is new in 26.x. Sneak + right-click tills with the shield still in the off hand, in vanilla and in Horizon. Horizon has done the same since #317 (use_block_transformer in game.rs).

I'll leave this open for Ludovic to close as matching vanilla, unless you see something different from that (for example, sneaking doesn't till either).

<!-- gh-comment-id:6230678508 --> @ludovic111 commented on GitHub (Oct 17, 2026): Thanks for narrowing it down to the shield, @Doopz93. I checked this against vanilla 26.3's bytecode, and in 26.3 this is vanilla behaviour, so Horizon matches it. In 26.3, hoes, axes and shovels no longer have their own `useOn`. They carry a `minecraft:block_transformer` component (`minecraft:hoe` for every hoe), and `Item.useOn` calls `BlockTransformer.transformBlock`, which starts with: ```java private static boolean playerHasBlockingItemUseIntent(final UseOnContext context) { Player player = context.getPlayer(); return context.getHand().equals(InteractionHand.MAIN_HAND) && player.getOffhandItem().has(DataComponents.BLOCKS_ATTACKS) && !player.isSecondaryUseActive(); } ``` So with a shield (any `blocks_attacks` item) in the off hand, the main-hand hoe passes and the off hand's turn raises the shield. Older versions only did this for axes, so the hoe is new in 26.x. **Sneak + right-click** tills with the shield still in the off hand, in vanilla and in Horizon. Horizon has done the same since #317 (`use_block_transformer` in game.rs). I'll leave this open for Ludovic to close as matching vanilla, unless you see something different from that (for example, sneaking doesn't till either).
Author
Owner

@rdbtCVS commented on GitHub (Oct 17, 2026):

Cam confirm it matches vanilla, this issue can be closed.

<!-- gh-comment-id:6236628193 --> @rdbtCVS commented on GitHub (Oct 17, 2026): Cam confirm it matches vanilla, this issue can be closed.
Author
Owner

@ludovic111 commented on GitHub (Oct 17, 2026):

🤖 Agent: closing as matching vanilla 26.3 (BlockTransformer.playerHasBlockingItemUseIntent applies to hoes, axes and shovels alike), as confirmed above. Sneaking while right-clicking tills with a shield in the off hand, as in vanilla.

<!-- gh-comment-id:6243203271 --> @ludovic111 commented on GitHub (Oct 17, 2026): 🤖 Agent: closing as matching vanilla 26.3 (`BlockTransformer.playerHasBlockingItemUseIntent` applies to hoes, axes and shovels alike), as confirmed above. Sneaking while right-clicking tills with a shield in the off hand, as in vanilla.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#163
No description provided.