-
Notifications
You must be signed in to change notification settings - Fork 95
Description
Minecraft version: From 1.19.2 onwards according to the GitHub, but seen in 1.20.1 and 1.21.1
Mappings version: Tested in 2024.11.17, but the current github mappings still show the issue here.
In TreeFeature#updateLeaves(), the last three parameters listing Set<BlockState>(s) are incorrectly named. From testing in-game and from the logic, the sets are for the positions of:
2. The trunk
3. The decorations
4. The roots
In the Parchment parameter names, these are:
2. Set<BlockPos> rootPositions
3. Set<BlockPos> trunkPositions
4. Set<BlockPos> foliagePositions
The code also makes little sense with the Parchment mappings; with the current mappings it would seem to be scanning out from the roots to find leaves that are not already part of the tree in contact with the roots to update them.
In actuality, this code scans outwards from the trunk - ignoring the decorations and roots - to find leaves to update with their Manhattan distance from the logs.
I would suggest the parameter names for the three sets be, in order:
2. Set<BlockPos> trunkPositions
3. Set<BlockPos> decorationPositions
4. Set<BlockPos> rootPositions
As that would resolve the issue and make the parameters consistent with the other names used in the class.