Repository navigation
Home
Developer notes for datapack / KubeJS authors. In-game machines, GUIs, and player guides live in GuideME, not here.
This page covers the Matter Foundry recipe format and how custom Replication matter is handled by the bridge.
Matter types are registered by Replication (KubeJS startup). The bridge does not invent matter types.
From 3.0.0.0.0 onward, for every non-builtin matter type the bridge does two things automatically:
- Reference item — a dedicated item used only as a handle for JEI / EMI / REI (and drag-and-drop into AE2 slots / filters / patterns). It is not real storage by itself.
-
AE2 key type — in parallel, the matching AE2 matter key (
ReplicationMatterKey) so terminals, cells, patterns, and buses treat that matter as a first-class AE2 resource.
You do not need models, textures, rep_ae2_bridge_matters.json, or manual item IDs for custom types.
Builtin Replication types (earth, nether, organic, ender, metallic, precious, living, quantum) already have dedicated items and are skipped by auto-registration.
// kubejs/startup_scripts/custom_matter.js
StartupEvents.registry('replication:matter_types', event => {
event.create('crystal')
.color(0.8, 0.4, 1.0, 0.8)
.max(5000)
event.create('plasma')
.color(0.2, 0.7, 1.0, 1.0)
.max(10000)
})After this, ids such as kubejs:crystal / kubejs:plasma work in Foundry recipes and AE2; the bridge creates the reference items and AE2 keys automatically.
- Recipe type:
rep_ae2_bridge:matter_foundry - Pack authors typically use an iska_lib-style bundle: one JSON with an
entriesarray; each entry becomes one Foundry recipe.
| Field | Meaning |
|---|---|
energy |
FE cost for the craft |
inputs |
Up to 5 item inputs (item or tag + optional count) |
matter |
List of { "matter": "<id>", "amount": <int> }
|
output |
{ "id": "<item>", "count": <int> } |
matter ids are registry ids (e.g. replication:metallic or kubejs:crystal).
When inputs match a recipe, the Foundry GUI shows only the required matter types:
- Y — amount required by the recipe
-
X — amount currently buffered in the machine (Replication network and/or AE2 export). May be
0or greater than Y.
With no valid recipe, the matter grid stays empty (the internal buffer can hold more types than the 18 display slots).
{
"type": "rep_ae2_bridge:matter_foundry",
"entries": [
{
"energy": 2500,
"inputs": [
{ "item": "minecraft:copper_ingot", "count": 4 },
{ "tag": "c:gems/fluix", "count": 4 }
],
"matter": [
{ "matter": "replication:metallic", "amount": 50 },
{ "matter": "kubejs:crystal", "amount": 10 }
],
"output": {
"id": "rep_ae2_bridge:fluixing_replica_alloy",
"count": 10
}
}
]
}Place under data/<namespace>/recipe/ (or your pack’s recipe path). Reload datapacks / restart as usual.