aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/mixin
diff options
context:
space:
mode:
authorAaron <51387595+AzureAaron@users.noreply.github.com>2024-04-25 21:28:22 -0400
committerAaron <51387595+AzureAaron@users.noreply.github.com>2024-04-26 16:23:22 -0400
commit12070a41687893c564e4d2c1ad9b6ed379f92cae (patch)
tree4181bd89b9bbb9c0d1a95e94d568bc09bc77587b /src/main/java/de/hysky/skyblocker/mixin
parent667df3308e593b66905e83b652020f2e172f7ae3 (diff)
downloadSkyblocker-12070a41687893c564e4d2c1ad9b6ed379f92cae.tar.gz
Skyblocker-12070a41687893c564e4d2c1ad9b6ed379f92cae.tar.bz2
Skyblocker-12070a41687893c564e4d2c1ad9b6ed379f92cae.zip
Fix "What starts with" terminal solver
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/mixin')
-rw-r--r--src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java
index 681b0cbd..9097ed0f 100644
--- a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java
+++ b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java
@@ -165,6 +165,8 @@ public abstract class HandledScreenMixin<T extends ScreenHandler> extends Screen
/**
* The naming of this method in yarn is half true, its mostly to handle slot/item interactions (which are mouse or keyboard clicks)
* For example, using the drop key bind while hovering over an item will invoke this method to drop the players item
+ *
+ * @implNote This runs before {@link ScreenHandler#onSlotClick(int, int, SlotActionType, net.minecraft.entity.player.PlayerEntity)}
*/
@Inject(method = "onMouseClick(Lnet/minecraft/screen/slot/Slot;IILnet/minecraft/screen/slot/SlotActionType;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;clickSlot(IIILnet/minecraft/screen/slot/SlotActionType;Lnet/minecraft/entity/player/PlayerEntity;)V"), cancellable = true)
private void skyblocker$onSlotClick(Slot slot, int slotId, int button, SlotActionType actionType, CallbackInfo ci) {
@@ -213,6 +215,10 @@ public abstract class HandledScreenMixin<T extends ScreenHandler> extends Screen
}
}
+ if (currentSolver != null) {
+ SkyblockerMod.getInstance().containerSolverManager.onSlotClick(slotId, stack, this.handler.getCursorStack());
+ }
+
// Experiment Solvers
if (currentSolver instanceof ExperimentSolver experimentSolver && experimentSolver.getState() == ExperimentSolver.State.SHOW && slot.inventory instanceof SimpleInventory) {
switch (experimentSolver) {