feat(tiling): exempt Epic 13 item textures by vanilla stem (#175) - #233
Merged
Merged
Conversation
There was a problem hiding this comment.
Blockers
tools/tiling-rules.json:L53:*_log.svg→y-onlymoves the shippedtextures/block/oak_log.svgfrom an X+Y audit to Y only. Onmainit is audited on both axes and passes, and #88 requires oak_log's toroidal tiling to be verified. Logs placed side by side show the X seam, so this change removes coverage from the blocking audit and gets nothing back. Drop the rule, or keep logstoroidaland usey-onlyonly for textures that really cannot tile on X.tools/tiling-rules.json:L58:*_stem.svg→y-onlyalso matches the vanillapumpkin_stem,melon_stem,attached_pumpkin_stemandattached_melon_stem(crop cutouts, which should beexempt) andmushroom_stem(a full cube, which should betoroidal). Narrow the rule tocrimson_stem.svg,warped_stem.svgandstripped_*_stem.svg, and add these names as negative fixtures intools/test/tiling-rules.test.mjs.tools/tiling-rules.json:L68,L73: vanilla has nobasaltorpolished_basalttexture. The textures arebasalt_sideandbasalt_top, andpolished_basalt_sideandpolished_basalt_top. As things stand,basalt_side.svgresolves tox-onlythrough*_side.svg, the opposite axis to the one this rule is for. Target the_sidenames with a rule that comes before*_side.svg, or remove both rules.tools/tiling-rules.json:L83,L103,L118:flower_*.svg,*_spores.svgand*_wall_fan.svgmatch no vanilla block texture (onlyflower_pot, which is a model and not a cross-quad; wall fans reuse the*_coral_fantexture). The fixtures that "validate" them are made-up names:tools/test/tiling-rules.test.mjs:L397flower_tulip,L409spore_blossom_spores,L410crimson_spores, andL377golden_rail(vanilla usespowered_rail). Remove any pattern that has no real texture target, and use real texture names in the fixtures.tools/test/tiling-rules.test.mjs:L328: thePREPOPULATED_PATTERNSallowlist exempts 14 patterns from the unreachable-pattern guard. That guard exists to catch dead rules (#199), and the allowlist is how the dead patterns above get through CI. Remove the allowlist. Add a pattern in the same PR as the first master it matches, the waygrass.svgalready does.tools/tiling-rules.json:L130-L148: the Epic 13itemIdsdo not match what #175–#177 ship.steakis not a texture id (it iscooked_beef, already listed).porkchopis the raw item, but #177 shipscooked_porkchop.crossbowhas no texture: the vanilla ids arecrossbow_standby,crossbow_pulling_0..2,crossbow_arrowandcrossbow_firework.bow_pulling_0..2are missing. Also missing: the stone, golden and netherite tool variants, all shovels and hoes,golden_carrotandbaked_potato. As written, these masters would fall through totoroidaland fail the blocking audit when they land. Use the real texture stems, or exempt item textures structurally instead of by enumerating them.tools/test-tiling.mjs:L125:nameWithExtappends.svgtobase, sooak_log.pngbecomesoak_log.png.svgand resolves totoroidal, whileoak_logresolves toy-only. TheendsWith(".svg")check is also case-sensitive, but thestemregex is not. Useconst nameWithExt = stem + ".svg";. After that,matchGlob(stem, ...)atL164is dead code, because every pattern ends in.svg, so remove it.- PR body: it does not use
.github/pull_request_template.md(checklist missing) and links no issue.CONTRIBUTING.md§4 requires the checklist. Restore the template and reference the tasks this work serves (#88, #175–#177).
Nits
tools/test-tiling.mjs:L44-L72: the built-in fallback rules duplicatetiling-rules.json. Update them together with the JSON fixes above so the two do not diverge.tools/test/tiling-rules.test.mjs:L456: the comment says "Shovels", but the list has none.tools/test/tiling-rules.test.mjs:L494:apple_logis not a real texture. Assert the substring-safety case with a real name.tools/tiling-rules.json:L93:mangrove_rootsis a full transparent cube, not a cross-quad cutout (unlikehanging_rootsandcrimson_roots). Check whether it should beexempt.- Commit
6ee3b9b: body lines run past 72 columns and the body repeats the PR description (CONTRIBUTING.md§3.5, N6-COMMIT-05).
Resolve .png, upper-case and bare ids through their .svg name. Signed-off-by: Bharath <bharathasl74185@gmail.com>
BharathASL
force-pushed
the
feat/tiling-rules-matrix
branch
from
September 23, 2026 19:15
6ee3b9b to
41c12e0
Compare
There was a problem hiding this comment.
Nits
tools/test-tiling.mjs:L186: the new exportedresolveTilingCategoryhas the same name astools/lib/pbr-generator.mjs:L145but gives different results. The pbr copy still buildsbase + ".svg", sograss_block_side.pngandgrass_block_side.SVGresolve totoroidalthere and tox-onlyhere, andgrass_block_side_overlay.pngresolves totoroidalthere and toexempthere. Only tests call the new helper. Have the pbr version delegate tocategorizeTexture, or drop the new export, so there is one resolver.tools/test/tiling-rules.test.mjs:L441:enchanted_golden_appleis not a vanilla texture (its item model usesitem/golden_apple), which contradicts the "Real vanilla item textures" comment atL437. Drop the entry.tools/test/tiling-rules.test.mjs:L447: this line requires the real item texturesbowl,carrot,potatoandporkchopto betoroidal. When any of them is later added toitemIds, the test will fail even though the substring rule still holds. Run the exact-stem check against a local rules fixture (for example{ ...rules, itemIds: ["bow", "golden_carrot", "baked_potato", "cooked_porkchop"] }) and not against the shipped list.tools/test-tiling.mjs:L117,tools/test/tiling-rules.test.mjs:L338: "upper-case id" overstates what the code does. Only the extension is case-folded, soGRASS_BLOCK_SIDE.pngstill resolves totoroidal. Change the wording to "upper-case extension".
7 tasks
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.
Description
Registers the Epic 13 item textures as tiling-exempt ahead of their masters, so the blocking seam audit does not treat handheld icons as toroidal terrain when #175–#177 land. Every id is a vanilla 1.21 texture stem, checked against the
textures/item/listing of the 1.21.6 client jar: the six tool materials (wooden, stone, iron, golden, diamond, netherite) × sword, pickaxe, axe, shovel, hoe;bowandbow_pulling_0..2;crossbow_standby,crossbow_pulling_0..2,crossbow_arrow,crossbow_firework;trident,mace;golden_carrot,baked_potato,bread,apple,cooked_porkchop. The shield has no item texture, so its entity texturesshield_baseandshield_base_nopatternare listed instead.categorizeTextureintools/test-tiling.mjsnow rebuilds the name it matches as<stem>.svg, so a.png, upper-case or extensionless id resolves exactly as its.svgmaster does (previouslygrass_block_side.pngfell through totoroidal). AresolveTilingCategoryhelper is exported for callers that need only the category name. The built-in fallback rules are kept in step withtools/tiling-rules.json, including the existinggrass.svgalias.No glob patterns are added. Each pattern lands with the first master it matches, and the unreachable-pattern guard from #199 stays without an allowlist. Logs are not narrowed to Y only: the shipped
textures/block/oak_log.svgkeeps its X+Y audit, which #88 depends on, and a test pins it. Negative fixtures stop a broad*_stem.svgrule from catchingpumpkin_stem,melon_stem,attached_pumpkin_stem,attached_melon_stemandmushroom_stem.Refs #175, Refs #176, Refs #177, Refs #88
Affected Assets
tools/tiling-rules.json:itemIdsextended with the Epic 13 texture stemstools/test-tiling.mjs: stem-based name resolution,resolveTilingCategoryexport, fallback rules syncedtools/test/tiling-rules.test.mjs: new sections [12]–[15] covering extension and case variants, oak_log both-axis coverage, stem negative fixtures, Epic 13 item stems and exact-stem matchingType of Change
feat: New vector texture master, blockstate, or compiler capabilityfix: Tiling fix, palette correction, or bugfixdocs: Documentation improvementchore/refactor: Maintenance, dependencies, or codebase cleanupContributor Checklist
Please check all applicable boxes before requesting review:
Vector Texture Standards (if adding/modifying SVGs)
viewBox="0 0 512 512"). Not applicable: no SVG changed.npm testseam audit: 24 passed, 0 failed, 6 exempt;block/oak_log.svgpasses on X+Y.rx) matchtextures/block/stone.svgexactly. Not applicable: no ore texture.Build & Verification
npm run buildlocally and verified that the pack compiles successfully.dist/. Not applicable: no texture output changes.Git Hygiene & Standards
feat(textures): ...).git commit -s).mainwith no merge commits..editorconfig(2-space indent, LF endings, trailing newline).