Skip to content

Commit 5cf47e0

Browse files
committed
assign item usage context the swap stack
1 parent 3387261 commit 5cf47e0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/kotlin/com/lambda/interaction/construction/simulation/checks/PlaceChecker.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,10 @@ class PlaceChecker @SimCheckerDsl private constructor(simInfo: SimInfo)
221221

222222
// ToDo: Override the stack used for this to account for blocks where replaceability is dependent on the held item
223223
val usageContext = ItemUsageContext(
224+
world,
224225
fakePlayer,
225226
Hand.MAIN_HAND,
227+
swapStack,
226228
blockHit,
227229
)
228230
val cachePos = CachedBlockPosition(

src/main/kotlin/com/lambda/util/player/SlotUtils.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ object SlotUtils {
2929
val ClientPlayerEntity.hotbarAndStorage: List<ItemStack> get() = inventory.mainStacks
3030
val ClientPlayerEntity.combined: List<ItemStack> get() = hotbarAndStorage + equipment
3131

32-
3332
fun SafeContext.clickSlot(
3433
slotId: Int,
3534
button: Int,

0 commit comments

Comments
 (0)