@@ -527,10 +527,11 @@ public boolean needLeaves(World world, BlockPos pos, LeavesProperties leavesProp
527
527
528
528
public GrowSignal branchOut (World world , BlockPos pos , GrowSignal signal ) {
529
529
530
- LeavesProperties leavesProperties = signal .getSpecies ().getLeavesProperties ();
530
+ Species species = signal .getSpecies ();
531
+ LeavesProperties leavesProperties = species .getLeavesProperties ();
531
532
532
533
//Check to be sure the placement for a branch is valid by testing to see if it would first support a leaves block
533
- if (!needLeaves (world , pos , leavesProperties , signal . getSpecies () )) {
534
+ if (!needLeaves (world , pos , leavesProperties , species )) {
534
535
signal .success = false ;
535
536
return signal ;
536
537
}
@@ -544,16 +545,16 @@ public GrowSignal branchOut(World world, BlockPos pos, GrowSignal signal) {
544
545
boolean hasLeaves = false ;
545
546
546
547
for (Direction dir : Direction .values ()) {
547
- if (needLeaves (world , pos .relative (dir ), leavesProperties , signal . getSpecies () )) {
548
+ if (needLeaves (world , pos .relative (dir ), leavesProperties , species )) {
548
549
hasLeaves = true ;
549
550
break ;
550
551
}
551
552
}
552
553
553
554
if (hasLeaves ) {
554
555
//Finally set the leaves block to a branch
555
- Family family = signal . getSpecies () .getFamily ();
556
- family .getBranch ( ).ifPresent (branch ->
556
+ Family family = species .getFamily ();
557
+ family .getBranchForPlacement ( world , species , pos ).ifPresent (branch ->
557
558
branch .setRadius (world , pos , family .getPrimaryThickness (), null )
558
559
);
559
560
signal .radius = family .getSecondaryThickness ();//For the benefit of the parent branch
0 commit comments