Skip to content

Add creative inventory with GPU-rendered 3D block icons#17

Draft
Purdze wants to merge 2 commits intomasterfrom
feat/creative-inventory
Draft

Add creative inventory with GPU-rendered 3D block icons#17
Purdze wants to merge 2 commits intomasterfrom
feat/creative-inventory

Conversation

@Purdze
Copy link
Owner

@Purdze Purdze commented Mar 20, 2026

Summary

  • Creative inventory with vanilla-exact item ordering from CreativeModeTabs.java
  • GPU-rendered 3D block icons via dedicated BlockIconPipeline at native resolution
  • 10 tabs with vanilla sprites, scrollbar, hotbar display
  • Item atlas loads from jar-extracted textures (1857 textures)
  • SetCreativeModeSlot packet for item placement

Test plan

  • Join server in creative mode (/gamemode creative)
  • Press E to open creative inventory
  • Verify tabs match vanilla order (Building, Colors, Nature, etc.)
  • Verify 3D block icons render at native resolution
  • Click item to place in hotbar
  • Right-click to place block in world
  • Scroll through items
  • Escape to close

Purdze added 2 commits March 19, 2026 21:14
- Scrollable grid showing all ~1500 items from azalea registry
- 5 tabs: All, Building, Nature, Redstone, Tools
- Click item to place in selected hotbar slot (stack of 64)
- Sends SetCreativeModeSlot packet to server
- Opens with E in creative mode, Escape to close
- Item tooltips on hover
- Scroll wheel navigation within grid
Creative inventory:
- Vanilla tab_items.png background with exact slot positions (195x136)
- 10 tabs matching vanilla order from CreativeModeTabs.java
- Vanilla tab sprites (top/bottom selected/unselected)
- Vanilla scroller sprites (active/disabled)
- Items in exact vanilla order per tab (creative_tabs.json)
- Click to place stack of 64 in selected hotbar slot
- Sends SetCreativeModeSlot packet to server
- Opens with E in creative mode, Escape to close
- Hotbar display at bottom showing current items
- Item tooltips on hover

GPU block icon pipeline:
- BlockIconPipeline renders baked model quads at native resolution
- Uses chunk atlas texture with push constants for per-icon MVP
- Vanilla GUI transform: rotationXYZ(30,225,0), scale(0.625)
- Orthographic projection with Vulkan Y-flip
- Per-face lighting matching vanilla (top=0.98, side=0.80, right=0.608)
- No backface culling for correct rendering after rotation
- Depth clear before icon batch prevents world geometry occlusion
- BlockIcon MenuElement variant handled by dedicated pipeline

Item atlas improvements:
- Scans jar-extracted textures instead of hashed asset objects
- Asset index keys_with_prefix method for texture discovery
- Atlas size increased to 2048x2048 for ~1857 textures
- Sprite atlas increased to 1024x1024 for creative inventory sprites
- All 32 creative inventory sprites loaded (tabs, scrollers, backgrounds)
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