Skip to content
Back to skills

Verify In Game

ASecurity

Run the VoidHeart mod in a real Minecraft client through Fabric client game tests, look at the screenshots, and report what was actually observed. Use after any change to gameplay, rendering, input, screens, block behavior, redstone, saved state or recipes, before calling the work done, and whenever the user reports an in-game bug such as flicker, z-fighting, a wrong look or something that does nothing. Compiling and passing unit tests is not enough for these changes, so use this even if the ...

  • 2 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 27, 2026
testingpythongojavabashtestinggitperformance

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 27, 2026

npx -y skills add VoxelIndustry/VoidHeart --skill verify-in-game --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Verify In Game?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Verify In Game
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/voxelindustry-verify-in-game/badge)](https://www.skillsdirectory.com/skills/voxelindustry-verify-in-game)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: verify-in-game
description: Run the VoidHeart mod in a real Minecraft client through Fabric client game tests, look at the screenshots, and report what was actually observed. Use after any change to gameplay, rendering, input, screens, block behavior, redstone, saved state or recipes, before calling the work done, and whenever the user reports an in-game bug such as flicker, z-fighting, a wrong look or something that does nothing. Compiling and passing unit tests is not enough for these changes, so use this even if the user doesn't ask for testing.
---

# Verify in game

Code in this mod regularly compiles and passes unit tests, then fails in play. Client game tests start a real client and world, so Claude can check much of this itself instead of leaving every bug for the user's review. The goal is to catch what can be caught here, and to say clearly what can't.

Don't ask the user to accept the EULA or launch anything: `configureTests` in `build.gradle` already sets `eula = true`, and the test opens its own game window.

## 1. Decide what must be proven

List the behaviors the change affects, each as something a test could observe. For example: "the forge won't start with its output slot full", or "the veil stays steady while the camera moves".

For a reported bug, reproduce it first when possible. A test that fails before the fix and passes after it is the strongest evidence you can give.

## 2. Add or extend a client game test

Tests live in `src/gametest/java/net/voxelindustry/voidheart/gametest/`. Extend the feature's existing test, or add a class and **list it in `src/gametest/resources/fabric.mod.json`**, because an unlisted test silently never runs. Keep tests when they're useful, so coverage grows with each feature.

Good templates:

| Need | Read |
|---|---|
| Assertions on server and client state, third-person screenshots | `ShoulderEyeClientTest` |
| Real clicks and aiming at a point | `OculusControlsClientTest` (`aimFrom`, `context.getInput()`) |
| Generated terrain and frame cost numbers | `OculusPerformanceClientTest` |
| Screenshots from several angles and zooms | `OculusTableClientTest` |

The usual setup:

```java
try (var world = context.worldBuilder().create())
{
    var server = world.getServer();
    world.getConnection().waitForChunksRender();
    server.runCommand("time set noon");
    server.runCommand("gamerule advance_time false");
    server.runCommand("gamemode creative @a");
    context.waitTicks(20);
    context.runOnClient(minecraft -> minecraft.options.setCameraType(CameraType.FIRST_PERSON));
    // F1 hides the HUD, hand, chat and toasts, press it again before the test ends
    context.getInput().pressKey(InputConstants.KEY_F1);
    // Build the scene with commands, aim with tp, then assert and capture
}
```

These details have spoiled scenes before:

- **All tests share one client.** Settings like the camera type carry over from earlier tests, so a scene can look right alone and wrong in the full suite. Set what the scene needs and restore what you change.
- **Landing ends creative flight.** Set `getAbilities().flying` and call `onUpdateAbilities()` after each `tp` into the air, or the player falls out of frame. Spectator mode avoids this when the test doesn't need clicks.
- **`server.runCommand` runs as the server, not the player.** Use `execute as @a run ...` for commands that need a player.
- **A mob without AI ignores pushes.** `setNoAi(true)` stops it travelling, so speed set on it never moves it. To test a pull or a knockback, keep its AI and set its `MOVEMENT_SPEED` attribute to 0 so it can't walk off, as the spear scene in `VoidBlightClientTest` does.
- **`tick step` moves the server ahead of the client.** While frozen and stepped, the client's game time can trail the server's by well over a hundred ticks, so anything the client animates from its own clock is captured early. After stepping, wait with `context.waitFor(minecraft -> minecraft.level.getGameTime() >= target, ...)`, as `HeartRitesClientTest.stepTo` does.
- **Ticks are faster than real time.** Work off the game thread, such as reading saved chunks, generating far terrain or Jade's tooltip data, gets about a tenth of the real time per tick it would at real speed. Wait for its result with `context.waitFor(...)` rather than a fixed `waitTicks`. In mod code, time animations with `Util.getNanos()` or `Util.getMillis()`, which follow the test clock, never `System.nanoTime()`.

Use real input where the bug could be in the input path. Setting state directly would have missed the travel map's ignored clicks.

### Assert before you look

Throw `AssertionError` for anything checkable through `server.computeOnServer` or `context.computeOnClient`: inventory contents, block state, saved settings after a merge or reload, redstone response. Assertions don't depend on interpreting an image, and they keep guarding the behavior later.

### Choose captures that can show the failure

- **Layered, translucent or additive effects:** a single frame can't show flicker. Freeze the game so animation holds still, then sweep the camera in small steps close to the effect. Keep `sweep` in the screenshot names, since `framediff.py` looks for it.

  ```java
  server.runCommand("tick freeze");
  for (int step = 0; step < 8; step++)
  {
      // aimFrom as in ShatterForgeClientTest, from a few blocks away
      aimFrom(context, server, x + step * 0.05, y, z + step * 0.08, targetX, targetY, targetZ, 2);
      context.takeScreenshot("forge-beam-sweep-" + step);
  }
  server.runCommand("tick unfreeze");
  ```

  This does catch real flicker. With the render type from before fix `27f73ad`, ley line cores broke into bands and gaps that changed between frames. With the fix they stayed solid.

- **Coplanar surfaces:** capture a grazing angle as well as a straight-on one, since z-fighting tends to be worst there.
- **Camera-facing geometry:** capture from two opposite sides.
- **Animations:** capture named moments such as start, middle and end, using `waitTicks` or a state wait like `waitForBeam` in `ShoulderEyeClientTest`.
- **Items:** capture them in hand and in the inventory as well as the placed block.
- **Performance risks:** log frame cost at the largest realistic size, as `OculusPerformanceClientTest` does.

## 3. Run it

Send the output to a file in the scratchpad, since the log is long:

```bash
./gradlew runClientGameTest --console=plain > "<scratchpad>/gametest.log" 2>&1
```

The tests run on a virtual clock (see `FastGameTests`): each tick is one frame and exactly 50 ms of game time, about ten times faster than real time. The full suite takes about 4 minutes and one test class usually under a minute, Gradle included. Run the full suite in the background.

- **While iterating,** run the tests for what you changed: `-PgameTest=ShatterForge`, or several with `-PgameTest=Omen,Vigil`.
- **Before reporting,** run the full suite if the change touches anything shared, such as render types, registration, mixins, curses or the void dimension, so regressions and leftover client settings show up. A change confined to one feature needs only that feature's tests. Always run the full suite before opening a PR, and say in the report which runs you did.
- **At real speed,** add `-PgameTestRealtime`, on the tests involved only, since the full suite takes over 30 minutes that way. Use it when judging a scene that depends on work off the game thread: shots framed off whatever loaded first, such as the nearest mobs of a freshly opened dungeon, can differ from real speed. A test that passes at real speed and fails fast is waiting a fixed number of ticks for real-time work, so make it wait for the condition instead.

Don't edit `fabric.mod.json` to narrow a run.

Other sessions may share this checkout and its `build/` folder, and their runs can wipe your screenshots. Check with `git worktree list` and your session list, and do repeated runs and temporary source changes in your own worktree, which has its own `build/`.

## 4. Check the results

1. **Log:** search for `AssertionError`, `Exception` and `BUILD`.
2. **Screenshots:** read the PNGs with the Read tool, from `build/run/clientGameTest/screenshots/`. They are named `NNNN_<name>.png` at 854x480, and the number shifts when tests are added, so find them by name. If a detail is too small to judge at that size, move the camera closer, capture with `TestScreenshotOptions.of(name).withSize(width, height)`, or enlarge the region with `crop.lua` from the `aseprite-texture` skill.
3. **Sweeps:** look at several frames, then measure them. Pass one or more folders to get the count of strongly changed pixels per frame pair:

   ```bash
   python .claude/skills/verify-in-game/scripts/framediff.py "<scratchpad>/before" "<scratchpad>/after"
   ```

   Moving the camera always changes pixels, so the signal is uneven counts, not high ones. The flickering ley lines gave 7,319 to 12,453 and the fixed ones 6,411 to 6,904. Counts depend on the scene, so compare within a scene, ideally before and after a change, and treat the number as a pointer to which frames to look at. Detailed textures close to the camera dominate the counts: a forge sweep with monoliths in the foreground gave 56,067 to 62,716 at 1280x720, which says little. For a useful measure, frame the effect against open sky or ground. Run the script on sweep frames only.
4. **Compare runs:** `clearRunDirectory = true` wipes that folder on each run. Before re-running, copy any screenshots you want as a "before" into the scratchpad.

Actually look at each relevant image and describe what you see. Don't conclude from the fact that the test passed: a screenshot of an empty scene passes too. If the scene is wrong, such as the camera facing away, fix the test and run it again before judging the feature.

## 5. Report honestly

Use these groups in the final message:

- **Asserted:** behaviors a test checked, and that passed or failed.
- **Seen:** what the screenshots show, including the angles and moments covered.
- **Not verified:** what wasn't run or can't be judged here, plus any problems you suspect.
- **For your review:** a short checklist of what still needs a person, each item with what to do and what to expect. Include motion feel, smoothness, real frame rate and Iris shaders when they apply.

Don't describe something as working if it wasn't observed. A static screenshot supports "looks right from this angle" and nothing wider. Whether an effect has the right feel is the user's call, so show the evidence and ask rather than declaring it good.

CI runs `./gradlew build`, which doesn't include `runClientGameTest`, and it won't: these tests aren't practical on headless runners and would be too expensive there. Green CI says nothing about them, so always run them locally, and don't propose adding them to CI.

Files in this skill

  • SKILL.md10.6 KB
  • scripts/framediff.py1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.