Skip to content

Commit

Permalink
added tailrec
Browse files Browse the repository at this point in the history
  • Loading branch information
makeevrserg committed Apr 9, 2023
1 parent b41551e commit 2f48d1d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TCEvent(
}
}

private fun placeSapling(sapling: Material, block: Block, i: Int) {
private tailrec fun placeSapling(sapling: Material, block: Block, i: Int) {
if (i >= tcConfig.replantMaxIterations) return
if (!isDirt(block.type)) {
placeSapling(sapling, block.getRelative(BlockFace.DOWN), i + 1)
Expand Down

0 comments on commit 2f48d1d

Please sign in to comment.