Null check to avoid crash issue
@@ -600,6 +600,7 @@ public class Species extends net.minecraftforge.registries.IForgeRegistryEntry.I
BlockPos endPos = iter.next();
IBlockState branchState = world.getBlockState(endPos);
BlockBranch branch = TreeHelper.getBranch(branchState);
+ if(branch != null) {
int radius = branch.getRadius(branchState);
float rotChance = rotChance(world, endPos, world.rand, radius);
if(branch.checkForRot(world, endPos, radius, world.rand, rotChance, rapid) || radius != 1) {
@@ -609,6 +610,7 @@ public class Species extends net.minecraftforge.registries.IForgeRegistryEntry.I
iter.remove();//Prune out the rotted end points so we don't spawn fruit from them.
}
}
+ }
return ends.isEmpty() && !TreeHelper.isBranch(world, treePos);//There are no endpoints and the trunk is missing
}
