Mojira Archive
MC-15224

Saplings can grow with a different type of log above

The bug

You can grow jungle and oak sapling with certain blocks above or around it. It will not remove the them but it will replace the sapling with the log and create leafs.

How to reproduce

Video demonstrating the issue: http://www.youtube.com/watch?v=eSZwNo37FQY

Code analysis

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

The reason for this is that the method net.minecraft.world.gen.feature.WorldGenAbstractTree.canGrowInto(Block) allows a tree to generate even if one of the following blocks is in the way:

Block / Material 1 Gets replaced
air (material) Yes 
leaves (material) Yes 
grass No
dirt No
log Yes
log2 Yes
sapling No
vine Yes

1 Multiple blocks can be out of the same material. For example "leaves" includes the blocks "leaves" and "leaves2"

Basically all blocks or materials with should be removed. Even though for logs it sounds reasonable having a oak tree with a single jungle log in the middle is pretty strange.