mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Hud needs to be reimplemented
This commit is contained in:
parent
00972d4b91
commit
989d64540e
4 changed files with 6 additions and 5 deletions
|
@ -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() {
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue