Custom Infinity Cell - GlodBlock/ExtendedAE GitHub Wiki
You can use KubeJS to create any type ME Infinity Cell
This is how to create ME Infinity Lava Cell
StartupEvents.registry('item', event => {
event.create('lava_cell', 'custom_infinity_cell')
.texture('kubejs:item/lava_cell')
.fluidType('minecraft:lava')
.cellModel('kubejs:block/drive/lava_cell');
})
This is how to create ME Infinity Dirt Cell
StartupEvents.registry('item', event => {
event.create('dirt_cell', 'custom_infinity_cell')
.texture('kubejs:item/dirt_cell')
.fluidType('minecraft:dirt')
.cellModel('kubejs:block/drive/dirt_cell');
})
fluidType()
can accept fluid id and itemType()
can accept item id.
If you want to create Infinity Cell that isn't vanilla type, like Mekanism chemicals, you need to load Java class to create AEKey manually.
This is how to create ME Infinity Ethene Cell
(Need Applied Mekanistics)
const MekKey$ = Java.loadClass("me.ramidzkh.mekae2.ae2.MekanismKey")
const Chem$ = Java.loadClass("mekanism.common.registries.MekanismChemicals")
StartupEvents.registry('item', event => {
event.create('ethene_cell', 'custom_infinity_cell')
.texture('kubejs:item/ethene_cell')
.type(() => MekKey$.of(Chem$.ETHENE.getStack(1000))
.cellModel('kubejs:block/drive/ethene_cell');
})
type()
can accept arbitrary AEKey.
cellModel()
is the cell model in drive:
Take ME Infinity Lava Cell
for example. 'kubejs:block/drive/lava_cell'
means you need put the json model file at $MINECRAFT_ROOT$\kubejs\assets\kubejs\models\block\drive\lava_cell.json
lava_cell.json
{
"ambientocclusion": false,
"textures": {
"particle": "kubejs:block/drive/infinity_cell",
"cell": "kubejs:block/drive/infinity_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [9, 8, 8]},
"faces": {
"north": {"uv": [0, 0, 6, 2], "texture": "#cell", "cullface": "north"},
"up": {"uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north"},
"down": {"uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north"}
}
}
]
}
kubejs:block/drive/infinity_cell
means you need to put the texture file at $MINECRAFT_ROOT$\kubejs\assets\kubejs\textures\block\drive\infinity_cell.json