diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-21 02:11:09 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-21 02:11:09 +0100 |
| commit | cdff2f52c54f05c96b9ca62a536392dd51e49e3f (patch) | |
| tree | 692ba97250e55e28aa27d52d3877cc34def644c8 /src/main/java/at/hannibal2/skyhanni/data | |
| parent | 26ac6919de473490299142fee3e6fea98048d028 (diff) | |
| download | skyhanni-cdff2f52c54f05c96b9ca62a536392dd51e49e3f.tar.gz skyhanni-cdff2f52c54f05c96b9ca62a536392dd51e49e3f.tar.bz2 skyhanni-cdff2f52c54f05c96b9ca62a536392dd51e49e3f.zip | |
Render always.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt new file mode 100644 index 000000000..b9a217fbc --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.data + +import at.hannibal2.skyhanni.events.GuiRenderEvent +import net.minecraftforge.client.event.GuiScreenEvent +import net.minecraftforge.client.event.RenderGameOverlayEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class RenderGuiData { + + @SubscribeEvent + fun onRenderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return + GuiRenderEvent(GuiRenderEvent.RenderType.IN_WORLD).postAndCatch() + } + + @SubscribeEvent + fun onBackgroundDraw(event: GuiScreenEvent.BackgroundDrawnEvent) { + GuiRenderEvent(GuiRenderEvent.RenderType.INVENTORY_BACKGROUND).postAndCatch() + } +}
\ No newline at end of file |
