Skip to content

Commit 457b40a

Browse files
committed
kjs-eio: update conduit event to EnderIO 8.2.0 and add item conduit type
1 parent 669e17b commit 457b40a

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

wikis/kubejs-enderio/docs/event/conduitregistry.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ This event allows you to register custom conduits.
55
**It is a server event and reloadable!**
66
Keep in mind that server events have to be located inside the `kubejs/server_scripts` folder.
77

8+
> [!WARNING] NOTE
9+
> The Conduits have been reworked by the EnderIO team in version 8.2.0. Previously, the functions to register the conduits required some more properties. If you need help with that, join the Discord or take a look at the source code before version 8.2.0.
10+
811
## Overview
912

1013
EnderIO supports data-driven conduits by default. This event adds convenience methods to register custom conduits via KubeJS.
@@ -14,6 +17,7 @@ for your custom conduit.
1417

1518
- access in a server script via: `EnderIOEvents.conduits`
1619
- supported conduits
20+
- item conduit
1721
- energy conduit
1822
- fluid conduit
1923
- chemical conduit (Mekanism)
@@ -33,7 +37,19 @@ After that, use one of the following methods to register the respective conduit
3337
`name` that is used for the automatic language file entry generation.
3438

3539
The custom conduit will be part of the normal EnderIO Conduits creative tab. Recipes are **not** generated automatically. You have to add a recipe
36-
for your custom conduits yourself!
40+
for your custom conduits yourself! You sometimes need to rejoin the world to see the new conduits. A game restart is not necessary.
41+
42+
### Item Conduit
43+
44+
- `transferRate` - specifies the transfer rate of items per tick
45+
- `ticksPerCycle` - specifies the amount of ticks per second the conduit operates at
46+
- note: to calculate the effective transfer rate, the two values need to be multiplied (e.g. 2 ticks per cycle and a transfer rate of 8 would be 16 items per second)
47+
48+
```js
49+
EnderIOEvents.conduits(event => {
50+
event.registerItemConduit(String id, String name, int transferRate, int ticksPerCycle); // [!code focus]
51+
});
52+
```
3753

3854
### Energy Conduit
3955

@@ -48,23 +64,20 @@ EnderIOEvents.conduits(event => {
4864
### Fluid Conduit
4965

5066
- `transferRate` - specifies the transfer rate of fluid per tick
51-
- `multiFluid` - specifies whether the conduit can transport multiple fluids at once
52-
- `supportPriority` - specifies whether the conduit supports priority settings
5367

5468
```js
5569
EnderIOEvents.conduits(event => {
56-
event.registerFluidConduit(String id, String name, int transferRate, boolean multiFluid, boolean supportPriority); // [!code focus]
70+
event.registerFluidConduit(String id, String name, int transferRate); // [!code focus]
5771
});
5872
```
5973

6074
### Chemical Conduit
6175

6276
- `transferRate` - specifies the transfer rate of chemical per tick
63-
- `multiChemical` - specifies whether the conduit can transport multiple chemicals at once
6477

6578
```js
6679
EnderIOEvents.conduits(event => {
67-
event.registerChemicalConduit(String id, String name, int transferRate, boolean multiChemical); // [!code focus]
80+
event.registerChemicalConduit(String id, String name, int transferRate); // [!code focus]
6881
});
6982
```
7083

0 commit comments

Comments
 (0)