File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
common/src/main/kotlin/com/lambda Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -62,13 +62,13 @@ object BuildCommand : LambdaCommand(
6262 .loadStructureByRelativePath(Path .of(pathString))
6363 ?.let { template ->
6464 info(" Building structure $pathString with dimensions ${template.size.toShortString()} created by ${template.author} " )
65- template.toStructure()
65+ lastBuildTask = template.toStructure()
6666 .move(player.blockPos)
6767 .toBlueprint()
6868 .build()
6969 .run ()
7070
71- return @executeWithResult CommandResult . success()
71+ return @executeWithResult success()
7272 }
7373 } catch (e: InvalidPathException ) {
7474 return @executeWithResult failure(" Invalid path $pathString " )
Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ object TaskFlow : Task<Unit>() {
2323 override val name get() = " TaskFlow"
2424
2525 @Ta5kBuilder
26- fun Task <* >.run () = this .execute(this @TaskFlow)
26+ inline fun <reified T : Task <* >> T.run (): T {
27+ execute(this @TaskFlow)
28+ return this
29+ }
2730
2831 @Ta5kBuilder
2932 fun Task <* >.run (task : TaskGenerator <Unit >) {
You can’t perform that action at this time.
0 commit comments