Pilynth 0.5.1

dotnet add package Pilynth --version 0.5.1                
NuGet\Install-Package Pilynth -Version 0.5.1                
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="Pilynth" Version="0.5.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pilynth --version 0.5.1                
#r "nuget: Pilynth, 0.5.1"                
#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.
// Install Pilynth as a Cake Addin
#addin nuget:?package=Pilynth&version=0.5.1

// Install Pilynth as a Cake Tool
#tool nuget:?package=Pilynth&version=0.5.1                

Pilynth - Minecraft modding in C#

NuGet Version Example Repo

Pilynth is a library which enables you to write Minecraft mods entirely in C#. It transpiles the CIL bytecode of your project into Java bytecode, and wraps it all up into a JAR, ready to run.

It is very much in the alpha phase, and probably not ready for much more than the most basic mods.

Usage

Pilynth is available as a NuGet package for .NET 8. A ready to run example project can be found in its own repository.

To create a mod, you must include a class that inherits FabricMod in the assembly. The Identifier and Version attributes must also be used, the former which will be used as the mod namespace. The ModBuilder class can then be used to configure and build the mod.

// Program.cs
new Pilynth.ModBuilder(args)
    .Version("1.21.3")
    .Build();
// mod/Main.cs
using Pilynth.Fabric;

namespace ExampleMod;

[Identifier("pilynth_example")]
[Version("1.0.0")]
public class ExampleMod : FabricMod
{
    public void onInitialize()
    {
        Logger log = LoggerFactory.GetLogger("pilynth_example");
        log.Info("hello pilynth world!");
    }
}

Multiple ModBuilder instances can be created to build the mod with different settings, such as building for multiple Minecraft versions.

A useable JAR can be generated by running the project.

> dotnet run
# The final JAR(s) will be placed in /build
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 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. 
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.5.1 81 12/22/2024
0.5.0 94 12/16/2024
0.4.0 101 11/29/2024
0.3.0 97 11/28/2024
0.2.1 96 11/26/2024