Hud needs to be reimplemented

This commit is contained in:
Sollace 2020-04-15 18:34:23 +02:00
parent 00972d4b91
commit 989d64540e
4 changed files with 6 additions and 5 deletions

View file

@ -6,6 +6,7 @@ import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MinecraftClient;
@Deprecated
// TODO: forge events
class ClientHooks {
public static void beforePreRenderHud() {

View file

@ -6,7 +6,7 @@ import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.gui.DrawableHelper;
import net.minecraft.util.Identifier;
class FlightExperienceBar extends DrawableHelper implements IHudElement {
class FlightExperienceBar extends DrawableHelper implements HudElement {
static final Identifier TEXTURE = new Identifier("textures/gui/bars.png");

View file

@ -2,7 +2,7 @@ package com.minelittlepony.unicopia.client.gui;
import com.minelittlepony.unicopia.entity.player.Pony;
public interface IHudElement {
public interface HudElement {
void repositionHud(UHud context);

View file

@ -16,7 +16,7 @@ public class UHud {
public static final UHud instance = new UHud();
private List<IHudElement> elements = new ArrayList<>();
private List<HudElement> elements = new ArrayList<>();
MinecraftClient mc = MinecraftClient.getInstance();
@ -52,7 +52,7 @@ public class UHud {
elements.forEach(this::positionElement);
}
private void positionElement(IHudElement element) {
private void positionElement(HudElement element) {
if (!element.shouldRender(player)) {
return;
}
@ -60,7 +60,7 @@ public class UHud {
element.repositionHud(this);
}
private void renderElement(IHudElement element) {
private void renderElement(HudElement element) {
if (!element.shouldRender(player)) {
return;
}