MCCsharp 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MCCsharp --version 1.0.0
NuGet\Install-Package MCCsharp -Version 1.0.0
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="MCCsharp" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MCCsharp" Version="1.0.0" />
<PackageReference Include="MCCsharp" />
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 MCCsharp --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MCCsharp, 1.0.0"
#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.
#addin nuget:?package=MCCsharp&version=1.0.0
#tool nuget:?package=MCCsharp&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MCCsharp
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
๐ Features
- 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
๐ ๏ธ Installation
dotnet add package MCCsharp
๐ฆ Usage Example
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();
}
โ Compatibility
Platforms:
- โ
pc
(Java Edition) - โ
bedrock
(planned or limited support)
Tested Minecraft versions:
1.8
to1.21.4
(Java)- Fully dynamic support through
dataPaths.json
๐งฑ Advanced Features
GetAvailableVersions()
โ Lists all supported versions with recipe availabilityGetLatestVersionWithRecipes(Platform platform)
โ Gets the latest recipe-compatible version
๐ Data Structure
Data files are based on minecraft-data
, included as a submodule or local directory.
Data/
โโโ minecraft-data/
โโโ data/
โ โโโ pc/
โ โโโ bedrock/
โโโ dataPaths.json
๐งช Testing
Includes unit tests using xUnit:
dotnet test
๐ License
MIT โ use freely in personal or commercial projects.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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.
-
net9.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.