Skip to content

Commit

Permalink
Add debug info for BaseSlot index & shift-click priority
Browse files Browse the repository at this point in the history
  • Loading branch information
miozune committed Sep 21, 2022
1 parent 78234e5 commit 365c399
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.gtnewhorizons.modularui.api.widget.IWidgetParent;
import com.gtnewhorizons.modularui.api.widget.Interactable;
import com.gtnewhorizons.modularui.api.widget.Widget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.config.Config;
import com.gtnewhorizons.modularui.mixins.GuiContainerMixin;
import cpw.mods.fml.common.Optional;
Expand Down Expand Up @@ -349,6 +350,13 @@ public void drawDebugScreen() {
false);
lineY -= 11;
drawText("Class: " + hovered, 5, lineY, 1, color, false);
lineY -= 11;
if (hovered instanceof SlotWidget) {
BaseSlot slot = ((SlotWidget) hovered).getMcSlot();
drawText("Slot Index: " + slot.getSlotIndex(), 5, lineY, 1, color, false);
lineY -= 11;
drawText("Shift-Click Priority: " + slot.getShiftClickPriority(), 5, lineY, 1, color, false);
}
}
color = Color.withAlpha(color, 25);
for (int i = 5; i < screenSize.width; i += 5) {
Expand Down

0 comments on commit 365c399

Please sign in to comment.