The Bug:
Mycelium and podzol cannot be tilled with hoes.
Steps to Reproduce:
Build the setup as shown in the attachment below.
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.
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
is duplicated by 2
relates to 2
Attachments
Comments 13
I’d like to request ownership of this ticket. The original reporter hasn’t been active since March 2013.
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.
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.
Related to MC-204127.
Mycelium is not tillable, see http://www.minecraftwiki.net/wiki/Mycelium