The bug
Coarse dirt and grass block can't be tilled if buttons, torches, and other non-full blocks are placed above it. Even if these non-full blocks are placed on the sides of blocks above the dirt.
Expected Result
You would be able to till coarse dirt and grass blocks when non-full blocks are placed above them.
Code analysis
Code analysis by @unknown provided in this comment.
Linked issues
is duplicated by 5
relates to 2
Attachments
Comments 9


20w06a affected
I can confirm this behavior in 1.18.
Here's a code analysis of this issue. The following is based on a decompiled version of Minecraft 1.18 using MCP-Reborn. Please note that I'm quite tentative about this analysis, although I'm persuaded to believe that this is likely the cause of the problem. 🙂
Code Analysis (tentative):
net.minecraft.world.item.HoeItem.java
public class HoeItem extends DiggerItem {
protected static final Map<Block, Pair<Predicate<UseOnContext>, Consumer<UseOnContext>>> TILLABLES = Maps.newHashMap(ImmutableMap.of(Blocks.GRASS_BLOCK, Pair.of(HoeItem::onlyIfAirAbove, changeIntoState(Blocks.FARMLAND.defaultBlockState())), Blocks.DIRT_PATH, Pair.of(HoeItem::onlyIfAirAbove, changeIntoState(Blocks.FARMLAND.defaultBlockState())), Blocks.DIRT, Pair.of(HoeItem::onlyIfAirAbove, changeIntoState(Blocks.FARMLAND.defaultBlockState())), Blocks.COARSE_DIRT, Pair.of(HoeItem::onlyIfAirAbove, changeIntoState(Blocks.DIRT.defaultBlockState())), Blocks.ROOTED_DIRT, Pair.of(($$0) -> {
return true;
}, changeIntoStateAndDropItem(Blocks.DIRT.defaultBlockState(), Items.HANGING_ROOTS))));
...
 public static boolean onlyIfAirAbove(UseOnContext $$1) {
return $$1.getClickedFace() != Direction.DOWN && $$1.getLevel().getBlockState($$1.getClickedPos().above()).isAir();
}
}
If we look at the above class, we can see that you can only till blocks using hoes if air is above them. This is evident through the following line of code:
HoeItem::onlyIfAirAbove
This basically means that if any block other than air is present above a tillable block, it cannot be tilled.
Can confirm in 1.18.1.
Can confirm in 1.18.2.
Can confirm in 1.19pre-3
Can confirm in 1.19 and 22w24a.
Can confirm in 1.19.2.

Can confirm in 1.21.4.
I misunderstood MC-3914 and thought the bug was that you could not till grass, but the bug was instead that you could till dirt. This report is probably invalid / Works as intended then.