diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-01-07 07:12:36 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-01-07 07:12:36 +0100 |
| commit | 8d1fa19a94a9820e2be5e7fe6a5b41371922f175 (patch) | |
| tree | c5d8cbff44428f97276eb7bd22568c3f9b02bba3 /src/main/java/at/hannibal2/skyhanni/features | |
| parent | dbb237f4bd98f5e261a079642c913597455e789f (diff) | |
| download | SkyHanni-8d1fa19a94a9820e2be5e7fe6a5b41371922f175.tar.gz SkyHanni-8d1fa19a94a9820e2be5e7fe6a5b41371922f175.tar.bz2 SkyHanni-8d1fa19a94a9820e2be5e7fe6a5b41371922f175.zip | |
Add Brewing Stand Overlay.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt new file mode 100644 index 000000000..6496e3d4c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/BrewingStandOverlay.kt @@ -0,0 +1,39 @@ +package at.hannibal2.skyhanni.features.misc + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent +import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class BrewingStandOverlay { + + @SubscribeEvent + fun onRenderItemTip(event: RenderInventoryItemTipEvent) { + if (!LorenzUtils.inSkyBlock) return + if (!SkyHanniMod.feature.misc.brewingStandOverlay) return + + if (event.inventoryName != "Brewing Stand") return + + val stack = event.stack + val name = stack.name ?: return + + when (event.slot.slotNumber) { + 13, // Ingredient input + 21, // Progress + 42, // Output right side + -> { + } + + else -> return + } + + // Hide the progress slot when not active + if (name.contains(" or ")) return + + event.stackTip = name + event.offsetX = 3 + event.offsetY = -5 + event.alignLeft = false + } +}
\ No newline at end of file |
