Rework of HUD element system
Allows configuration because that's probably a good thing. The values in the json config are percentages of the screen.
This commit is contained in:
parent
47b88b95b0
commit
e3d65a9e3a
21 changed files with 894 additions and 311 deletions
|
@ -7,7 +7,6 @@ import WayofTime.bloodmagic.util.Constants;
|
|||
import WayofTime.bloodmagic.ritual.RitualRegistry;
|
||||
import WayofTime.bloodmagic.ritual.Ritual;
|
||||
import WayofTime.bloodmagic.ritual.RitualComponent;
|
||||
import WayofTime.bloodmagic.client.hud.HUDElement;
|
||||
import WayofTime.bloodmagic.client.key.KeyBindings;
|
||||
import WayofTime.bloodmagic.client.render.block.RenderFakeBlocks;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
|
@ -57,7 +56,6 @@ import java.util.*;
|
|||
public class ClientHandler {
|
||||
// Quick toggle for error suppression. Set to false if you wish to hide model errors.
|
||||
public static final boolean SUPPRESS_ASSET_ERRORS = true;
|
||||
public static final List<HUDElement> hudElements = new ArrayList<>();
|
||||
public static TextureAtlasSprite ritualStoneBlank;
|
||||
public static TextureAtlasSprite ritualStoneWater;
|
||||
public static TextureAtlasSprite ritualStoneFire;
|
||||
|
@ -175,13 +173,6 @@ public class ClientHandler {
|
|||
keyBinding.handleKeybind();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onHudRender(RenderGameOverlayEvent.Pre event) {
|
||||
for (HUDElement element : hudElements)
|
||||
if (element.getElementType() == event.getType() && element.shouldRender(minecraft))
|
||||
element.render(minecraft, event.getResolution(), event.getPartialTicks());
|
||||
}
|
||||
|
||||
// Stolen from Chisel
|
||||
@SubscribeEvent
|
||||
public static void onModelBake(ModelBakeEvent event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue