HUD API
Ask BuildPrint's panels to step aside while your own tool fills the screen.
A mod with its own screen-filling tool can hide BuildPrint's panels while that tool is open. From BuildPrint 0.1.17.
// Once, for example from your client initializer.
BuildprintHud.hideWhile("mymod", () -> myTool.isOpen());
// No longer needed.
BuildprintHud.release("mymod");Good to know #
- It hides the build panel, the look-at card, the next-block label and the editor panel. The ghost and the labels in the world stay.
- The condition is asked every frame, so keep it cheap. When it throws, it counts as false.
- One condition per owner: a second call replaces the first. The panels are hidden while any owner's condition is true.
Reference #
| BuildprintHud | What it does |
|---|---|
hideWhile(String owner, BooleanSupplier condition) | Hide the panels while the condition is true. |
release(String owner) | Drop that owner's condition. |
isHidden() | Whether the panels are hidden right now. |
Something missing or wrong on this page? Say so on Discord.