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@SubscribeEventpublic 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 {@SubscribeEventpublic static void onRenderHealth(RenderGuiLayerEvent.Pre event) {}}
Dikkat et!
You don't need to use a system exactly like this one, as long as you can properly access the 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!