#Adding your own recipe JEI
24 messages · Page 1 of 1 (latest)
Once your question has been answered, please close this post with </resolve:1050379261372006400> command!
JEI will automatically display recipes that you create. Are you asking how to make a recipe?
you made that altar in KubeJS?
(also that’s REI)
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
Yep
i was gonna say lol
I don't think you can easily add an altar recipe to REI without a lot of reflection
that said, it may be possible
I want to change to JEI
idk why you'd want to do that but ok
What ? Change to JEI ?
yeah lol
you can see how BetterEnd does a very similar REI integration here:
https://github.com/quiqueck/BetterEnd/blob/1.19/src/main/java/org/betterx/betterend/integration/rei/REIInfusionCategory.java
they don't seem to have an integration for JEI though
either way you can’t add custom recipes to REI nor JEI with kubejs
Isn`t text descriptions can be added by "onEvent('jei.information', "?
Is the recipe considered a descriptions?
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."])
Okay, thanks. I'm going to try to do something