Skip to content

Commit eb17f25

Browse files
committed
lots of refactors
1 parent ba5b7d6 commit eb17f25

File tree

7 files changed

+157
-130
lines changed

7 files changed

+157
-130
lines changed

common/src/main/kotlin/com/lambda/interaction/construction/context/BreakContext.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818
package com.lambda.interaction.construction.context
1919

2020
import com.lambda.config.groups.BuildConfig
21-
import com.lambda.config.groups.InventoryConfig
2221
import com.lambda.context.SafeContext
2322
import com.lambda.graphics.renderer.esp.DirectionMask
2423
import com.lambda.graphics.renderer.esp.DirectionMask.exclude
2524
import com.lambda.interaction.construction.verify.TargetState
26-
import com.lambda.interaction.request.rotation.RotationConfig
2725
import com.lambda.interaction.request.rotation.RotationRequest
2826
import com.lambda.util.world.raycast.RayCastUtils.distanceTo
2927
import net.minecraft.block.BlockState
@@ -44,9 +42,6 @@ data class BreakContext(
4442
override val targetState: TargetState,
4543
override var hotbarIndex: Int,
4644
val instantBreak: Boolean,
47-
val buildConfig: BuildConfig,
48-
val rotationConfig: RotationConfig,
49-
val inventoryConfig: InventoryConfig
5045
) : BuildContext {
5146
private val baseColor = Color(222, 0, 0, 25)
5247
private val sideColor = Color(222, 0, 0, 100)

common/src/main/kotlin/com/lambda/interaction/construction/simulation/BuildSimulator.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,7 @@ object BuildSimulator {
410410
state,
411411
targetState,
412412
player.inventory.selectedSlot,
413-
instantBreakable(state, pos),
414-
build,
415-
rotation,
416-
inventory
413+
instantBreakable(state, pos)
417414
)
418415
acc.add(BreakResult.Break(pos, breakContext))
419416
return acc
@@ -461,7 +458,7 @@ object BuildSimulator {
461458
val instant = instantBreakable(state, pos)
462459

463460
val breakContext = BreakContext(
464-
eye, blockHit, request, state, targetState, player.inventory.selectedSlot, instant, build, rotation, inventory
461+
eye, blockHit, request, state, targetState, player.inventory.selectedSlot, instant
465462
)
466463

467464
if (player.isCreative) {

0 commit comments

Comments
 (0)