Skip to content
rlnt edited this page Nov 10, 2023 · 2 revisions

Conduit Registry Event

The event allows you to register custom conduits.
Note: Right now, it only supports registering custom energy conduits.

This is a startup event!
Keep in mind that startup events have to be located inside the kubejs/startup_scripts folder.

Registering custom energy conduits

Parameters

  • id
    • required
    • single string
    • used as the ID for the custom energy conduit item
    • automatically linked to the enderio namespace, don't add the namespace yourself
  • name
    • required
    • single string
    • used as the name for the custom energy conduit item
    • this will be written to the dynamic english lang file by provided by KubeJS
  • transferRate
    • required
    • integer value
    • used as the maximum transfer rate per tick for the custom energy conduit

Code

EnderIOEvents.conduits(event => {
    event.registerEnergyConduit(id: String, name: String, transferRate: Integer);
});

Texture

After registering the custom energy conduit inside the event, the language file as well as the model file will be automatically generated. The only thing you have to provide is a texture for your custom conduit. It will also be used for the icon inside the conduit configuration GUI.

The texture file needs to be placed inside the following directory:
kubejs/assets/enderio/textures/block/conduit

It needs to have the same name as the id parameter you used when registering the custom conduit. Make sure it's a valid .png file.
This should be a modified version of the original energy conduit texture. You can download a template PSD file here.

Notes

Because this mod uses a custom energy conduit type, there are some things you have to keep in mind.

The default conduit by EnderIO has unlimited transfer rate or rather Integer.MAX_VALUE because the energy system is integer-based. If you add your own conduits, keep in mind that the default conduit will always be better except when you add your own conduit with the same transfer rate. You could work around this by removing the default conduit from EnderIO by disabling its recipe.

Custom conduits can't be placed within the same block as the default energy conduits to prevent two energy lines within the same conduit bundle. Also, custom conduits can't replace default energy conduits but it works the other way around meaning you can upgrade custom conduits with the default one.

Registering custom conduits will add them to the normal EnderIO Conduits creative tab and will be displayed like they were implemented by EnderIO themselves.

Recipes are not generated automatically. You have to add a recipe for your custom conduits yourself!

Example

In this example, we add the "Stellar Energy Conduit" with the id enderio:stellar_conduit and a transfer rate of 50000 RF/t.

EnderIOEvents.conduits(event => {
    event.registerEnergyConduit("stellar_conduit", "Stellar Energy Conduit", 50000);
});

Texture:

Creative Tab:

Connection:

GUI: