Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ public void mouseClicked(int xCoord, int yCoord, int btn) {
Slot slot = this.getSlotAtPosition(xCoord, yCoord);
if (slot != null && (btn == 0 || btn == 1 || flag)) {
if (btn == this.parent.mc.gameSettings.keyBindPickBlock.getKeyCode() + 100) {
this.handleMouseClick(slot, slot.getSlotIndex(), btn, 3);
this.mouseClick(slot, slot.getSlotIndex(), btn, 3);
} else if (isShiftKeyDown()) {
this.handleMouseClick(slot, slot.getSlotIndex(), btn, 1);
this.mouseClick(slot, slot.getSlotIndex(), btn, 1);
} else {
this.handleMouseClick(slot, slot.getSlotIndex(), btn, 0);
this.mouseClick(slot, slot.getSlotIndex(), btn, 0);
}
}
}
Expand Down Expand Up @@ -352,8 +352,7 @@ public void setTextFieldValue(String displayName, int mousex, int mousey, ItemSt
this.saveSearchString();
}

@Override
public boolean handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int mouseButton) {
private boolean mouseClick(Slot slot, int slotIdx, int ctrlDown, int mouseButton) {
if (slotIdx < 0) return false;
// Temporary solution
if (lastClickTime == Minecraft.getMinecraft().thePlayer.ticksExisted) {
Expand Down Expand Up @@ -436,6 +435,11 @@ public boolean handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int mouseB
return false;
}

@Override
public boolean handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int mouseButton) {
return slot instanceof SlotME;
}

@Override
public boolean actionPerformed(GuiButton btn) {
if (btn instanceof final GuiImgButton iBtn) {
Expand Down