mojira.dev
MC-118980

2 × 2 trees required free area is larger in negative directions

The bug

The required free area for 2 × 2 trees to grow is larger in the negative directions.

How to reproduce

  1. Build a 2 × 2 area of dirt

  2. Build a stone tower one block away in the positive x- or z-direction, see

[media]
  1. Place jungle saplings on the dirt and increase the randomTickSpeed gamerule value

    /gamerule randomTickSpeed 1000

    → The tree grows

  2. Repeat steps 1 to 3 but this time build the stone tower in the negative x- or z-direction, see

[media]
  1. → The tree does not grow

Note: Some blocks like logs and leaves don't obstruct tree growth. Saplings however do.

Code analysis

Based on 1.12 decompiled using MCP 9.40 PRE 1

2 × 2 trees generate beginning at the sapling in the negative x- and z-direction, however the free area checks (jungle and spruce: net.minecraft.world.gen.feature.WorldGenHugeTrees.isSpaceAt(World, BlockPos, int), dark oak: net.minecraft.world.gen.feature.WorldGenCanopyTree.placeTreeOfHeight(World, BlockPos, int)) offset the sapling position equally in negative and positive directions instead of offsetting it further in the positive directions.

Related issues

Attachments

Comments

migrated
[media]
SPGoding

Relates to MC-123468 and MC-112975. Might relates to MC-109121.

sof

Affects 1.21.3. Also would like to request ownership of this report to maintain it

sof

(Unassigned)

Confirmed

Block states

dark-oak-tree, jungle-tree, sapling, spruce-tree, tree, tree-generation

Minecraft 1.12, Minecraft 1.12.2, Minecraft 18w07c, 1.14.4, 1.15.1, 1.16.3, 20w46a, 1.19.1 Pre-release 2, 1.21.3, 1.21.4

Retrieved