Repository navigation
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
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 itssetupAnimposes it at rest at tick 0:BABY_TRANSFORMER0.2375) and its harness (the body slot's equipment asset onHappyGhastHarnessModel; the body squeezes to 0.9375 under it and the goggles are up unless it is ridden);Color,Sheared,jeb_), and glowing eyes on spiders, cave spiders and endermen, through one new mechanism, model layers;DisplayState/DisplayOffsetor the kind's default; a chest through the chest model);FireworksItem, turned to the camera asFireworkEntityRendererturns it);Banners as blocks (standing and wall, with patterns) were already drawn; they are unchanged.
entity_models.jsongainslayers,baby,parts_from,placement(living,boat,minecart,squid),block_lightand numberedtexture_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 andsetupAnim. 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
PartPosehas ascale,EntityLightablock_light,HqOptionsawater_plane, andModelDef,LayerDef,TextureVariantsnew fields: a struct literal of any of them no longer compiles.Paramsis 27 vec4s (432 bytes).Checks
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo doc --no-depswith-Dwarnings,cargo publish --dry-run --workspace: clean (toolchain 1.97.1).cargo test --workspace --no-fail-fastwith the client jar and the Unifont: 155 passed, 0 failed, 0 skipped for the jar or a GPU (Apple M2 Pro, Metal).scripts/build-ptx.sh: 21633 lines, 0 f64 instructions, no calls but panics.🤖 Generated with Claude Code