blob: b9a217fbcaad800f19559f9b3ffe242c8df06e6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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()
}
}
|