Skip to content

Blockhaven: villagers, witches, illagers and piglins on Java's models - #70

Merged
eklonofficial merged 4 commits into
eklonofficial:mainfrom
k1519035:blockhaven-mobs-villagers
Oct 3, 2026
Merged

eklonofficial merged 4 commits into
eklonofficial:mainfrom
k1519035:blockhaven-mobs-villagers

Conversation

@k1519035

@k1519035 k1519035 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

This is the second batch of mobs on Java 1.20.1's own models.

Builds on #69 (and #68). Until those merge, this PR also shows their commits; only the last commit is new.

Models (entity/javamodels.js, new)

Mob Java model Pack textures
Villagers (each profession) VillagerModel: 10-tall head and nose, robe, folded arms, hat with brim villager/villager + villager/type/plains + villager/profession/<profession>, layered as VillagerProfessionLayer draws them
Wandering trader VillagerModel wandering_trader
Zombie villager ZombieVillagerModel (zombie arms) zombie_villager/zombie_villager + its plains type
Witch WitchModel: own head, nose with mole, four-tier hat witch (64×128)
Pillager, vindicator, evoker IllagerModel: folded arms swap for free arms when used illager/pillager, vindicator, evoker
Piglin, zombified piglin PiglinModel: player body with outer layers, wide head, snout, tusks, ears piglin/piglin, piglin/zombified_piglin

Poses

  • Villagers: legs swing half as far as a player's, and the head follows the gaze.
  • Witch: the nose wobbles, and tilts while she holds something.
  • Illagers (IllagerModel.setupAnim):
    • Arms folded by default.
    • A vindicator hunting raises and brings down its axe (swingWeaponDown).
    • An evoker raises its arms while casting (SPELLCASTING, held 1.5 s after summoning fangs).
    • A pillager keeps its arms at its sides, holds its crossbow on a target and charges it in the last 1.25 s before it shoots.
    • Folded arms hide the held item, as IllagerRenderer does.
  • Piglins: ears flap with each step; zombified piglins use zombie arms.

Larger entity layers

  • Why: Java's textures run up to 64×128 (the witch), and 128×128 for some mobs coming next. Entity texture layers are now 128×128, with each texture in the top-left at its own size and texels measured against the layer.
  • Unchanged: existing painted skins and the player's custom skin are placed the same way.
  • Pack loading: readEntityTexture scales HD pack images to Java's size, and can lay an image over another (for villager layers).

Paint fix

  • A painted decoration can no longer spill outside its own face (the painter clips to the face being painted).
  • In the new layouts the villager's folded-hands bar was spilling onto the hat brim, which showed as two stray pixels beside the head.

Testing

  • tests/javamodels.test.mjs (new) checks:
    • Villager head, folded arms, brim and the order of its pack layers.
    • The witch's 64×128 texture and hat chain.
    • Illager arm folding, spellcasting and the axe swing.
    • Piglin ears and villager leg swing.
    • The painter's clip.
  • humanoid.test.mjs is updated for the 128-px layers.
  • node --test: 129 pass.
  • By eye (headless Edge):
    • All nine mobs with a pack built by tools/pack-from-jar.mjs from the official 1.20.1 jar (local only), and with their painted defaults.
    • Close-ups: the witch's hat, the farmer's straw hat, piglin ears and walk, the vindicator's axe swing, the evoker's spell pose, the pillager's crossbow.
    • Not-yet-converted mobs still render correctly on the larger layers.
    • In a world: all nine summoned with no errors, and a custom player skin still loads.

🤖 Generated with Claude Code

https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG

Copilot AI balanced review requested due to automatic review settings October 3, 2026 00:47
@vercel

vercel Bot commented Oct 3, 2026

Copy link
Copy Markdown

@k1519035 is attempting to deploy a commit to the Marin Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@k1519035
k1519035 force-pushed the blockhaven-mobs-villagers branch 2 times, most recently from d72dee1 to 84354c4 Compare October 3, 2026 01:35
k1519035 and others added 4 commits October 3, 2026 09:14
…inventory preview

The player is Java's PlayerModel (64x64 skin with its outer layer, slim arms) unwrapped
exactly as ModelPart.Cube, posed by a port of HumanoidModel.setupAnim. Players can load
their own Minecraft skin (64x64 or classic 64x32). Armor is Java's two-layer armor model,
using a pack's textures/models/armor when present. The inventory shows the live model
turned towards the pointer. Also fixes the elytra wind code throwing in the rain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
Its angles came out NaN until the first mouse move, so the preview stayed empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
…from your own game

Zombie, husk, drowned, skeleton, stray and wither skeleton use Java's ZombieModel,
DrownedModel and SkeletonModel meshes and texture layouts, posed by HumanoidModel.setupAnim
with Java's zombie and skeleton arm animations. A resource pack's entity textures replace
their painted skins, and the stray's clothes and the drowned's outer layer are drawn as in
Java. tools/pack-from-jar.mjs builds a resource pack of the official textures from the
player's own installed Minecraft (launcher, Modrinth, Prism or CurseForge), never committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
Villagers (with their biome and profession layers), wandering traders, zombie villagers,
witches, pillagers, vindicators, evokers, piglins and zombified piglins use Java's
VillagerModel, WitchModel, IllagerModel, PiglinModel and ZombieVillagerModel, posed by
their setupAnim (folded arms, spellcasting, crossbows, axe swings, flapping ears). Entity
texture layers grow to 128x128 so Java's taller textures (the witch's 64x128) fit, and a
model face's painted decoration no longer spills onto another face's pixels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
@eklonofficial
eklonofficial force-pushed the blockhaven-mobs-villagers branch from 84354c4 to 625f512 Compare October 3, 2026 14:16
@eklonofficial
eklonofficial merged commit af24331 into eklonofficial:main Oct 3, 2026
2 of 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.

3 participants