Skip to content

Commit e8893d5

Browse files
committed
swap even if already swapped for long enough to secure the correct tool for the tick and stick to one tick stage most accurate to vanilla
1 parent 83c5dbe commit e8893d5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/main/kotlin/com/lambda/config/groups/BreakSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class BreakSettings(
5656
override val breakDelay by c.setting("Break Delay", 0, 0..6, 1, "The delay between breaking blocks", " tick(s)", visibility = vis).group(groupPath, Group.General)
5757

5858
// Timing
59-
override val breakStageMask by c.setting("Break Stage Mask", setOf(TickEvent.Input.Post, TickEvent.Player.Post), description = "The sub-tick timing at which break actions can be performed", visibility = vis).group(groupPath, Group.General)
59+
override val breakStageMask by c.setting("Break Stage Mask", setOf(TickEvent.Input.Post), description = "The sub-tick timing at which break actions can be performed", visibility = vis).group(groupPath, Group.General)
6060

6161
// Swap
6262
override val swapMode by c.setting("Swap Mode", BreakConfig.SwapMode.End, "Decides when to swap to the best suited tool when breaking a block", visibility = vis).group(groupPath, Group.General)

src/main/kotlin/com/lambda/config/groups/InteractSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class InteractSettings(
2929
) : InteractConfig {
3030
override val rotate by c.setting("Rotate For Interact", true, "Rotates the player to look at the block when interacting", visibility = vis).group(groupPath)
3131
override val swingHand by c.setting("Swing On Interact", true, "Swings the players hand after interacting", visibility = vis).group(groupPath)
32-
override val interactStageMask by c.setting("Interact Stage Mask", setOf(TickEvent.Input.Post, TickEvent.Player.Post), description = "The sub-tick timing at which interact actions are performed", visibility = vis).group(groupPath)
32+
override val interactStageMask by c.setting("Interact Stage Mask", setOf(TickEvent.Input.Post), description = "The sub-tick timing at which interact actions are performed", visibility = vis).group(groupPath)
3333
override val interactSwingType by c.setting("Interact Swing Type", BuildConfig.SwingType.Vanilla, "The style of swing") { vis() && swingHand }.group(groupPath)
3434
override val interactConfirmationMode by c.setting("Interact Confirmation Mode", InteractionConfig.InteractConfirmationMode.InteractThenAwait, "The style of confirmation for interactions", visibility = vis).group(groupPath)
3535
}

src/main/kotlin/com/lambda/config/groups/PlaceSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class PlaceSettings(
3232
override val rotateForPlace by c.setting("Rotate For Place", true, "Rotate towards block while placing", visibility = vis).group(groupPath)
3333
override val airPlace by c.setting("Air Place", AirPlaceMode.None, "Allows for placing blocks without adjacent faces", visibility = vis).group(groupPath)
3434
override val axisRotateSetting by c.setting("Axis Rotate", true, "Overrides the Rotate For Place setting and rotates the player on each axis to air place rotational blocks") { vis() && airPlace.isEnabled }.group(groupPath)
35-
override val placeStageMask by c.setting("Place Stage mask", setOf(TickEvent.Input.Post, TickEvent.Player.Post), description = "The sub-tick timing at which place actions are performed", visibility = vis).group(groupPath)
35+
override val placeStageMask by c.setting("Place Stage mask", setOf(TickEvent.Input.Post), description = "The sub-tick timing at which place actions are performed", visibility = vis).group(groupPath)
3636
override val placeConfirmationMode by c.setting("Place Confirmation", PlaceConfirmationMode.PlaceThenAwait, "Wait for block placement confirmation", visibility = vis).group(groupPath)
3737
override val maxPendingPlacements by c.setting("Max Pending Placements", 5, 0..30, 1, "The maximum amount of pending placements", visibility = vis).group(groupPath)
3838
override val placementsPerTick by c.setting("Places Per Tick", 1, 1..30, 1, "Maximum instant block places per tick", visibility = vis).group(groupPath)

src/main/kotlin/com/lambda/interaction/request/breaking/SwapInfo.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ data class SwapInfo(
7373
val minKeepTicks = run {
7474
if (type == Primary) {
7575
val swapTickProgress = breakDelta * (breakTicks + breakConfig.serverSwapTicks - 1).coerceAtLeast(1)
76-
if (swapTickProgress >= threshold && swapStack.heldTicks < breakConfig.serverSwapTicks) 1
76+
if (swapTickProgress >= threshold) 1
7777
else 0
7878
} else {
7979
val serverSwapTicks = breakConfig.serverSwapTicks.coerceAtLeast(3)
8080
val swapTickProgress = breakDelta * (breakTicks + serverSwapTicks - 1).coerceAtLeast(1)
81-
if (swapTickProgress >= threshold && swapStack.heldTicks < serverSwapTicks) 1
81+
if (swapTickProgress >= threshold) 1
8282
else 0
8383
}
8484
}

0 commit comments

Comments
 (0)