Skip to content

Commit

Permalink
Fix some MouseTweaks interactions (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchung01 authored Jun 18, 2024
1 parent 10a0453 commit 1316f03
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/main/java/appeng/client/gui/AEBaseGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ private void updateDragSplitting()
@Override
@Optional.Method(modid = "mousetweaks")
public boolean MT_isMouseTweaksDisabled() {
return true;
return false;
}

@Override
Expand Down Expand Up @@ -1087,12 +1087,20 @@ public boolean MT_isCraftingOutput(Slot slot) {
@Override
@Optional.Method(modid = "mousetweaks")
public boolean MT_isIgnored(Slot slot) {
return true;
return false;
}

@Override
@Optional.Method(modid = "mousetweaks")
public boolean MT_disableRMBDraggingFunctionality() {
return true;
if (this.dragSplitting && this.dragSplittingButton == 1) {
this.dragSplitting = false;
// Don't ignoreMouseUp on slots that can't accept the item. (crafting output, ME slot, etc.)
if (this.getSlotUnderMouse() != null && this.getSlotUnderMouse().isItemValid(this.mc.player.inventory.getItemStack())) {
this.ignoreMouseUp = true;
}
return true;
}
return false;
}
}
3 changes: 3 additions & 0 deletions src/main/resources/appliedenergistics2_at.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# GUI rendering
public net.minecraft.client.gui.inventory.GuiContainer func_146977_a(Lnet/minecraft/inventory/Slot;)V # drawSlot
public net.minecraft.client.gui.inventory.GuiContainer field_146988_G # dragSplittingButton
public net.minecraft.client.gui.inventory.GuiContainer field_146987_F # dragSplittingLimit
public net.minecraft.client.gui.inventory.GuiContainer field_146995_H # ignoreMouseUp
public net.minecraft.client.gui.GuiTextField func_146188_c(IIII)V # drawSelectionBox

0 comments on commit 1316f03

Please sign in to comment.