diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/TestShowSlotNumber.kt | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java index 6c42d1e82..459eb65a6 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java @@ -81,6 +81,11 @@ public class DevConfig { @ConfigAccordionId(id = 0) public boolean highlightMissingRepo = false; + @Expose + @ConfigOption(name = "Slot Number", desc = "Show slot number in inventory while pressing this key.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int showSlotNumberKey = Keyboard.KEY_NONE; + @ConfigOption(name = "Parkour Waypoints", desc = "") @Accordion @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestShowSlotNumber.kt b/src/main/java/at/hannibal2/skyhanni/test/TestShowSlotNumber.kt new file mode 100644 index 000000000..be202e20d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/test/TestShowSlotNumber.kt @@ -0,0 +1,17 @@ +package at.hannibal2.skyhanni.test + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import org.lwjgl.input.Keyboard + +class TestShowSlotNumber { + + @SubscribeEvent + fun onRenderItemTip(event: RenderInventoryItemTipEvent) { + if (Keyboard.isKeyDown(SkyHanniMod.feature.dev.showSlotNumberKey)) { + val slotIndex = event.slot.slotIndex + event.stackTip = "$slotIndex" + } + } +} |