mojira.dev
MC-8231

Mycelium and podzol cannot be tilled with hoes

The Bug:

Mycelium and podzol cannot be tilled with hoes.

Steps to Reproduce:

  1. Build the setup as shown in the attachment below.

[media]
  1. Obtain a hoe and use it on all six blocks.

  2. Take note as to what blocks you can use the hoe on and what blocks you can't.

Observed Behavior:

Mycelium and podzol cannot be tilled with hoes.

Expected Behavior:

Mycelium and podzol would be able to be tilled with hoes.

Code Analysis:

Code analysis by @unknown can be found below.

The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.

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))));
   ...

If we look at the above class, we can see that you can only use hoes on grass blocks, dirt paths, dirt, coarse dirt, and rooted dirt. Both mycelium and podzol aren't included within this particular piece of code, resulting in this problem occurring.

Potential Fix:

Simply adding that mycelium and podzol can be tilled with hoes to this piece of code should resolve this problem. The correct line of code within its class should look something like the following:

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.MYCELIUM, Pair.of(HoeItem::onlyIfAirAbove, changeIntoState(Blocks.FARMLAND.defaultBlockState())), Blocks.PODZOL, 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))));
   ...

Linked issues

Attachments

Comments 13

This bug also applies to podzol, which is also not tillable. Also works as designed, I suppose.

Reopened, as the wiki is not a valid WAI source (or at least not anymore)

I’d like to request ownership of this ticket. The original reporter hasn’t been active since March 2013.

Can someone update the description ? The way it is formulated is kind of weird and cringy :/

3 more comments

Why is it intended?It still won't stop players turning it into farmland.

Way No.1:

(1)use shovel on it to turn it into dirt path.(old name:grass path)

(2)till the dirt path

Way No.2:

(1)Break with hand

(2)Place the dirt block

(3)till the dirt block

It might have been intended in the past, but with the changes to dirt path in 1.17 it has become more illogical that mycelium and podzol cannot be tilled, since they're dirt variants.

Can confirm this behavior in 21w40a. Here are some extra details regarding this problem.

The Bug:

Mycelium and podzol cannot be tilled with hoes.

Steps to Reproduce:

  • Build the setup as shown in the attachment below.

[media]
  • Obtain a hoe and use it on all six blocks.

  • Take note as to what blocks you can use the hoe on and what blocks you can't.

Observed Behavior:

Mycelium and podzol cannot be tilled with hoes.

Expected Behavior:

Mycelium and podzol would be able to be tilled with hoes.

Can confirm in 1.19-rc2

David Knag

Avoma

(Unassigned)

1261971

Confirmed

Gameplay

Normal

Block states, Items

mycelium, podzol

Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w03a, Snapshot 13w04a, 1.15.2, ..., 1.21.4, 25w08a, 1.21.5, 1.21.6, 1.21.7

Retrieved