Skip to content

feat(entities): the happy ghast, sheep wool and glowing eyes, boats and minecarts, the warden and the firework rocket; HQ mode's water plane - #43

Merged
stellarfeline merged 6 commits into
mainfrom
feat/campaign-entities
Nov 10, 2026
Merged

stellarfeline merged 6 commits into
mainfrom
feat/campaign-entities

Conversation

@stellarfeline

Copy link
Copy Markdown
Owner

What this adds

Entities, each transcribed from its 1.21.11 client model class (the layer method named in the model's source) and posed as its setupAnim poses it at rest at tick 0:

  • the happy ghast, its ghastling (its own baby model, BABY_TRANSFORMER 0.2375) and its harness (the body slot's equipment asset on HappyGhastHarnessModel; the body squeezes to 0.9375 under it and the goggles are up unless it is ridden);
  • sheep wool: the dyed undercoat and the fleece (Color, Sheared, jeb_), and glowing eyes on spiders, cave spiders and endermen, through one new mechanism, model layers;
  • boats and chest boats of all nine woods, the bamboo raft and chest raft (paddles at rowing time 0), and the minecart with its six kinds and their display blocks (DisplayState/DisplayOffset or the kind's default; a chest through the chest model);
  • the warden with its bioluminescent layer;
  • the firework rocket (its FireworksItem, turned to the camera as FireworkEntityRenderer turns it);
  • the ravager, allay, parrot (five variants), squid, glow squid, dolphin, turtle (with its baby model), axolotl (five variants), camel (saddle, 0.45 baby) and wither. The bat is not drawn: its pose is a keyframe animation.

Banners as blocks (standing and wall, with patterns) were already drawn; they are unchanged.

entity_models.json gains layers, baby, parts_from, placement (living, boat, minecart, squid), block_light and numbered texture_variants.names. The lineup has 96 models.

HQ mode's water plane, ported from Chunky's water world: HqOptions::water_plane / --water-plane [SEA_LEVEL] draws an unbounded sea outside the loaded chunks, level with the loaded sea, so a level frame over an ocean shows sea to the horizon instead of the loaded sea's edge and a band of sky. Off by default, as in Chunky. What the game draws there and what is ported: docs/research/sea-horizon.md, with before and after renders.

How the models were read

The geometry and the rest poses are read from the official client jar's classes as javap (the local JDK) prints them, through Mojang's mappings, by a small interpreter that runs the layer method and setupAnim. It reproduces the bundled pig, sheep, iron golem, llama (without the chests the bundle leaves out) and ghast (its seeded tentacle lengths included) part for part, and the warden's rest pose agrees with a reading of its bytecode by hand. Nothing of the jar is shipped; textures are read at run time as before.

Breaking changes

PartPose has a scale, EntityLight a block_light, HqOptions a water_plane, and ModelDef, LayerDef, TextureVariants new fields: a struct literal of any of them no longer compiles. Params is 27 vec4s (432 bytes).

Checks

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo doc --no-deps with -Dwarnings, cargo publish --dry-run --workspace: clean (toolchain 1.97.1).
  • cargo test --workspace --no-fail-fast with the client jar and the Unifont: 155 passed, 0 failed, 0 skipped for the jar or a GPU (Apple M2 Pro, Metal).
  • New: the entity gallery in quick and HQ mode on the CPU (every case counted and drawn at its spot, layer and variant colours, a woolly sheep larger than a sheared one); the glow at midnight; the water plane's edge (largest row step 12.45 without, 2.51 with); the gallery and the ocean in the CPU/Metal HQ parity test (0.000% of pixels off); unit tests of the happy ghast's size, the boats' and minecart's heading, the sheep's layer colours and the shared parts. Each colour and area check was perturbed and seen to red.
  • scripts/build-ptx.sh: 21633 lines, 0 f64 instructions, no calls but panics.

🤖 Generated with Claude Code

stellarfeline and others added 6 commits November 10, 2026 15:57
…del layers and babies

Entity models gain layers drawn over the body (vanilla's RenderLayers: the sheep's
dyed undercoat and fleece, the eyes of spiders and endermen at full brightness, and
the body slot's equipment asset), a separate baby model, shared parts and a
placement per renderer. The happy ghast, its ghastling and its harness are
transcribed from HappyGhastModel and HappyGhastHarnessModel; the harness squeezes
the body to 0.9375 and the goggles sit up unless it is ridden.

The new geometry is read from the 1.21.11 client classes by running their layer
methods over javap's bytecode with Mojang's mappings; the same reader reproduces
the bundled pig, sheep, iron golem and ghast (seeded tentacle lengths included)
part for part.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
…ir blocks

The boat, chest boat, raft and chest raft models come from BoatModel and RaftModel,
paddles posed as AbstractBoatModel poses them at rowing time 0, and are placed as
AbstractBoatRenderer places them; the ten woods share each geometry through
parts_from. MinecartModel is placed as AbstractMinecartRenderer places a cart off a
rail, with the display block of each kind (DisplayState and DisplayOffset, else the
kind's default); a chest is drawn through the chest model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
… mobs

The warden with its bioluminescent layer (LivingEntityEmissiveLayer at alpha 1),
the firework rocket (its FireworksItem drawn as FireworkEntityRenderer draws it,
turned to the camera), and the ravager, allay, parrot (its five variants), squid,
glow squid, dolphin, turtle (with its baby model), axolotl (its five variants),
camel (with its saddle and its 0.45 baby) and wither. Each is posed as its model's
setupAnim poses it at rest, run over the client's bytecode with a fresh render
state; for the warden that agrees with a reading of the bytecode by hand, part for
part. The allay, glow squid and wither are lit at block light 15, as their
renderers' getBlockLightLevel lights them; the squids are placed as
SquidRenderer.setupRotations places them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
…the water plane

The entity gallery (`demo-world --entity-gallery`, one of every new body, layer and
variant) is drawn on the CPU in quick and HQ mode: every case is counted, none is a
fallback box, every case's spot changes against the empty platform, and the layers
and variants show their colours (red fleece and undercoat, white fleece, the red
harness, the green parrot, the gold axolotl); in quick mode a woolly sheep covers
more of the frame than a sheared one. At midnight the eyes, the glow squid and the
allay are bright where a dolphin is dark. The HQ water plane, which the previous
commit added to the kernel, its WGSL mirror and the CLI (`--water-plane`), is
checked on a generated ocean (`demo-world --ocean`): without it the loaded sea ends
in a jump of 12.45 in mean row luma at the grid's edge; with it the largest step
there is 2.51. The entity gallery and the ocean join the CPU/GPU HQ parity scenes
(both 0.000% of pixels off on Metal, Apple M2 Pro).

Perturbations, each restored from a scratch copy: no fleece reds the area check
(1018 against 1034 pixels); no undercoat reds the sheared sheep's colour; no eyes
or block light reds all four night spots; the harness read from no slot reds the
harness colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
The research note docs/research/sea-horizon.md records what the 1.21.11 client draws
where a sea meets the horizon (render-distance fog into the clear colour, no sea beyond
the loaded chunks), why HQ mode showed a band there, and what is ported from Chunky's
water plane and what departs from it, with the before and after renders
(docs/renders/ocean-hq-before.png, ocean-hq-water-plane.png). The limitations, scope,
architecture, command-line, renders and testing pages, the Chunky parity map, the
acknowledgements and the changelog's unreleased section describe the new models,
layers and placements; the lineup is drawn again with its 96 models
(docs/renders/entity-lineup.png) and the entity gallery is added
(docs/renders/entity-gallery.png). The ghastling moves in the gallery to where the
enderman no longer hides it, and the colour probes' type gets a name for clippy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
scripts/build-ptx.sh rewrites the lock on its first run since the kernel became 0.3.0;
the PTX it built with the water plane: 21633 lines, 0 f64 instructions, no calls but
panics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
@stellarfeline
stellarfeline merged commit 203990d into main Nov 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant