Render conventions and known failure modes for the VoidHeart mod on Minecraft 26.3. Use before writing or changing anything that draws, including block entity and entity renderers, particles, previews, holograms, overlays, item models, GeckoLib models and GUI screens, even for a small tweak. Also use whenever the user reports flicker, z-fighting, flashing, mirrored or misplaced visuals, wrong transparency, ignored clicks in a screen, or a render slowing the game.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Voidheart Rendering?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/voxelindustry-voidheart-rendering)
---
name: voidheart-rendering
description: Render conventions and known failure modes for the VoidHeart mod on Minecraft 26.3. Use before writing or changing anything that draws, including block entity and entity renderers, particles, previews, holograms, overlays, item models, GeckoLib models and GUI screens, even for a small tweak. Also use whenever the user reports flicker, z-fighting, flashing, mirrored or misplaced visuals, wrong transparency, ignored clicks in a screen, or a render slowing the game.
---
# VoidHeart rendering
Most VoidHeart fix commits since the 26.3 port are rendering bugs that compiled and passed unit tests. This skill is for choosing correctly before coding. It doesn't prove anything works, so finish with the `verify-in-game` skill.
## Before writing code
Read the closest existing renderer below, then state three things in a few lines:
1. **Render type and why.** What it does for depth writes, blending and culling, and what happens where its geometry overlaps itself.
2. **Layering.** What else can occupy the same surface, and how they stay apart.
3. **Per-frame cost.** How many quads or GUI elements are rebuilt each frame at the worst realistic size, and what is cached.
These three decisions caused the flicker, z-fighting and slowdowns listed below, and they are much cheaper to settle here than after an in-game review.
Keep sizes, colors, alphas and timings in named constants at the top of the class, as `TravelMapScreen` does with `MOTE_ALPHA`. Feedback like "too dull" or "too visible" then only needs a value change.
## Choosing how to draw
| Need | Use | Read first |
|---|---|---|
| Additive glow that overlaps itself: ribbons, waypoints, lines | `VoidHeartRenderTypes.GLOW` | `AnchorWaypointRender`, `LeyDebugRender` |
| Colored quads that must keep their hue on bright backgrounds | `VoidHeartRenderTypes.MARKER` | `OculusMarkers`, `OculusLeyLayer` |
| Textured additive glow in the world that must not wash out to white by day | `VoidHeartRenderTypes.radiant` layers over a dark `tint` sheath of the same shape, plus `radiantThrough` for what shows behind walls | `LeyDiviningRender` |
| Textured beams and veils | `RenderTypes.beaconBeam(texture, true)` | `VoidBeamRender` |
| Ghost or preview blocks | `RenderTypes.translucentMovingBlock()` | `ForgePreviewRender`, `PillarPlacementRender` |
| Geometry that ignores world light | `RenderTypes.entityTranslucentEmissive(...)` | `GeometryParticle`, `BarrierMosaicRender` |
| Glowing parts of a model | `RenderTypes.eyes(...)` | `BeholderRender`, `ShoulderEyeRender` |
| Large, mostly static geometry | Cached GPU meshes built off-thread | `client/render/oculus/OculusRenderer` |
| Flesh, teeth or eyes on a screen or the HUD | Two-unit blocks in `MawFlesh`'s palette and dither, outlined dark, never smooth gradients | `MawFlesh`, `HymnMesh` |
| Expensive, unchanging GUI content | Bake once into a texture and blit it | `TravelMapScreen` |
| A block item that shows its GeckoLib block model | Special item model and `GeoItemRenderer` | `RavenousCollectorItemRender` |
| An item that is 3D in the world but flat in screens | Item model `select` on `display_context` with only `gui` flat, as `ModelsProvider.generateFlask` does. The `FIXED` context then draws the 3D model in block entity renderers | `PlacedFlasksRender`, `AthanorRender` |
| A vanilla item drawn with a mod model in one renderer only | Copy the stack and set `DataComponents.ITEM_MODEL` to a mod `items/` definition, so vanilla's own model stays untouched | `FlaskModels.forDisplay` |
| Particles in a research scene | A `SceneEmitter` on the script with `scene.particles` or `scene.puff`, ready-made ones in `SceneFx`. Never the particle engine: a scene is worked out from its tick alone, so each particle's place comes from its number | `SceneFx`, `SceneParticlesRender` |
| A rod-shaped item with its own model in the hand | A hand-written upright model with `display` transforms, flat only in `gui` through the same `select`. Vanilla's handheld rotation `[0, -90, 55]` suits a sprite drawn corner to corner, so an upright model needs 45 less on Z to point the same way; a negative Z from there tips its top up toward the arm. Changing the rotation moves the grip, so re-derive the translation and check idle and first person in screenshots | `klein_star_staff.json`, `MixinHumanoidModelKleinStaff` |
| A pass over the whole finished frame, with values that change every frame | A `post_effect` chain run from a mixin at the tail of `GameRenderer.applyPostEffects`, since no Fabric event fires that late. Vanilla bakes a pass's uniforms once, so swap its uniform buffer through accessors each frame. Skipped under Iris | `KleinDim`, `klein_dim.fsh` |
| A block item drawn like its block entity renderer | `SpecialModelRenderer` with a record argument, one new draw state per submit since geometry is built later in the frame. Slots cache what they first drew, so it stays still | `MalignantTormenterItemRender` |
Block entity renderers read the world in `extractRenderState` and only draw from that state when submitting. `RavenousRelayRender` is a short example. World-level drawing goes through `LevelRenderEvents`, registered in `VoidHeartClient`.
If nothing in the table fits, copy the closest vanilla pipeline as `VoidHeartRenderTypes` does, and document in a comment why it differs.
## Known failure modes
| Symptom | Cause | Fix | Commit |
|---|---|---|---|
| Glow flickers as the camera moves | Vanilla `lightning` writes depth and its quads re-sort each frame, so overlaps hide each other in a camera-dependent order | Use `GLOW`: no depth writes, order-independent additive blending | `27f73ad` |
| Geometry jitters far from the world origin | Camera-relative position subtracted in float | Subtract in double, then cast (`LeyDebugRender.relative`) | `27f73ad` |
| Z-fighting on a double-sided quad | The particle pipeline doesn't cull back faces, so a reversed copy fights the original | Draw the face once | `f839dd1` |
| Z-fighting between layers | Coplanar surfaces, such as a hologram on its table or border | Separate them by a small offset, or stop drawing the hidden one | `b0b216a` |
| Faces flash from some angles | An effect applied to faces where it can't hold steady, like scanlines on block tops | Limit the effect to the faces where it works | `b0b216a` |
| Particle or effect blinks periodically | Respawning it rerolls its look | Keep one instance alive and update it | `f839dd1` |
| Text or overlays mirrored, or turned away | Since 26.1 the camera orientation faces the other way than 1.20's entity dispatcher rotation | Rotate 180° around Y for camera-facing geometry, around X for text and sprites | `eabe2d4` |
| A placed block renders translucent | 26.3 picks the chunk layer from texture transparency | Make the block texture opaque and apply ghost alpha when drawing | `6eaa6fe` |
| GeckoLib block item sits too high | GeckoLib centers item models, but block models stand on their bottom | Override `adjustRenderPose` | `07440ce` |
| Screen slows the game | About ten thousand GUI elements rebuilt each frame | Bake into a texture | `90eff0f` |
| Clicks in a screen are ignored | 26.3 renumbered mouse buttons, so left is no longer `0` | Compare with `InputConstants.MOUSE_BUTTON_LEFT`, never a literal | `6137f55` |
| An entity kept out of the world draws nothing or throws "Tried to access entity ID before ID assignment" | Its render state reads an id only joining a world assigns | Call `setId` on it before `createRenderState` (`TormenterHeads`) | |
| No cracks while a block entity is being mined | The game passes `breakProgress` as null to anything with `shouldRenderOffScreen()` true | Look it up in `ClientLevel.destructionProgress()` while extracting (`MalignantTormenterRender.crumbling`) | |
| Pinholes showing the sky through a model split across several blocks | `cullface` on a face between two pieces of it, which a neighbour's simplified shape hides though the neighbour's model doesn't cover it | Only put `cullface` on faces of the structure's outside (`armillary_base_corner.json`) | |
| A scene's particle near the ground shows as a sliver | Its square faces a camera looking down, so its near half dips under the floor and fails the depth test | Start it a third of a block up, as the fissure scene's ink does | |
| A mark drawn flat on the ground breaks into pieces | It passes under the model of the block that casts it, or lies at one height across blocks of other heights. Ribbons whose edges are worked out per segment also notch on curves | Keep it clear of the model's footprint, fade it over blocks whose ground differs, and share each point's edges between its two segments (`LeySeams.swirl`) | |
| A mob's flat plates or touching boxes z-fight, or show their blank back face as if inside out | Vanilla's entity cutout culls nothing since 26.3, so both faces of a flat box share a plane, and so do two boxes ending on one plane | Give a flat box one face (`ModelBoxes.FRONT`), and grow or shrink one of two meeting boxes by `ModelBoxes.GAP`. `MobModelGeometryTest` checks every mob model | |
| Hand-built geometry looks inside-out, its far inner faces showing through | Faces listed clockwise seen from outside, so a culling render type such as `entitySolid` drops the near ones. Right normals don't help | List each face's corners counter-clockwise seen from outside, as `ArmillaryRender.box` does (`ArmillaryRender.linkQuad`) | |
| Model parts drawn apart from their entity shift or twitch | Renderers share parts between entities and move them when flushing | Copy the cubes and their poses once, then compile the cubes yourself (`TormenterHeads`) | |
| Something worn on the body pokes through the face when the head turns | Body geometry above y 0 runs inside the head, which turns apart from the body | Stop parts hung on `body` at its top face, y 0 (`ApparatusWornRender`) | |
| An effect timed from a server game time starts late, or not at all in a capture | The client's game time can trail the server's by a few ticks, so `now - serverTick` is still negative when the synced change arrives | Time what follows a synced change from when the client sees it change (`PunctureRender` snaps) | |
| Water or other translucent blocks vanish behind an entity hidden from the camera | Returning false from `isBodyVisible` makes `LivingEntityRenderer` draw a 15% ghost that writes depth, so water drawn later is culled behind it | Skip submitting the body yourself when it should be hidden (`ShoulderEyeRender.submit`) | |
| A mob darkened by its model tint flashes bright red when hurt | The hurt overlay is mixed in after the tint, so it isn't darkened with the rest | Clear `hasRedOverlay` on the render state while it is dark (`MixinLivingEntityRendererSwallow`) | |
| Half the shapes of a hand-built GUI element are missing, on some screen edges or sides only | The GUI pipelines cull back faces, so quads mirrored into place (bottom or left edge, flipped frames) wind the wrong way | Emit every quad counter-clockwise on screen, or check its signed area and reverse it (`HymnMesh.rect`) | |
| A worn model or mob reads as plastic | Flat colour fills on its skin, lit evenly by the entity shader | Speckle every face a shade up or down, light its top edge and darken its bottom one, as `automaton.png` does (see `aseprite-texture`) | |
| A rounded mass of overlapping boxes shows its glow layer twice and fights at shared planes | Every box's faces are drawn, coplanar or buried ones included, and the glow layer draws on all of them | Fill whole pixels and draw only the faces where filled meets empty, merged into rectangles (`HeartShape`, checked in `HeartShapeTest`) | |
| Pale speckles on a glowing part turn grey where it is dimmed or shaded | Darkening a light, low-saturation texel through vertex colour or face shading greys it | Keep the solid texture saturated at a fixed shade, and lay the brightening over it as an `eyes` layer on the same faces whose alpha carries the glow (`VoidHeartRender` veins) | |
Run `git show <commit>` when you need the full change. If a fix teaches something new, add a row here in the same change, so the next renderer benefits from it.
## Iris
`CraftingVoidRender` has a separate path for Iris (`IrisCompat.useIris()`), so changes there need both paths updated. Treat shader-pack behavior as unverified unless it was actually run with Iris, and say so when reporting.
## After coding
Use `verify-in-game`. A single screenshot can't show flicker, so ask for a camera sweep on anything translucent, additive or layered. Also view anything camera-facing from at least two sides.