# Bestiary GUI textures

The book uses a fixed 512 x 384 layout. Minecraft GUI scaling and the existing
bestiary scale cap uniformly scale the whole spread. No panel reflows or grows
with the aspect ratio. Layout coordinates live in BestiaryLayout; shared drawing
lives in BestiaryTheme. BookButton retains vanilla input, focus and narration.

bestiary_atlas.png is original pixel artwork with no baked-in text or entity
facts. Regenerate it with: python tools/ui/generate_bestiary_atlas.py
Python + Pillow are only needed for artwork development, not to build/run the mod.
The PNG is checked in. Its atlas is 512 x 512, with nearest-neighbor rendering.
Resource packs may replace this file while keeping these sprite coordinates:

Sprite               UV          Size        Border (nine-slice)
Book spread          0,0         512 x 384   --
Stone button         0,400       96 x 20     3
Selected button      0,424       96 x 20     3
Hovered button       0,448       96 x 20     3
Disabled button      0,472       96 x 20     3
Parchment card       100,400     32 x 32     3
Inset list           100,436     32 x 32     3
Selected row         136,400     32 x 24     3
Hovered/subtle row   136,428     32 x 24     3
Scrollbar track      172,400     6 x 32      2
Scrollbar thumb      180,400     6 x 20      2
Search field         190,400     32 x 20     3
Item slot            226,400     20 x 20     3
Entity preview       250,400     32 x 32     4
Drop chance track    286,400     102 x 5     --
Drop chance fill     286,407     102 x 5     --
Search/star/eye      400,400 / 418,400 / 436,400; each 16 x 16

Only frames and decorative surfaces come from the atlas. Names, translations,
item icons, 3D previews, chances, spawn locations, descriptions and progress
are drawn at runtime from existing bestiary data. Unknown chances stay unknown;
rank/discovery gates remain authoritative. Descriptions appear only through the
info button, replacing the preview and summary with one scrollable text panel.
The progress footer and benefit row share fixed bounds in BestiaryLayout so both
stay inside the parchment without overlapping.
Named loot rows show three entries and scroll against the filtered display list.
Spawn conditions and optional rule metadata remain available in tooltips.

Existing progress-bar resource-pack/config support is retained:
- progressBarSpriteSource="vanilla": minecraft:textures/gui/container/villager2.png
  UV 0,186 background and 0,191 fill; 102 x 5; texture 512 x 256.
- progressBarSpriteSource="mod": textures/gui/bestiary.png
  UV 220,200 background and 220,205 fill; 102 x 5; texture 512 x 512.
The older bestiary.png and bestiary_background.png are kept for pack compatibility;
structural book drawing uses bestiary_atlas.png.

Repeatable visual verification (Windows; use ./gradlew on other platforms):
.\gradlew.bat runClient -PbestiaryClientWidth=1920 -PbestiaryClientHeight=1080
.\gradlew.bat runClient -PbestiaryClientWidth=2560 -PbestiaryClientHeight=1440
.\gradlew.bat runClient -PbestiaryClientWidth=3440 -PbestiaryClientHeight=1440
These optional properties set the client window only. Normal runClient defaults
are unchanged. Confirm actual display dimensions in F3 or an in-game screenshot.
Use a disposable creative world for selection, all tabs, scrolling, hidden/locked
states, variants, tooltips, descriptions and resizing while an entry is selected.
