Files
rivencraft/docs/WRITING_DESK_MODEL.md
T
2026-11-18 16:43:39 -05:00

3.2 KiB
Raw Blame History

Writing Desk display model — issue #113

Introduced in candidates 1.21.1.0.8 and 26.3.0.12. Player in-game checks passed (2026-11-18); included in 1.21.1.0.12 and 26.3.0.15.

References and placement

Reviewed dev images/current 26.3.png and the local Legacy ModelWritingDesk / RenderWritingDesk bytecode. Legacy uses dedicated paper geometry with small yaw offsets and separate selected-item rendering. Reuse the imported Legacy desk atlas, including its white paper patch; no new artwork or texture edits.

The existing two block JSON models put the tabletop at Y=12/16. Their red mat crosses the controller/extension seam. Earlier attachments used unrelated heights: paper at 0.27 (below the middle shelf at 0.375), selected page at 0.572 (below the tabletop at 0.75).

WritingDeskDisplayModel is shared by both clients:

  • Selected page: desk-local (0.5, 0.752, 0), scale 0.7, centered on the seam/mat. The renderer origin is the controller center (0.5, 0, 0.5).
  • Paper stack: local center X=1.15, Z=-0.1, sitting on the right middle shelf at 0.376. Its sheets are 0.5 x 0.625 blocks, 1/32 high with alternating +/-2-degree yaw. This is the extension/right half, shifted toward the desk's front.
  • One visible layer for 1–16 paper, two for 17–32, three for 33–48 and four for 49–64. Zero paper emits no mesh. Each layer has closed, shaded white geometry.
  • Both attachments share the desk's existing facing transform. Geometry stays within their respective supporting surfaces and does not overlap the selected page.
  • The 26.3 renderer captures count/page during extraction and submits immutable precomputed paper geometry; it does not read the block entity during submission.

The desk's base geometry, non-occluding registration, GUI, storage/copy costs and item textures are unchanged. Dynamic paper is model geometry rather than repeated vanilla Paper item sprites. Symbol Pages retain their item renderer so changing the selected symbol displays its actual artwork.

Validation

Both Gradle builds pass. A disposable Java geometry audit checked 126 faces over counts 0, 1, 15, 16, 17, 32, 33, 48, 49 and 64, including outward winding, support-surface clearance/bounds, separation from the selected page and four facing transforms. No game server was started for this client-model change. This does not replace GPU screenshots.

Player checks on both targets:

  1. Place four desks, one per horizontal facing. Compare with neighboring solid blocks and inspect from above, below and each side.
  2. Check neither attachment, page only, paper only and both.
  3. Try 1, 16, 17, 32, 33, 48, 49 and 64 paper; verify visible height transitions and no clipping/floating geometry. Paper should be white and on the right shelf, slightly forward; the selected page should sit over the red mat.
  4. Change/remove selected pages and paper, leave/reload the chunk and restart. Displays must update; neighboring block faces must remain visible correctly.
  5. Provide comparison screenshots of all facings for final visual acceptance.

Player acceptance was reported after testing these candidates. The checklist above records the suggested visual matrix; no automated GPU screenshot or independent full restart matrix is claimed.