MCCsharp is a C# wrapper for the minecraft-data project. It provides access to Minecraft items, names, IDs, crafting recipes (recipes.json
) and more, directly from .NET code.
📦 Available on NuGet: nuget.org/packages/MCCsharp
- Access Minecraft items by ID or name
- Automatically load recipes even when not directly present in the version
- Support for both
crafting_shaped
andcrafting_shapeless
recipes - Strongly-typed 3x3 matrix of ingredients
- Handles Minecraft platform and version resolution via
dataPaths.json
dotnet add package MCCsharp
using MCCsharp;
using MCCsharp.Enums;
var mc = new MinecraftData(Platform.Pc, "1.17");
var item = mc.GetItemByIdOrName("crafting_table");
var recipe = mc.GetRecipe(item);
Console.WriteLine($"Crafting: {item.DisplayName} x{recipe.ResultCount}");
for (int y = 0; y < 3; y++)
{
for (int x = 0; x < 3; x++)
{
var cell = recipe.Matrix[y, x];
Console.Write((cell?.DisplayName ?? " ") + "\t");
}
Console.WriteLine();
}
Platforms:
- ✅
pc
(Java Edition) - ✅
bedrock
(planned or limited support)
Tested Minecraft versions:
1.8
to1.21.4
(Java)- Fully dynamic support through
dataPaths.json
GetAvailableVersions()
— Lists all supported versions with recipe availabilityGetLatestVersionWithRecipes(Platform platform)
— Gets the latest recipe-compatible version
Data files are based on minecraft-data
, included as a submodule or local directory.
Data/
└── minecraft-data/
├── data/
│ ├── pc/
│ └── bedrock/
└── dataPaths.json
Includes unit tests using xUnit:
dotnet test
MIT — use freely in personal or commercial projects.