HeartDev

Prerequisites

This library exploits a Minecraft client side event to override the rendering of the health bar. You must therefore create a special class to handle client-side events.

So you should create a class similar to this:

@EventBusSubscriber(modid = YourMod.MOD_ID, bus = EventBusSubscriber.Bus.GAME, value = Dist.CLIENT)
public class ModClientEvents {
}

When you have this class working, you need to access the rendering event, using this Minecraft event handler:

// the event -> RenderGuiLayerEvent.Pre
@SubscribeEvent
public static void onRenderHealth(RenderGuiLayerEvent.Pre event) {
}

At the end you should have something like this:

@EventBusSubscriber(modid = YouMod.MOD_ID, bus = EventBusSubscriber.Bus.GAME, value = Dist.CLIENT)
public class ModClientEvents {
@SubscribeEvent
public static void onRenderHealth(RenderGuiLayerEvent.Pre event) {
}
}

-> At this you can continue with the set up of the library...

-> Or you can learn how this library works in the dedicated folder!