[GH-ISSUE #7042] F3 + S: dump the texture atlas (TextureManager.dumpAllSheets) #3133

Closed
opened 2026-11-03 04:06:06 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @CocofireHD on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7042

Originally assigned to: @CocofireHD on GitHub.

🤖 Filed by CocofireHD's AI agent (Hermes Agent, deepseek-v4.1-flash), not by CocofireHD personally.

F3 + S is bound (key.debug.dumpDynamicTextures) and its action is a no-op: handleDebugKeys takes the key "as in vanilla" but nothing is dumped. Vanilla dumps every dumpable texture there, and the chat names the folder.

Vanilla 26.3

javap -p -c net.minecraft.client.KeyboardHandler, the Options.keyDebugDumpDynamicTextures branch:

802: getfield      #453   // Field net/minecraft/client/Options.keyDebugDumpDynamicTextures:Lnet/minecraft/client/KeyMapping;
819: invokevirtual #460   // Method java/io/File.toPath:()Ljava/nio/file/Path;
822: invokeinterface #466 // InterfaceMethod java/nio/file/Path.toAbsolutePath:()Ljava/nio/file/Path;
831: invokestatic  #471   // Method com/mojang/blaze3d/platform/TextureUtil.getDebugTexturePath:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
840: invokevirtual #477   // Method net/minecraft/client/Minecraft.getTextureManager:()Lnet/minecraft/client/renderer/texture/TextureManager;
845: invokevirtual #481   // Method net/minecraft/client/renderer/texture/TextureManager.dumpAllSheets:(Ljava/nio/file/Path;)V
884: ldc_w         #507   // String debug.dump_dynamic_textures
  • TextureUtil.getDebugTexturePath(gameDirectory.toPath()) resolves screenshots then debug under it.
  • TextureManager.dumpAllSheets creates the folder, then calls Dumpable.dumpContents on each registered texture.
  • TextureAtlas.dumpContents names the file with Identifier.toDebugFileName (/ and : become _), writes the pixels with TextureUtil.writeAsPNG and dumpSpriteNames beside it: every sprite sorted by name, %s\tx=%d\ty=%d\tw=%d\th=%d%n (the rect in texels).
  • The chat gets debug.dump_dynamic_textures with the folder as an underlined link (the key is in vanilla's en_us.json).

Horizon packs the GUI, font, particle, map and skin sprites into one atlas (hud::HudAtlas), so one file stands in for the atlases vanilla dumps apart: minecraft_textures_atlas_gui.png + minecraft_textures_atlas_gui.txt.

Part of the debug screen roadmap item (F3 + S, "the atlas dump").

Originally created by @CocofireHD on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7042 Originally assigned to: @CocofireHD on GitHub. > 🤖 Filed by CocofireHD's AI agent (Hermes Agent, deepseek-v4.1-flash), not by CocofireHD personally. F3 + S is bound (`key.debug.dumpDynamicTextures`) and its action is a no-op: `handleDebugKeys` takes the key "as in vanilla" but nothing is dumped. Vanilla dumps every dumpable texture there, and the chat names the folder. ### Vanilla 26.3 `javap -p -c net.minecraft.client.KeyboardHandler`, the `Options.keyDebugDumpDynamicTextures` branch: ``` 802: getfield #453 // Field net/minecraft/client/Options.keyDebugDumpDynamicTextures:Lnet/minecraft/client/KeyMapping; 819: invokevirtual #460 // Method java/io/File.toPath:()Ljava/nio/file/Path; 822: invokeinterface #466 // InterfaceMethod java/nio/file/Path.toAbsolutePath:()Ljava/nio/file/Path; 831: invokestatic #471 // Method com/mojang/blaze3d/platform/TextureUtil.getDebugTexturePath:(Ljava/nio/file/Path;)Ljava/nio/file/Path; 840: invokevirtual #477 // Method net/minecraft/client/Minecraft.getTextureManager:()Lnet/minecraft/client/renderer/texture/TextureManager; 845: invokevirtual #481 // Method net/minecraft/client/renderer/texture/TextureManager.dumpAllSheets:(Ljava/nio/file/Path;)V 884: ldc_w #507 // String debug.dump_dynamic_textures ``` - `TextureUtil.getDebugTexturePath(gameDirectory.toPath())` resolves `screenshots` then `debug` under it. - `TextureManager.dumpAllSheets` creates the folder, then calls `Dumpable.dumpContents` on each registered texture. - `TextureAtlas.dumpContents` names the file with `Identifier.toDebugFileName` (`/` and `:` become `_`), writes the pixels with `TextureUtil.writeAsPNG` and `dumpSpriteNames` beside it: every sprite sorted by name, `%s\tx=%d\ty=%d\tw=%d\th=%d%n` (the rect in texels). - The chat gets `debug.dump_dynamic_textures` with the folder as an underlined link (the key is in vanilla's `en_us.json`). Horizon packs the GUI, font, particle, map and skin sprites into one atlas (`hud::HudAtlas`), so one file stands in for the atlases vanilla dumps apart: `minecraft_textures_atlas_gui.png` + `minecraft_textures_atlas_gui.txt`. Part of the debug screen roadmap item (F3 + S, "the atlas dump").
Author
Owner

@CocofireHD commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6574728350 --> @CocofireHD commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3133
No description provided.