MinecraftRenderer 0.4.2
dotnet add package MinecraftRenderer --version 0.4.2
NuGet\Install-Package MinecraftRenderer -Version 0.4.2
<PackageReference Include="MinecraftRenderer" Version="0.4.2" />
<PackageVersion Include="MinecraftRenderer" Version="0.4.2" />
<PackageReference Include="MinecraftRenderer" />
paket add MinecraftRenderer --version 0.4.2
#r "nuget: MinecraftRenderer, 0.4.2"
#:package MinecraftRenderer@0.4.2
#addin nuget:?package=MinecraftRenderer&version=0.4.2
#tool nuget:?package=MinecraftRenderer&version=0.4.2
MinecraftRenderer
.NET renderer for Minecraft heads, blocks, and GUI-ready items using SixLabors.ImageSharp.
Features
MinecraftBlockRendererrenders block and item models with Minecraft's GUI transforms, lighting, biome tints, and pack overlays.RenderItemFromNbtandRenderItemFromNbtWithResourceIdturn vanilla or Hypixel SNBT payloads into images (and expose deterministic resource IDs plus animation metadata).MinecraftHeadRendererdraws player heads from skins, custom data, or resolver-provided textures.- Texture pack stacks, overlays, and custom data directories are supported without rebuilding the renderer.
- Skull rendering accepts pluggable resolvers that see the full item context (
SkullResolverContext). - Ships with an xUnit suite that exercises model rendering, lighting, texture packs, and Hypixel item parsing.
Install
Install from the NuGet package!
dotnet add package MinecraftRenderer
Quick start
Restore the solution and run the tests:
dotnet testCreate a renderer backed by aggregated JSON data (see Data files):
using MinecraftRenderer; var dataPath = Path.Combine(Environment.CurrentDirectory, "minecraft"); using var renderer = MinecraftBlockRenderer.CreateFromDataDirectory(dataPath);Render a block or item:
using var block = renderer.RenderBlock( "stone", MinecraftBlockRenderer.BlockRenderOptions.Default with { Size = 256 }); block.Save("stone.png"); using var item = renderer.RenderItem( "minecraft:diamond_sword", MinecraftBlockRenderer.BlockRenderOptions.Default with { Size = 128 }); item.Save("diamond_sword.png");Render directly from SNBT and capture the resource ID that fingerprints the model/texture stack:
var nbt = NbtDocument.Parse(@"{ id: ""minecraft:player_head"", Count: 1b, components: { ""minecraft:profile"": { id: ""abcd-efgh"", properties: [{ name: ""textures"", value: ""...base64..."" }] } } }"); using var rendered = renderer.RenderItemFromNbtWithResourceId(nbt); rendered.Image.Save("head.png"); Console.WriteLine($"Resource ID: {rendered.ResourceId.ResourceId}");
RenderAnimatedItemFromNbtWithResourceId returns an AnimatedRenderedResource when any bound textures carry animation metadata; static items still produce a single frame.
Hypixel Skyblock
The main intention of this was for rendering Hypixel Skyblock items on https://elitebot.dev/. To do this you'll have to write an adapter to transform skyblock items from however you have them saved into something that this renderer will recognize. The main challenge here is that Hypixel sends you item data in 1.8.9 format, but this renderer wants modern SNBT item data.
You can see an example implementation here: https://github.com/EliteFarmers/API/tree/master/EliteAPI/Features/Textures/Services That project also uses the SkyblockRepo package.
Rendering APIs
RenderBlock,RenderItem, andRenderGuiItemFromTextureIdcover direct model/texture rendering.RenderItemFromNbtandRenderItemoverloads acceptItemRenderDatato apply dyes, custom data, or skull profiles.RenderItemFromNbtWithResourceId/RenderAnimatedItemFromNbtWithResourceIdreturnRenderedResource/AnimatedRenderedResource(image plus pack-aware fingerprint, model path, and resolved textures).BlockRenderOptionscontrol camera, transforms, lighting, texture packs, and skull texture resolvers. Clone withwithto tweak individual properties.
Data files
Optional customdata/ overlays located next to the assets tree are detected automatically. Texture pack registries can be supplied via TexturePackRegistry to build layered pack stacks.
The library ships with MinecraftAssetDownloader to fetch and unzip asset files directly from Mojang:
using MinecraftRenderer;
Console.WriteLine("Downloading Minecraft 1.21.10 assets...");
var assetsPath = await MinecraftAssetDownloader.DownloadAndExtractAssets(
version: "1.21.10",
acceptEula: true, // Review https://www.minecraft.net/en-us/eula first
progress: new Progress<(int Percentage, string Status)>(p =>
Console.WriteLine($"[{p.Percentage}%] {p.Status}"))
);
Console.WriteLine($"Assets extracted to: {assetsPath}");
using var renderer = MinecraftBlockRenderer.CreateFromMinecraftAssets(assetsPath);
using var stone = renderer.RenderBlock("stone", new MinecraftBlockRenderer.BlockRenderOptions(Size: 256));
stone.Save("stone.png");
MinecraftAssetDownloader.GetAvailableVersions and GetLatestVersion can help you pick the right version before downloading, but not all versions are guaranteed to work.
Atlas generator
CreateAtlases is a CLI utility that dumps pages of renders for debugging or content reviews. Run it from the repo root when you want a quick visual diff:
dotnet run --project CreateAtlases/CreateAtlases.csproj -- --output atlases
Additional flags exist for custom camera views, SNBT item directories, or animated outputs, but the tool is not required for normal library usage.
It's possible that this might be expanded into proper atlases for actual use, but right now it is just for debugging.
Running tests
Execute the regression suite from the repository root:
dotnet test
License
See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- SixLabors.ImageSharp (>= 3.1.11)
-
net8.0
- SixLabors.ImageSharp (>= 3.1.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.4.2 | 242 | 3/8/2026 |
| 0.4.1 | 95 | 3/6/2026 |
| 0.4.0 | 108 | 3/2/2026 |
| 0.3.2 | 133 | 2/23/2026 |
| 0.3.1 | 404 | 1/11/2026 |
| 0.3.0 | 341 | 12/4/2025 |
| 0.2.10 | 321 | 10/26/2025 |
| 0.2.9 | 121 | 10/25/2025 |
| 0.2.8 | 110 | 10/25/2025 |
| 0.2.7 | 119 | 10/25/2025 |
| 0.2.6 | 182 | 10/22/2025 |
| 0.2.5 | 194 | 10/20/2025 |
| 0.2.4 | 181 | 10/20/2025 |
| 0.2.3 | 136 | 10/18/2025 |
| 0.2.2 | 95 | 10/18/2025 |
| 0.2.1 | 95 | 10/18/2025 |
| 0.2.0 | 111 | 10/18/2025 |
| 0.1.0 | 97 | 10/18/2025 |