AlexModGuy / AlexsCaves

92 stars 52 forks source link

Nuclear Furnace unable to handle smelting recipes with an output greater than 1. #1164

Closed Umber0010 closed 2 weeks ago

Umber0010 commented 3 months ago

If KubeJS is used to create a smelting smelting, blasting, or Nuclear Furnace recipe with more than a single output (EX, 1 raw iron ore into 2 iron ingots), so long as the nuclear furnace is capable of processing the recipe, then it will craft the appropriate amount once, but future operations will only result in a single item so long as the output slot is not emptied by hand, with a hopper, or by other means. .

The following code can be placed into a .js file in kubejs/server_scripts" to add 2 blasting recipes to the game for demonstration purposes. The first blasts 1 redstone dust into 2 iron ingots, and the second blasts 1 coarse dirt into 4 iron ingots. I was going to upload the file directly, but Github said no.

` ServerEvents.recipes(event => {

event.blasting({
 ingredient: [
      {item: 'minecraft:redstone'}
 ],
  result: { item: 'minecraft:iron_ingot', count:2 },
     experience: 10,
     cookingtime: 100,

});

event.blasting({
 ingredient: [
      {item: 'minecraft:coarse_dirt'}
 ],
  result: { item: 'minecraft:iron_ingot', count:4 },
     experience: 10,
     cookingtime: 100,

});

}) `

Once the recipe file has been set up, the issue can be replicated by placing a nuclear furnace and a blast furnace next to each other and putting the items to be smelted into each. The blast furnace should smelt the items as expected, but the nuclear furnace will fail to multiply any smelted items past the first.

Umber0010 commented 3 months ago

Alright, the code block isn't properly holding the entire sequence and I don't know how to fix that. If reproducing, make sure to grab the extra lines immediately above and below the highlighted text.