#Adding your own recipe JEI

24 messages · Page 1 of 1 (latest)

unkempt swift
#

I made a small altar and would like to add a recipe display for it. Is it possible to do this ?

rapid lilyBOT
#

Once your question has been answered, please close this post with </resolve:1050379261372006400> command!

zinc otter
#

JEI will automatically display recipes that you create. Are you asking how to make a recipe?

unkempt swift
#

Just a second

zinc otter
#

you made that altar in KubeJS?

slim aurora
#

(also that’s REI)

unkempt swift
#
onEvent('block.right_click', event => {
    var player = event.player;
    var item = event.item;
    var block = event.block;
    var world = event.level;

    var posX = block.x;
    var posY = block.y;
    var poY = posY + 1.4;
    var posZ = block.z;
    var inSlot = world.getBlock(posX, posY, posZ).getInventory();
    var slot1 = world.getBlock(posX+3, posY, posZ).getInventory(); 
    var slot2 = world.getBlock(posX+2, posY, posZ+2).getInventory(); 
    var slot3 = world.getBlock(posX+2, posY, posZ-2).getInventory(); 
    var slot4 = world.getBlock(posX, posY, posZ-3).getInventory(); 
    var slot5 = world.getBlock(posX, posY, posZ+3).getInventory(); 
    var slot6 = world.getBlock(posX-3, posY, posZ).getInventory(); 
    var slot7 = world.getBlock(posX-2, posY, posZ+2).getInventory(); 
    var slot8 = world.getBlock(posX-2, posY, posZ-2).getInventory(); 
    var outSlot = world.getBlock(posX, posY, posZ).getInventory();
    if(inSlot.get(0) == 'minecraft:diamond' && item.id == 'minecraft:amethyst_shard' && player.crouching){
       if(slot1.get(0) == 'minecraft:diamond' && slot2.get(0) == 'minecraft:diamond' && slot3.get(0) == 'minecraft:diamond' && slot4.get(0) == 'minecraft:diamond'
       && slot5.get(0) == 'minecraft:diamond' && slot6.get(0) == 'minecraft:diamond' && slot7.get(0) == 'minecraft:diamond' && slot8.get(0) == 'minecraft:diamond'){
        slot1.set(0, 'minecraft:air'); slot2.set(0, 'minecraft:air'); slot3.set(0, 'minecraft:air'); slot4.set(0, 'minecraft:air'); slot5.set(0, 'minecraft:air');
        slot6.set(0, 'minecraft:air'); slot7.set(0, 'minecraft:air'); slot8.set(0, 'minecraft:air');
        world.spawnLightning(posX, posY, posZ, true);
        outSlot.set(0, 'minecraft:air');
        event.item.setCount( event.item.getCount() - 1);
        Utils.server.runCommandSilent(`summon item ` + posX+ ' ' + poY + ' ' + posZ + ` {PickupDelay:10,NoGravity:1,Item:{id:emerald,Count:1}}`)
        }
    }
    
})
#

I'm sorry if the code is poorly written. I'm just learning

unkempt swift
zinc otter
#

I don't think you can easily add an altar recipe to REI without a lot of reflection

#

that said, it may be possible

unkempt swift
zinc otter
#

idk why you'd want to do that but ok

unkempt swift
#

What ? Change to JEI ?

zinc otter
#

yeah lol

#

they don't seem to have an integration for JEI though

slim aurora
#

either way you can’t add custom recipes to REI nor JEI with kubejs

hidden onyx
#

Isn`t text descriptions can be added by "onEvent('jei.information', "?

unkempt swift
#

Is the recipe considered a descriptions?

hidden onyx
#

I never had a problem with Above&Beyond`s
event.add('thermal:blizz_rod', ["Obtain by running an §9Entropy Manipulator§0 (with Charge) and any amount of §9Snowballs§0 through an §5Alchemical Laser§0."])

unkempt swift
#

Okay, thanks. I'm going to try to do something