Skip to content

Commit

Permalink
WIP: Improve Instrument and MusicVenueTool overlays.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeronica committed Mar 13, 2024
1 parent 8c34138 commit 518a50d
Show file tree
Hide file tree
Showing 12 changed files with 258 additions and 250 deletions.
21 changes: 17 additions & 4 deletions src/main/java/aeronicamc/mods/mxtune/gui/MXScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,45 @@

import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.Widget;
import net.minecraft.util.text.ITextComponent;

import java.util.Objects;

public class MXScreen extends Screen
{
protected MXScreen(ITextComponent pTitle)
{
super(pTitle);
}

@Override
public <T extends Widget> T addButton(T pButton) {
return super.addButton(pButton);
}

@Override
public void render(MatrixStack pMatrixStack, int pMouseX, int pMouseY, float pPartialTicks)
{
super.render(pMatrixStack, pMouseX, pMouseY, pPartialTicks);
ModGuiHelper.drawHooveringHelp(pMatrixStack, this, children, pMouseX, pMouseY);
}

public static Minecraft getMC()
{
@Override
public Minecraft getMinecraft() {
return Minecraft.getInstance();
}

public static FontRenderer getFont()
public ClientPlayerEntity getPlayer()
{
return Objects.requireNonNull(getMinecraft().player);
}
public FontRenderer getFont()
{
return getMC().font;
return Objects.requireNonNull(getMinecraft()).font;
}
}

Loading

0 comments on commit 518a50d

Please sign in to comment.