Skip to content

Commit 8c6d870

Browse files
committed
Fixed an oopsie with the var
1 parent a871d9e commit 8c6d870

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

common/src/main/kotlin/com/lambda/task/Task.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ abstract class Task<Result> : Nameable {
5454
open var timeout: Int = Int.MAX_VALUE
5555
open var tries: Int = 0
5656
open var repeats: Int = 0
57-
open val cooldown: Int = TaskFlow.taskCooldown
57+
open var cooldown: Int = TaskFlow.taskCooldown
5858
open val onStart: SafeContext.(Task<Result>) -> Unit = {}
5959
open val onSuccess: SafeContext.(Task<Result>, Result) -> Unit = { _, _ -> }
6060
open val onRetry: SafeContext.(Task<Result>) -> Unit = {}

common/src/main/kotlin/com/lambda/task/tasks/BreakBlock.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BreakBlock @Ta5kBuilder constructor(
3737
val blockPos: BlockPos get() = ctx.result.blockPos
3838
private var beginState: BlockState? = null
3939
val SafeContext.state: BlockState get() = blockPos.blockState(world)
40-
override val cooldown
40+
override var cooldown = Int.MAX_VALUE
4141
get() = maxOf(TaskFlow.build.breakCoolDown, TaskFlow.taskCooldown)
4242
private var drop: ItemEntity? = null
4343

common/src/main/kotlin/com/lambda/task/tasks/PlaceBlock.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PlaceBlock @Ta5kBuilder constructor(
1919
private val waitForConfirmation: Boolean,
2020
) : Task<Unit>() {
2121
private var beginState: BlockState? = null
22-
override val cooldown
22+
override var cooldown = Int.MAX_VALUE
2323
get() = maxOf(TaskFlow.build.placeCooldown, TaskFlow.taskCooldown)
2424
override var timeout = 20
2525
private var placed = false

0 commit comments

Comments
 (0)