Marks API

Clear BuildPrint's outlines and tints off the world while your own highlight plays.

For a mod that points at blocks in the world. Sorted uses it for a few seconds when it lights up chests, so its ping does not fight BuildPrint's outlines. From BuildPrint 0.1.35.

Java
// Once, for example from your client initializer.
BuildprintMarks.hideWhile("mymod", () -> myHighlight.isPlaying());

// No longer needed.
BuildprintMarks.release("mymod");

Good to know #

  • It hides the outlines and tints on wrong, extra and still-to-place blocks, the next-block box, beam and label, the Extra view's markers and the guided save's marks. The ghost, the HUD and the editor's gizmos stay. For the HUD, use the HUD API.
  • 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 marks are hidden while any owner's condition is true.
  • A condition set before the player joins a world holds once they are in it.

Reference #

BuildprintMarksWhat it does
isAvailable()In a world, where there are marks to hide.
hideWhile(String owner, BooleanSupplier condition)Hide the marks while the condition is true.
release(String owner)Drop that owner's condition.
isHidden()Whether the marks are hidden right now.

Something missing or wrong on this page? Say so on Discord.