Skip to content

[SUGGESTION]: Better internal working pipeline #1

@redplcs

Description

@redplcs

My suggestion is inspired by Kotlin for Forge mod

I think we should add specialized mod that will handle CIL compilation of .NET binaries into machine code and link API (e.g. Neo-Forge or Minecraft) with specialized mod loader via injecting machine code into JVM output.

Modder creates simple class-library .NET 9 project, imports CSharpBridge package, imports specialized mod loader wrapper package to work with (e.g. CSharpBridge.ModLoaders.NeoForge) and writes the code. The end user must import custom .jar mod that will load .NET binary and inject mod loaders wrapper methods into mod loaders itself. Basically scan .NET assembly for specified mod loader wrapper package.

For example, I want to write mod for Forge

I have to create simple class-library for .NET 9. I have to import CSharpBridge.ModLoaders.Forge to make mod for forge. This package must also have implicit reference to CSharpBridge.Minecraft package.

After importing specialized mod loader wrapper, I'm writing code like it was made for original Forge. To archive this, mod loader wrapper must have similar APIs to original Forge library.

The end user who's want to play with my mod must import intermediate mod dependency that will handles with .NET binaries.

Internally intermediate mod must handle .NET compilation (It takes .NET binaries with CIL code, compiles it via crossgen2, inject .NET machine code via JNI into mod loader methods).

Note that compilation must be happen on end-user, because we can't just compile into machine code on compilation stage, because we will get the platform-specific code. It will much harder to distribute those binaries for modders

Let's call this intermediate mod: .NET for %mod-loader-name-here%

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions