File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/kotlin/com/lambda/module/modules/player Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ import com.lambda.util.NamedEnum
4343import com.lambda.util.math.distSq
4444import com.lambda.util.world.raycast.InteractionMask
4545import net.minecraft.util.math.BlockPos
46- import net.minecraft.util.math.Direction
4746import java.util.concurrent.ConcurrentLinkedQueue
4847
4948object Scaffold : Module(
@@ -74,8 +73,11 @@ object Scaffold : Module(
7473
7574 init {
7675 listen<TickEvent .Pre > {
77- val offset = if (isKeyPressed(descend.code)) descendAmount + 1 else 1
78- val beneath = player.blockPos.offset(Direction .DOWN , offset)
76+ val playerSupport = player.blockPos.down()
77+ val alreadySupported = blockState(playerSupport).hasSolidTopSurface(world, playerSupport, player)
78+ if (alreadySupported) return @listen
79+ val offset = if (isKeyPressed(descend.code)) descendAmount else 0
80+ val beneath = playerSupport.down(offset)
7981 scaffoldPositions(beneath)
8082 .associateWith { TargetState .Solid }
8183 .toBlueprint()
You can’t perform that action at this time.
0 commit comments