@@ -3,6 +3,7 @@ package trombone.handler
33import HighwayTools.fillerMat
44import HighwayTools.grindObsidian
55import HighwayTools.material
6+ import HighwayTools.mode
67import HighwayTools.saveMaterial
78import HighwayTools.saveTools
89import HighwayTools.storageManagement
@@ -29,6 +30,7 @@ import trombone.Blueprint.isInsideBlueprintBuild
2930import trombone.IO.disableError
3031import trombone.Pathfinder.MovementState
3132import trombone.Pathfinder.moveState
33+ import trombone.Trombone
3234import trombone.Trombone.module
3335import trombone.handler.Container.containerTask
3436import trombone.handler.Container.getShulkerWith
@@ -95,11 +97,14 @@ object Player {
9597 }
9698 return true
9799 } else {
98- if (storageManagement && grindObsidian &&
99- containerTask.taskState == TaskState .DONE &&
100- material == Blocks .OBSIDIAN &&
101- (player.inventorySlots.countBlock(Blocks .OBSIDIAN ) <= saveMaterial &&
102- grindCycles == 0 )) {
100+ if (mode != Trombone .Mode .TUNNEL
101+ && storageManagement
102+ && grindObsidian
103+ && containerTask.taskState == TaskState .DONE
104+ && material == Blocks .OBSIDIAN
105+ && (player.inventorySlots.countBlock(Blocks .OBSIDIAN ) <= saveMaterial &&
106+ grindCycles == 0 )
107+ ) {
103108 val cycles = (player.inventorySlots.count { it.stack.isEmpty || InventoryManager .ejectList.contains(it.stack.item.registryName.toString()) } - 1 ) * 8
104109 if (cycles > 0 ) {
105110 moveState = MovementState .RESTOCK
@@ -128,7 +133,7 @@ object Player {
128133
129134 private fun SafeClientEvent.findMaterial (blockTask : BlockTask ) = when {
130135 blockTask.isFiller -> {
131- if (isInsideBlueprintBuild(blockTask.blockPos)) {
136+ if (isInsideBlueprintBuild(blockTask.blockPos) && mode == Trombone . Mode . HIGHWAY ) {
132137 if (player.inventorySlots.countBlock(material) > 0 ) {
133138 material
134139 } else {
0 commit comments