Skip to content

Commit 50ffeed

Browse files
committed
Fixed kdoc
1 parent 1089e2d commit 50ffeed

File tree

11 files changed

+28
-39
lines changed

11 files changed

+28
-39
lines changed

common/src/main/kotlin/com/lambda/brigadier/argument/BlockArguments.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ fun DefaultArgumentReader<BlockStateArgumentType>.value(): BlockStateArgument {
5757
/**
5858
* Creates a block predicate argument with [name] as the parameter name.
5959
*
60-
* @param context The command build context
60+
* @param name The name of the argument
61+
* @param registryAccess The command registry access
6162
*/
6263
@BrigadierDsl
6364
fun <S> blockPredicate(
@@ -70,7 +71,8 @@ fun <S> blockPredicate(
7071
/**
7172
* Creates a block state argument with [name] as the parameter name.
7273
*
73-
* @param context The command build context
74+
* @param name The name of the argument
75+
* @param registryAccess The command registry access
7476
*/
7577
@BrigadierDsl
7678
fun <S> blockState(

common/src/main/kotlin/com/lambda/brigadier/argument/ItemArguments.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ package com.lambda.brigadier.argument
2424

2525

2626
import com.lambda.brigadier.*
27-
import com.lambda.brigadier.assumeSourceNotUsed
2827
import net.minecraft.command.CommandRegistryAccess
2928
import net.minecraft.command.argument.ItemPredicateArgumentType
3029
import net.minecraft.command.argument.ItemSlotArgumentType
@@ -37,7 +36,7 @@ import java.util.function.Predicate
3736
* Reads the [ItemStack] predicate value from the
3837
* argument in the receiver [ArgumentReader].
3938
*
40-
* @see ItemPredicateArgumentType.getItemPredicate
39+
* @see ItemPredicateArgumentType.getItemStackPredicate
4140
*/
4241
@JvmName("valueItemPredicateArg")
4342
@BrigadierDsl
@@ -103,4 +102,4 @@ fun <S> itemStack(
103102
context: CommandRegistryAccess
104103
): DefaultArgumentConstructor<S, ItemStackArgumentType> {
105104
return argument(name, ItemStackArgumentType.itemStack(context))
106-
}
105+
}

common/src/main/kotlin/com/lambda/brigadier/argument/PrimitiveArguments.kt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@
2222

2323
package com.lambda.brigadier.argument
2424

25-
import com.lambda.brigadier.BrigadierDsl
26-
import com.lambda.brigadier.DefaultArgumentConstructor
27-
import com.lambda.brigadier.DefaultArgumentReader
28-
import com.lambda.brigadier.argument
25+
import com.lambda.brigadier.*
2926
import com.mojang.brigadier.arguments.*
3027

3128
/**
3229
* Reads the boolean value from the argument in
33-
* the receiver [DefaultArgumentReader].
30+
* the receiver [ArgumentReader].
3431
*
3532
* @see BoolArgumentType.getBool
3633
*/
@@ -42,7 +39,7 @@ fun DefaultArgumentReader<BoolArgumentType>.value(): Boolean {
4239

4340
/**
4441
* Reads the boolean value from the argument in
45-
* the receiver [DefaultArgumentReader].
42+
* the receiver [ArgumentReader].
4643
*
4744
* @see BoolArgumentType.getBool
4845
*/
@@ -54,7 +51,7 @@ fun DefaultArgumentReader<DoubleArgumentType>.value(): Double {
5451

5552
/**
5653
* Reads the float value from the argument in
57-
* the receiver [DefaultArgumentReader].
54+
* the receiver [ArgumentReader].
5855
*
5956
* @see FloatArgumentType.getFloat
6057
*/
@@ -66,7 +63,7 @@ fun DefaultArgumentReader<FloatArgumentType>.value(): Float {
6663

6764
/**
6865
* Reads the integer value from the argument in
69-
* the receiver [DefaultArgumentReader].
66+
* the receiver [ArgumentReader].
7067
*
7168
* @see IntegerArgumentType.getInteger
7269
*/
@@ -78,7 +75,7 @@ fun DefaultArgumentReader<IntegerArgumentType>.value(): Int {
7875

7976
/**
8077
* Reads the long value from the argument in
81-
* the receiver [DefaultArgumentReader].
78+
* the receiver [ArgumentReader].
8279
*
8380
* @see LongArgumentType.getLong
8481
*/

common/src/main/kotlin/com/lambda/brigadier/argument/StringArguments.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222

2323
package com.lambda.brigadier.argument
2424

25-
import com.lambda.brigadier.BrigadierDsl
26-
import com.lambda.brigadier.DefaultArgumentConstructor
27-
import com.lambda.brigadier.DefaultArgumentReader
28-
import com.lambda.brigadier.argument
25+
import com.lambda.brigadier.*
2926
import com.mojang.brigadier.arguments.StringArgumentType
3027

3128
/**

common/src/main/kotlin/com/lambda/config/groups/BuildSettings.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class BuildSettings(
1010
BREAK, PLACE, PATHING
1111
}
1212

13-
val page by c.setting("Build Page", Page.BREAK, "Current page", vis)
13+
private val page by c.setting("Build Page", Page.BREAK, "Current page", vis)
1414

1515
override val breakCoolDown by c.setting("Break Cooldown", 0, 0..1000, 1, "Delay between breaking blocks", " ms") { vis() && page == Page.BREAK }
1616
override val breakConfirmation by c.setting("Break Confirmation", false, "Wait for block break confirmation") { vis() && page == Page.BREAK }
@@ -24,4 +24,4 @@ class BuildSettings(
2424
override val rotateForPlace by c.setting("Rotate For Place", true, "Rotate towards block while placing") { vis() && page == Page.PLACE }
2525

2626
override val pathing by c.setting("Pathing", true, "Path to blocks") { vis() && page == Page.PATHING }
27-
}
27+
}

common/src/main/kotlin/com/lambda/config/settings/collections/ListSetting.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package com.lambda.config.settings.collections
22

33
import com.google.gson.JsonElement
4-
import com.google.gson.reflect.TypeToken
54
import com.lambda.Lambda.gson
65
import com.lambda.config.AbstractSetting
76
import java.lang.reflect.Type
87

98
class ListSetting<T : Any>(
109
override val name: String,
11-
private val defaultValue: MutableList<T>,
10+
defaultValue: MutableList<T>,
1211
private val type: Type,
1312
description: String,
1413
visibility: () -> Boolean,

common/src/main/kotlin/com/lambda/interaction/construction/result/BreakResult.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ import com.lambda.interaction.material.ContainerManager.transfer
88
import com.lambda.interaction.material.StackSelection.Companion.select
99
import com.lambda.interaction.material.StackSelection.Companion.selectStack
1010
import com.lambda.interaction.material.container.MainHandContainer
11-
import com.lambda.task.Task.Companion.emptyTask
1211
import com.lambda.task.Task.Companion.failTask
1312
import com.lambda.task.tasks.BreakBlock.Companion.breakBlock
14-
import com.lambda.task.tasks.GoalTask.Companion.moveToGoalUntil
1513
import net.minecraft.block.BlockState
1614
import net.minecraft.item.Item
1715
import net.minecraft.util.math.BlockPos
18-
import net.minecraft.util.math.Box
1916
import net.minecraft.util.math.Direction
2017

2118
sealed class BreakResult : BuildResult() {

common/src/main/kotlin/com/lambda/interaction/construction/result/PlaceResult.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
package com.lambda.interaction.construction.result
22

3-
import baritone.api.pathing.goals.Goal
43
import baritone.api.pathing.goals.GoalBlock
54
import baritone.api.pathing.goals.GoalInverted
65
import com.lambda.interaction.construction.context.PlaceContext
7-
import com.lambda.task.Task
86
import com.lambda.task.tasks.BuildStructure.Companion.breakBlock
9-
import com.lambda.task.tasks.GoalTask.Companion.moveToGoal
10-
import com.lambda.task.tasks.GoalTask.Companion.moveToGoalUntil
117
import com.lambda.task.tasks.PlaceBlock.Companion.placeBlock
128
import net.minecraft.block.BlockState
139
import net.minecraft.item.ItemPlacementContext
1410
import net.minecraft.item.ItemStack
1511
import net.minecraft.util.math.BlockPos
16-
import net.minecraft.util.math.Box
17-
import net.minecraft.util.shape.VoxelShape
1812

1913
/**
2014
* [PlaceResult] represents the result of a placement simulation.
@@ -121,4 +115,4 @@ sealed class PlaceResult : BuildResult() {
121115

122116
override val resolve get() = TODO("Not expected")
123117
}
124-
}
118+
}

common/src/main/kotlin/com/lambda/interaction/visibilty/VisibilityChecker.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.lambda.interaction.visibilty
22

3-
import com.lambda.context.SafeContext
3+
import com.lambda.config.groups.IRotationConfig
44
import com.lambda.config.groups.InteractionConfig
5+
import com.lambda.context.SafeContext
56
import com.lambda.interaction.RotationManager
6-
import com.lambda.config.groups.IRotationConfig
77
import com.lambda.interaction.rotation.Rotation.Companion.rotationTo
88
import com.lambda.interaction.rotation.RotationContext
99
import com.lambda.module.modules.client.TaskFlow

common/src/main/kotlin/com/lambda/util/TransformedObservable.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ abstract class TransformedObservable<T>(initialValue: T) : ReadWriteProperty<Any
88

99
override fun getValue(thisRef: Any?, property: KProperty<*>) = value
1010

11-
override fun setValue(thisRef: Any?, property: KProperty<*>, valueIn: T) {
11+
override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) {
1212
val oldValue = this.value
13-
this.value = transform(valueIn)
14-
if (oldValue != value) onChange(oldValue, value)
13+
this.value = transform(value)
14+
if (oldValue != this.value) onChange(oldValue, this.value)
1515
}
1616

1717
protected open fun transform(value: T): T = value
1818
protected open fun onChange(oldValue: T, newValue: T) {}
1919

2020
override fun toString(): String = "TransformedObservableProperty(value=$value)"
21-
}
21+
}

0 commit comments

Comments
 (0)