Module integrates Embeddium Minecraft Game

This Wiki page provides information on how to use Embeddium in the module development environment, and how to write any instructions for built -in integrated integration in a compatible manner in the module development environment.

If you are just looking for Maven coordinates, you can click the directory to jump to Maven information.However, if you do n’t just want to test how your module is used with Embeddium, but also wants to repair Embeddium or call its code. It is recommended to read the following information carefully.

How to add built -in integrated

When most modules must achieve their goals, they tend to mixin to Embeddium when needed, or only call the public (PUBLIC) method (not necessarily selected as API) to add built -in integration.This is a bad idea, there are two main reasons:

Module built -in integration is usually very bad, and usually has a more common method. There is no need to integrated the module with Embeddium.

We do not guarantee that the internal code remains stable.(There is no appropriate API, there are also exceptions, because the API is still defined.)

We recommend that the module follows one of the following methods.If you are not sure what the best way to use, please contact us on Discord -we will not bite people.:)

Method 1: Use or add platform API

(Neo) Forge/Fabric API is very extensive and allows quite a lot of control to rendering.Generally speaking, modules that modify the Embeddium rendering device also need to repair the original renderer by themselves to achieve the purpose.A better solution is to add a standard API to your platform for this function, and then use the API instead of writing custom MIXIN for the original version.Then Embeddium can natively support the API and this support can be shared by other modules, rather than tailor -made based on your specific module.This makes the module ecosystem better for everyone.

Neoforge PR #642 is an example of such a practice.Through this PR, Neoforge obtained a standard method that attached custom geometric graphics to the block part (sub -block). The cables that allow immersive engineering can be used to useWrite a specific built -in integrated code.

Method 2: Use or add Embeddium API

If your case is too small and not suitable for the existing (or new) platform API, then the next best solution is to add API to Embeddium to obtain the required features.This is better than directly Mixin, because we can ensure that the API will continue to work indefinitely, even if we make other code changes.It provides a clear definition contract between our renderers and other modules.

Some of our current APIs can be found here.If/When necessary, add more content.

Method 3: Direct patch + version lock

This method should be regarded as the ultimate means because it is most likely to introduce compatibility issues and we are unlikely to provide support for it.

If there is no way to use the platform or Embeddium API to achieve your use case, the final choice is to directly repair the Embeddium renderer to achieve your purpose.This is the current situation of Minecraft 1.20.1 and earlier versions of many Sodium/Rubidium/Embeddium built -in integration.

Note (1.21+): If you choose to take this route, you need to let your module depend on the specific version of Embeddium, and it is not allowed to run with any other version.(However, you can use "optional dependency items" instead of "necessary dependencies/front".) When your Mixin inevitably fails due to future changes, this can prevent unnecessary support requests.Embeddium below 1.21 may display warnings, but this limit will not be enforced.

Obviously, this has a main disadvantage: your module needs to be updated to continue using the newer version of Embeddium.However, this method is more like an escape cabin: it should have special value for the Minecraft version we no longer support.

Maven information

Thank you very much for the construction of Embeddium on his Maven repository.You can access the construction by adding the following contents to the script in Gradle.You can find a list of all published Maven identifications and versions; the following examples are suitable for 1.20.1 and 1.20.2.

 repositories {

Maven {url "https://maven.blamejared.com"

}

}

dependencies {

// Example for Forgegradle

Implementation fg.deobf ("Org.embeddedt: Embeddium-1.20.1: 0.2.11-Git.23Aedfb+MC1.20.1")

// Example for Architectury LOOM

Modimplementation ("ORG.embedded: Embeddium-1.20.1: 0.2.11-Git.23Aedfb+MC1.20.1"))

// Example for Neography 7+

Implementation ("ORG.embeddedt: Embeddium -.20.2: 0.2.11-GIT.9F6321d+MC1.20.2")

}