MinecraftRenderer 0.3.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package MinecraftRenderer --version 0.3.2
                    
NuGet\Install-Package MinecraftRenderer -Version 0.3.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MinecraftRenderer" Version="0.3.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MinecraftRenderer" Version="0.3.2" />
                    
Directory.Packages.props
<PackageReference Include="MinecraftRenderer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MinecraftRenderer --version 0.3.2
                    
#r "nuget: MinecraftRenderer, 0.3.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MinecraftRenderer@0.3.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MinecraftRenderer&version=0.3.2
                    
Install as a Cake Addin
#tool nuget:?package=MinecraftRenderer&version=0.3.2
                    
Install as a Cake Tool

MinecraftRenderer

.NET renderer for Minecraft heads, blocks, and GUI-ready items using SixLabors.ImageSharp.

Features

  • MinecraftBlockRenderer renders block and item models with Minecraft's GUI transforms, lighting, biome tints, and pack overlays.
  • RenderItemFromNbt and RenderItemFromNbtWithResourceId turn vanilla or Hypixel SNBT payloads into images (and expose deterministic resource IDs plus animation metadata).
  • MinecraftHeadRenderer draws 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

  1. Restore the solution and run the tests:

     dotnet test
    
  2. Create 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);
    
  3. 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");
    
  4. 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, and RenderGuiItemFromTextureId cover direct model/texture rendering.
  • RenderItemFromNbt and RenderItem overloads accept ItemRenderData to apply dyes, custom data, or skull profiles.
  • RenderItemFromNbtWithResourceId / RenderAnimatedItemFromNbtWithResourceId return RenderedResource / AnimatedRenderedResource (image plus pack-aware fingerprint, model path, and resolved textures).
  • BlockRenderOptions control camera, transforms, lighting, texture packs, and skull texture resolvers. Clone with with to 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 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 is compatible.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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