Skip to content

Commit 03394bb

Browse files
committed
Remove invMan and autoobby
1 parent a2aa4b8 commit 03394bb

1 file changed

Lines changed: 4 additions & 22 deletions

File tree

src/main/kotlin/HighwayTools.kt

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ internal object HighwayTools : PluginModule(
124124
private val breakDelay by setting("Break Delay", 1, 1..20, 1, { page == Page.BEHAVIOR }, description = "Sets the delay ticks between break tasks")
125125
private val illegalPlacements by setting("Illegal Placements", false, { page == Page.BEHAVIOR }, description = "Do not use on 2b2t. Tries to interact with invisible surfaces")
126126
private val bridging by setting("Bridging", true, { page == Page.BEHAVIOR }, description = "Tries to bridge / scaffold when stuck placing")
127+
private val instantMine by setting("Instant Mine", false, { page == Page.BEHAVIOR }, description = "Instant mine NCP exploit.")
127128
private val multiBuilding by setting("Shuffle Tasks", false, { page == Page.BEHAVIOR }, description = "Only activate when working with several players")
128-
private val toggleInventoryManager by setting("Toggle InvManager", false, { page == Page.BEHAVIOR }, description = "Activates InventoryManager on enable")
129-
private val toggleAutoObsidian by setting("Toggle AutoObsidian", false, { page == Page.BEHAVIOR }, description = "Activates AutoObsidian on enable")
130129
private val taskTimeout by setting("Task Timeout", 8, 0..20, 1, { page == Page.BEHAVIOR }, description = "Timeout for waiting for the server to try again")
131130
private val rubberbandTimeout by setting("Rubberband Timeout", 50, 5..100, 5, { page == Page.BEHAVIOR }, description = "Timeout for pausing after a lag")
132131
private val maxReach by setting("Max Reach", 4.9f, 1.0f..6.0f, 0.1f, { page == Page.BEHAVIOR }, description = "Sets the range of the blueprint. Decrease when tasks fail!")
@@ -274,16 +273,6 @@ internal object HighwayTools : PluginModule(
274273

275274
onEnable {
276275
runSafeR {
277-
/* Turn on inventory manager if the users wants us to control it */
278-
if (toggleInventoryManager && InventoryManager.isDisabled && mode != Mode.TUNNEL) {
279-
InventoryManager.enable()
280-
}
281-
282-
/* Turn on Auto Obsidian if the user wants us to control it. */
283-
if (toggleAutoObsidian && AutoObsidian.isDisabled && mode != Mode.TUNNEL) {
284-
AutoObsidian.enable()
285-
}
286-
287276
startingBlockPos = player.flooredPosition
288277
currentBlockPos = startingBlockPos
289278
startingDirection = Direction.fromEntity(player)
@@ -307,14 +296,6 @@ internal object HighwayTools : PluginModule(
307296

308297
onDisable {
309298
runSafe {
310-
if (toggleInventoryManager && InventoryManager.isEnabled) {
311-
InventoryManager.disable()
312-
}
313-
314-
if (toggleAutoObsidian && AutoObsidian.isEnabled) {
315-
AutoObsidian.disable()
316-
}
317-
318299
BaritoneUtils.settings?.allowPlace?.value = baritoneSettingAllowPlace
319300
BaritoneUtils.settings?.allowBreak?.value = baritoneSettingAllowBreak
320301
BaritoneUtils.settings?.renderGoal?.value = baritoneSettingRenderGoal
@@ -1468,10 +1449,10 @@ internal object HighwayTools : PluginModule(
14681449
return
14691450
}
14701451

1471-
if (blockTask.primed && blockTask.destroy) {
1452+
if (containerTask.primed && containerTask.destroy && instantMine) {
14721453
side = side.opposite
14731454
} else {
1474-
blockTask.primed
1455+
containerTask.primed
14751456
}
14761457
lastHitVec = getHitVec(blockTask.blockPos, side)
14771458
rotateTimer.reset()
@@ -1624,6 +1605,7 @@ internal object HighwayTools : PluginModule(
16241605
} else {
16251606
if (storageManagement && grindObsidian &&
16261607
containerTask.taskState == TaskState.DONE &&
1608+
// player.inventorySlots.countBlock(material) < saveMaterial ||
16271609
player.inventorySlots.any { it.stack.isEmpty || InventoryManager.ejectList.contains(it.stack.item.registryName.toString()) }) {
16281610
if (player.inventorySlots.countItem(Items.DIAMOND_PICKAXE) > saveTools) {
16291611
handleRestock(material.item)

0 commit comments

Comments
 (0)