File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
common/src/main/kotlin/com/lambda/interaction
material/container/containers Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ object MainHandContainer : MaterialContainer(Rank.MAIN_HAND) {
4343 override val name: String get() = " Depositing [$selection ] to ${hand.name.lowercase().replace(" _" , " " )} "
4444
4545 override fun SafeContext.onStart () {
46- val moveStack = matchingStacks(selection).firstOrNull() ? : run {
46+ val moveStack = InventoryContainer . matchingStacks(selection).firstOrNull() ? : run {
4747 failure(" No matching stacks found in inventory" )
4848 return
4949 }
Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ object PlaceManager : RequestHandler<PlaceRequest>() {
6161 listen<TickEvent .Pre >(Int .MIN_VALUE ) {
6262 preEvent()
6363
64- if (! updateRequest { true }) {
64+ if (! updateRequest { request ->
65+ pendingInteractions.none { pending -> pending.context.expectedPos == request.value.placeContext.expectedPos }
66+ }) {
6567 postEvent()
6668 return @listen
6769 }
@@ -178,9 +180,11 @@ object PlaceManager : RequestHandler<PlaceRequest>() {
178180 val itemStack = player.getStackInHand(hand)
179181 if (interaction.currentGameMode == GameMode .SPECTATOR ) return ActionResult .SUCCESS
180182
181- val handNotEmpty = ! player.getStackInHand(hand).isEmpty
182- val cantInteract = player.shouldCancelInteraction() && handNotEmpty
183- if (! cantInteract) return ActionResult .PASS
183+ // checks if the player should be able to interact with the block for if its something
184+ // like a furnace or chest where an action would happen
185+ // val handNotEmpty = player.getStackInHand(hand).isEmpty.not()
186+ // val cantInteract = player.shouldCancelInteraction() && handNotEmpty
187+ // if (!cantInteract) return ActionResult.PASS
184188
185189 if (! itemStack.isEmpty && ! player.itemCooldownManager.isCoolingDown(itemStack.item)) {
186190 val itemUsageContext = ItemUsageContext (player, hand, hitResult)
You can’t perform that action at this time.
0 commit comments