Skip to content

Commit 7e804e3

Browse files
committed
small cleanup
1 parent fcc8860 commit 7e804e3

File tree

1 file changed

+3
-3
lines changed
  • common/src/main/kotlin/com/lambda/interaction/construction/simulation

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,12 +545,12 @@ object BuildSimulator {
545545
)
546546

547547
val selection = optimalStack.item.select()
548-
val hotbarSelection = selectContainer { ofAnyType(MaterialContainer.Rank.HOTBAR) }
549-
val containerStacks = selection.containerWithMaterial(inventory, hotbarSelection).firstOrNull()?.stacks ?: run {
548+
val containerSelection = selectContainer { ofAnyType(MaterialContainer.Rank.HOTBAR) }
549+
val container = selection.containerWithMaterial(inventory, containerSelection).firstOrNull() ?: run {
550550
acc.add(BuildResult.WrongItemSelection(pos, placeContext, optimalStack.item.select(), player.mainHandStack, inventory))
551551
return acc
552552
}
553-
val stack = selection.filterStacks(containerStacks).run {
553+
val stack = selection.filterStacks(container.stacks).run {
554554
firstOrNull { player.inventory.getSlotWithStack(it) == player.inventory.selectedSlot }
555555
?: first()
556556
}

0 commit comments

Comments
 (0)