Skip to content

Move to 26.1#2

Open
weikengchen wants to merge 12 commits intoimaginefun:mainfrom
weikengchen:main
Open

Move to 26.1#2
weikengchen wants to merge 12 commits intoimaginefun:mainfrom
weikengchen:main

Conversation

@weikengchen
Copy link
Copy Markdown
Contributor

This PR is still in progress -- it works, but just needs some cleanup.

weikengchen and others added 12 commits March 29, 2026 12:16
- Update minecraft version, fabric API, iris, loom, and gradle wrapper
- Migrate to fabric-loom plugin (from fabric-loom-remap), drop mojang mappings
- Update dependency configurations (modImplementation -> implementation)
- Update networking API (playS2C -> clientboundPlay, playC2S -> serverboundPlay)
- Update access widener namespace (named -> official)
- Update GuiGraphics -> GuiGraphicsExtractor rendering API
- Replace entityCutoutNoCull with entityCutout

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update minecraft, fabric API, iris, loom, and gradle wrapper versions
- Migrate to fabric-loom plugin (from fabric-loom-remap), drop mojang mappings
- Update dependency configurations (modImplementation -> implementation)
- Update networking API (playS2C -> clientboundPlay, playC2S -> serverboundPlay)
- Update access widener namespace (named -> official)
- Update GuiGraphics -> GuiGraphicsExtractor rendering API
- Replace entityCutoutNoCull with entityCutout
- Retarget SkullBlockRendererMixin to submit() (submitSkull signature changed)
- Update PlayerHeadRenderer to use pre-applied transformations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In 26.1, submitSkull lost its Direction and yaw parameters. The transforms
that were inside submitSkull moved to individual callers differently:
- Caller 1 (block skulls): pre-applies state.transformation
- Callers 2/3/4 (worn heads, items): changed or removed pre-transforms

Fix by injecting into each caller separately:
- submit(): extract direction/yaw from state.transformation matrix,
  restore the original PlayerHeadRenderer transform logic
- submitSkull(): hardcode direction=null, yaw=180 (matching 1.21.11
  callers 2/3/4), only fires for non-block-skull callers

Also restore PlayerHeadRenderer to its original 1.21.11 interface with
Direction and yaw parameters, and keep mod_version at 0.0.7.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Minecraft 26.1 requires Java 25. Also update game-versions in publish
workflow and switch to temurin distribution (microsoft doesn't ship JDK 25).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses rate limiting when "video clip" player heads cycle through
many unique textures rapidly. Caches all downloaded skin textures in
a single binary file (imaginefunutils/head_textures.dat) that persists
across game sessions.

How it works:
- Mixin into SkinTextureDownloader.downloadSkin() at HEAD and RETURN
- HEAD: before Minecraft checks its file cache, pre-populate the file
  from our cache if the hash is found (avoids HTTP download entirely)
- RETURN: after a successful load, persist the file bytes to our cache
  for future sessions

No external dependencies — uses a simple append-friendly binary format
with an in-memory ConcurrentHashMap for fast lookups. Writes are async
via virtual threads to avoid blocking the render/IO thread.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces the previous in-memory HashMap cache with an H2 embedded
database (pure Java, no native dependencies). Textures are stored
on disk and loaded on-demand — only queried rows enter memory.

New features:
- Location tracking: when a custom head renders at a block position,
  the texture hash is associated with that chunk coordinate in the DB
- Preloading: on each client tick, if the player moved to a new chunk,
  query the DB for all textures in nearby chunks (radius 4) and
  pre-populate Minecraft's skin file cache before they're requested
- Shutdown hook closes the DB connection cleanly

Schema:
  textures(hash PK, png_data BLOB)
  texture_locations(hash, world, chunk_x, chunk_z) with spatial index

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update build to Java 25 (Minecraft 26.1 requirement)
- Remove texture cache feature (TextureCache, TexturePreloader, SkinTextureDownloaderMixin) — deferred to separate mod
- Replace TitleScreenMixin with ScreenEvents.AFTER_INIT for ModMenu compatibility
- Rewrite SkullBlockRendererMixin for 26.1 API changes:
  - Route A: extract direction/yaw from state.transformation matrix (26.1 removed direction/yaw params from submitSkull), negate yaw to match 1.21.11 sign convention
  - Route B: detect CustomHeadLayer caller and apply scale(1,-1,-1) + translate(-0.5,0,-0.5) to restore 1.21.11 poseStack state (26.1 changed CustomHeadLayer's scale signs and removed translate)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The org.gradle.java.home was a local macOS path that breaks CI. The
build already sets release=25 and VERSION_25 in build.gradle which is
sufficient — the CI runner provides Java 25 via setup-java.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Temurin doesn't have Java 25 builds yet. Microsoft OpenJDK does.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the ScreenEvents.AFTER_INIT handler from ImagineFunUtilsClient
into gui/TitleScreenHandler for clarity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual matrix extraction (Matrix3f scale-undoing, atan2 on
matrix elements) with Transformation.translation() and leftRotation()
accessors. The Transformation class already decomposes T*R*S cleanly,
so we can read direction from the translation vector and yaw from the
rotation quaternion directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@weikengchen weikengchen marked this pull request as ready for review March 29, 2026 19:20
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