Class RenderLibUiFixtures
java.lang.Object
com.render.testkit.RenderLibUiFixtures
Registry populated by
RenderLibUiFixtureProvider implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidimmediateHud(String label, com.render.api.HudRenderer renderer) Registers an immediate HUD preview.voidmanagedHud(String label, Supplier<com.render.api.ManagedHudLayout> factory) Registers a managed retained HUD preview.voidmanagedHud(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.voidscenario(String label, String fixtureId, UiTestScenario scenario) Registers an executable test against an exact fixture ID (view class name, named-state, screen, or HUD ID).voidRegisters a generic Minecraft screen factory underscreen:label.<T extends com.render.api.gui.GuiView>
voidSupplies a view that requires custom construction or state.<T extends com.render.api.gui.GuiView>
voidSupplies a labeled view fixture.<T extends com.render.api.gui.GuiView>
voidviewState(String state, Class<T> viewClass, Supplier<? extends T> factory, Consumer<? super T> setup) Registers a named interaction state for a view.
-
Constructor Details
-
RenderLibUiFixtures
public RenderLibUiFixtures()
-
-
Method Details
-
view
-
view
-
viewState
-
managedHud
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 throughrenderLibHudTestandrenderLibCaptureHud. -
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 withUiTestScenario.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 labelfactory- fresh owned layout factorypreviewKeys- preview-only handler receiving the live runtime and actual dispatched key event
-
immediateHud
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 throughrenderLibHudTestandrenderLibCaptureHud. -
screen
public void screen(String label, Supplier<? extends net.minecraft.client.gui.screens.Screen> factory) Registers a generic Minecraft screen factory underscreen:label. The client initializes the screen through its normalsetScreenlifecycle. Use GUI coordinates for scenarios targeting native widgets. -
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.
-