File tree Expand file tree Collapse file tree
src/main/kotlin/com/lambda/module/modules/world Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import net.minecraft.block.Block
4242import net.minecraft.util.math.BlockPos
4343import java.util.concurrent.ConcurrentLinkedQueue
4444
45+ @Suppress(" unused" )
4546object Scaffold : Module(
4647 name = " Scaffold" ,
4748 description = " Places blocks under the player" ,
@@ -77,9 +78,11 @@ object Scaffold : Module(
7778 }
7879
7980 listen<TickEvent .Pre > {
80- val stack = selectStack {
81+ val selection = selectStack {
8182 { it.blockItem.let { blockItem -> blockItem != null && blockItem.block !in blacklistedBlocks } }
82- }.filterStacks(HotbarContainer .stacks).firstOrNull() ? : return @listen
83+ }
84+ val stack = player.mainHandStack.takeIf { selection.filterStack(it) }
85+ ? : selection.filterStacks(HotbarContainer .stacks).firstOrNull() ? : return @listen
8386 val playerSupport = player.blockPos.down()
8487 val alreadySupported = blockState(playerSupport).hasSolidTopSurface(world, playerSupport, player)
8588 if (alreadySupported) return @listen
You can’t perform that action at this time.
0 commit comments