Summary:
I can't place red or brown mushrooms on the top slab or stair, despite the fact that it is a suitable surface for their growth.
Code analysis:
Code analysis by @unknown can be found in this comment.
Attachments
Comments 15
I don't think this is intended. Most other things like torches only require to be placed on top of a solid face. The same should be true for mushrooms as well.
Code Analysis:
(Decompiled with MCP)
Currently, the applicable blocks for placement are ones that are "isSolidRender" (Full cube blocks)
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return blockState.isSolidRender(blockGetter, blockPos);
}
Possible Fix:
One fix for this, is to use "isFaceSturdy" instead, which only checks for a certain face of the block being applicable for placement (In this case, the top face).
protected boolean mayPlaceOn(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) {
return blockState.isFaceSturdy(blockGetter, blockPos, Direction.UP);
}
This provides the following behavior:
[media]
probably intended feature