Skip to content

Commit 50bdef8

Browse files
committed
ToDo reminder for HALF properties
1 parent 7a77cc8 commit 50bdef8

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

common/src/main/kotlin/com/lambda/command/commands/BuildCommand.kt

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ object BuildCommand : LambdaCommand(
3333
}
3434

3535
executeWithResult {
36+
val id = structure().value()
3637
runSafe<Unit> {
37-
val id = structure().value()
3838
StructureRegistry.loadStructure(id)?.let { template ->
3939
info("Building structure ${id.path} with size ${template.size.toShortString()} by ${template.author}")
4040
template.toStructure()
@@ -47,32 +47,8 @@ object BuildCommand : LambdaCommand(
4747
}
4848
}
4949

50-
CommandResult.failure("Structure not found")
50+
CommandResult.failure("Structure ${id.path} not found")
5151
}
52-
53-
// execute {
54-
// runSafe {
55-
//
56-
//// val materials = setOf(
57-
//// TargetState.Block(Blocks.NETHERRACK),
58-
//// TargetState.Block(Blocks.AIR),
59-
//// TargetState.Block(Blocks.COBBLESTONE),
60-
//// TargetState.Block(Blocks.AIR),
61-
//// )
62-
//// val facing = player.horizontalFacing
63-
//// val pos = player.blockPos.add(facing.vector.multiply(2))
64-
////
65-
//// BlockBox.create(pos, pos.add(facing.rotateYClockwise().vector.multiply(3)))
66-
//// .toStructure(TargetState.Block(Blocks.NETHERRACK))
67-
//// .toBlueprint {
68-
//// it.mapValues { (_, _) ->
69-
//// materials.elementAt((System.currentTimeMillis() / 5000).toInt() % materials.size)
70-
//// }
71-
//// }
72-
//// .build(finishOnDone = false)
73-
//// .start(null)
74-
// }
75-
// }
7652
}
7753
}
7854
}

common/src/main/kotlin/com/lambda/interaction/construction/simulation/BuildSimulator.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ object BuildSimulator {
131131

132132
boxes.forEach { box ->
133133
val res = if (TaskFlow.interact.useRayCast) interact.resolution else 2
134+
// ToDo: If state has HALF property we need to scan the correct half of the block surface
134135
scanVisibleSurfaces(eye, box, setOf(hitSide), res) { side, vec ->
135136
if (eye distSq vec > reachSq) {
136137
misses.add(vec)

0 commit comments

Comments
 (0)