Skip to content

Commit aaa5a73

Browse files
committed
comment out length controller + set angle max to 180
1 parent c257864 commit aaa5a73

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

common/src/main/kotlin/org/valkyrienskies/clockwork/content/contraptions/propeller/blades/AngleScrollValueBehaviour.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import kotlin.math.abs
1515
import kotlin.math.max
1616

1717
class AngleScrollValueBehaviour(label: Component, be: SmartBlockEntity, slot: ValueBoxTransform) : ScrollValueBehaviour(label, be, slot) {
18+
19+
20+
21+
1822
override fun getType(): BehaviourType<*> {
1923
return super.getType()
2024
}

common/src/main/kotlin/org/valkyrienskies/clockwork/content/contraptions/propeller/blades/BladeControllerBlockEntity.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ class BladeControllerBlockEntity(type: BlockEntityType<*>, pos: BlockPos, state:
5454

5555
override fun addBehaviours(behaviours: MutableList<BlockEntityBehaviour>) {
5656
this.angleController = AngleScrollValueBehaviour(TranslatableComponent("vs_clockwork.blade_controller.angle"), this, AngleControllerValueBoxTransform())
57-
this.lengthController = LengthScrollValueBehaviour(TranslatableComponent("vs_clockwork.blade_controller.length"), this, LengthControllerValueBoxTransform())
57+
this.angleController.between(-180,180) // Should do this in controller class, but due to certain questionable create coding decisions, we're doing it here
58+
//TODO: Figure out how to make lengthController work
59+
//this.lengthController = LengthScrollValueBehaviour(TranslatableComponent("vs_clockwork.blade_controller.length"), this, LengthControllerValueBoxTransform())
5860

5961
this.angleController.withCallback{i -> this.updateBladeAngle(i.toDouble())};
60-
this.lengthController.withCallback{i -> this.updateBladeLength(i)};
62+
//this.lengthController.withCallback{i -> this.updateBladeLength(i)};
6163

6264

63-
behaviours.add(this.lengthController)
65+
//behaviours.add(this.lengthController)
6466
behaviours.add(this.angleController)
6567
}
6668

0 commit comments

Comments
 (0)