Blockhaven: block models in Java's element format, so pack textures map like Java - #67
Merged
eklonofficial merged 5 commits intoOct 3, 2026
Merged
Conversation
|
@k1519035 is attempting to deploy a commit to the Marin Team on Vercel. A member of the Team first needs to authorize it. |
…ap like Java Torches, wall torches, cactus, lanterns, end rods, bamboo, campfires, glass panes, iron bars, ladders, doors, trapdoors, anvils, end portal frames, fire and stems now use Java 1.20.1's block model geometry and per-face UVs (js/data/models.js), drawn by a new element emitter in the mesher. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
A replacement string treats "$&" and similar as patterns; the minified worker now has a variable named $ masked with $&1, which the injection replaced with the matched URL and broke the packed worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
…s line up Positions were stored to the half pixel, so each corner of a rotated element (wall torch, lantern handles, fire, stems) snapped on its own and the torch's sides and cap no longer met. The same 16-bit fields now hold 1/8 px (the world's top is about 33,000 of 65,535), and Java's 0.001/0.01 px offsets on bar caps and fire sides become one 1/8 px step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG
k1519035
force-pushed
the
blockhaven-block-models
branch
from
October 3, 2026 01:26
2c9a155 to
e7c5fea
Compare
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.
Block shapes whose texture is a sprite sheet rather than one picture per face were drawn with the wrong parts of their textures. With the bundled pack, lanterns and end rods were nearly invisible, bamboo was a wide box, and cacti, torches and the rest only approximated Java. These blocks now use Java 1.20.1's own block model geometry and per-face UVs. Any Java resource pack's textures land exactly where they do in Java.
How
js/data/models.js(new): Java's block-model element format in a compact form.shade: false.model()in the mesher: draws these elements.javablocks.js.Blocks changed
template_torch: the texture on two crossed 2-px slabs, flame UV on toptemplate_torch_wall, leaning 22.5°glass_pane_topattached_stem)campfire_log,campfire_log_litandglass_pane_top.Not in this PR: block entities that use entity textures (chests, beds, skulls) come with the entity-texture work later.
Build fix
tools/build.mjsinjects the bundled worker into the packed page withString.replace. A replacement string treats$&and similar sequences as patterns. The minified worker now has a variable named$masked with$&1, which the build replaced with the matched URL, so the packed worker failed to load. The injections now use replacer functions, so no bundled code can trip this again.Testing
tests/models.test.mjs(new) checks:node --test: 120 pass.npm run build,surface-checkandbrowser-checkpass locally, using Edge.🤖 Generated with Claude Code
https://claude.ai/code/session_01R5yMmGQVzFD1XVDyZe42KG