Class RenderLibUiFixtures

java.lang.Object
com.render.testkit.RenderLibUiFixtures

public final class RenderLibUiFixtures extends Object
Registry populated by RenderLibUiFixtureProvider implementations.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    immediateHud(String label, com.render.api.HudRenderer renderer)
    Registers an immediate HUD preview.
    void
    managedHud(String label, Supplier<com.render.api.ManagedHudLayout> factory)
    Registers a managed retained HUD preview.
    void
    managedHud(String label, Supplier<com.render.api.ManagedHudLayout> factory, BiPredicate<com.render.api.gui.ManagedHudLayoutRuntime, net.minecraft.client.input.KeyEvent> previewKeys)
    Registers a managed HUD preview with optional preview-only keyboard actions.
    void
    scenario(String label, String fixtureId, UiTestScenario scenario)
    Registers an executable test against an exact fixture ID (view class name, named-state, screen, or HUD ID).
    void
    screen(String label, Supplier<? extends net.minecraft.client.gui.screens.Screen> factory)
    Registers a generic Minecraft screen factory under screen:label.
    <T extends com.render.api.gui.GuiView>
    void
    view(Class<T> viewClass, Supplier<? extends T> factory)
    Supplies a view that requires custom construction or state.
    <T extends com.render.api.gui.GuiView>
    void
    view(String label, Class<T> viewClass, Supplier<? extends T> factory)
    Supplies a labeled view fixture.
    <T extends com.render.api.gui.GuiView>
    void
    viewState(String state, Class<T> viewClass, Supplier<? extends T> factory, Consumer<? super T> setup)
    Registers a named interaction state for a view.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RenderLibUiFixtures

      public RenderLibUiFixtures()
  • Method Details

    • view

      public <T extends com.render.api.gui.GuiView> void view(Class<T> viewClass, Supplier<? extends T> factory)
      Supplies a view that requires custom construction or state.
    • view

      public <T extends com.render.api.gui.GuiView> void view(String label, Class<T> viewClass, Supplier<? extends T> factory)
      Supplies a labeled view fixture.
    • viewState

      public <T extends com.render.api.gui.GuiView> void viewState(String state, Class<T> viewClass, Supplier<? extends T> factory, Consumer<? super T> setup)
      Registers a named interaction state for a view. Every state is captured independently by renderLibCaptureUi.
    • managedHud

      public void managedHud(String label, Supplier<com.render.api.ManagedHudLayout> factory)
      Registers a managed retained HUD preview. Use a string-literal label when possible so the Gradle plugin can list it in the in-client catalog without loading the provider class. The fixture is available through renderLibHudTest and renderLibCaptureHud.
    • managedHud

      public void managedHud(String label, Supplier<com.render.api.ManagedHudLayout> factory, BiPredicate<com.render.api.gui.ManagedHudLayoutRuntime, net.minecraft.client.input.KeyEvent> previewKeys)
      Registers a managed HUD preview with optional preview-only keyboard actions. This lets executable scenarios drive authored placement, content or styling changes with UiTestScenario.Builder.key(int, int) while state assertions stay side-effect-free. Ordinary gameplay HUDs remain passive. Existing catalog navigation keys take priority; return false for keys this fixture does not handle. The callback runs on the client thread.
      Parameters:
      label - fixture label
      factory - fresh owned layout factory
      previewKeys - preview-only handler receiving the live runtime and actual dispatched key event
    • immediateHud

      public void immediateHud(String label, com.render.api.HudRenderer renderer)
      Registers an immediate HUD preview. Use a string-literal label when possible so the Gradle plugin can list it in the in-client catalog without loading the provider class. The fixture is available through renderLibHudTest and renderLibCaptureHud.
    • screen

      public void screen(String label, Supplier<? extends net.minecraft.client.gui.screens.Screen> factory)
      Registers a generic Minecraft screen factory under screen:label. The client initializes the screen through its normal setScreen lifecycle. Use GUI coordinates for scenarios targeting native widgets.
    • scenario

      public void scenario(String label, String fixtureId, UiTestScenario scenario)
      Registers an executable test against an exact fixture ID (view class name, named-state, screen, or HUD ID). Scenario labels must be unique; a missing or unusable target fails execution rather than being skipped.