diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-03 15:31:53 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-03 15:31:53 +0200 |
| commit | 04bb7a6965587a1a1b7f65da8f7743092dd8248d (patch) | |
| tree | a0360f6734168c4c490d5cce7b04fa64053aa7fe /src/main/java/at/hannibal2/skyhanni/test | |
| parent | f7f341b927c42b1fa9ee47549f35f9e0ba2bb36d (diff) | |
| download | skyhanni-04bb7a6965587a1a1b7f65da8f7743092dd8248d.tar.gz skyhanni-04bb7a6965587a1a1b7f65da8f7743092dd8248d.tar.bz2 skyhanni-04bb7a6965587a1a1b7f65da8f7743092dd8248d.zip | |
Added dev options to show slot number on key press
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/TestShowSlotNumber.kt | 17 |
1 files changed, 17 insertions, 0 deletions
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" + } + } +} |
