Fix HudHandler.kt on forge
This commit is contained in:
parent
25a5380166
commit
82e05af001
|
@ -5,6 +5,7 @@ import fr.username404.snowygui.config.SnowyConfigScreen
|
|||
import net.minecraftforge.fml.ExtensionPoint
|
||||
import net.minecraftforge.fml.common.Mod
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent
|
||||
import thedarkcolour.kotlinforforge.forge.FORGE_BUS
|
||||
import thedarkcolour.kotlinforforge.forge.LOADING_CONTEXT
|
||||
import thedarkcolour.kotlinforforge.forge.MOD_BUS
|
||||
import java.util.function.BiFunction
|
||||
|
@ -31,5 +32,6 @@ class ForgeInit: Snowy() {
|
|||
addListener(this@ForgeInit::initSetup)
|
||||
addListener(this@ForgeInit::configSetup)
|
||||
}
|
||||
FORGE_BUS.register(HudHandler)
|
||||
}
|
||||
}
|
|
@ -2,16 +2,12 @@
|
|||
package fr.username404.snowygui.forge
|
||||
|
||||
import fr.username404.snowygui.EventSnowy
|
||||
import net.minecraftforge.api.distmarker.Dist
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
import net.minecraftforge.fml.common.Mod
|
||||
|
||||
@Mod.EventBusSubscriber(Dist.CLIENT)
|
||||
object HudHandler: EventSnowy {
|
||||
override val type: String = "HudRender"
|
||||
@SubscribeEvent
|
||||
@JvmStatic
|
||||
fun handleRendering(event: RenderGameOverlayEvent.Post) {
|
||||
if (event.type == RenderGameOverlayEvent.ElementType.ALL) {
|
||||
fire(event.matrixStack)
|
||||
|
|
Loading…
Reference in New Issue