NEI universal handler fix

This commit is contained in:
Boblet 2024-07-09 16:17:23 +02:00
parent 962686d29e
commit 27bc38caaa
3 changed files with 36 additions and 44 deletions

View File

@ -1,41 +1,6 @@
## Added
* Acidizer Input Partitioner
* Buffers inputs for the ore acidizer and releases the exact amount needed to complete an operation
* This allows easy automation of acidizers accepting multiple types which have higher input requirements
* By simply shoving items into the acidizer all at once, there is a high likelihood of the acidizer to clog, as the remaining input is no longer sufficient
* The partitioner only has 9 slots for ingredients, for more types it's necessary to sort the items and use multiple partitioners
* The partitioner has 9 additional slots for invalid items that cannot be processed via acidizer, those can be ejected via hopper IO
* An inline conveyor machine similar to the splitter, receives items from conveyors (but not from ejectors directly) and outputs them on its built-in conveyor belt
* New circuit items
* Quantum computer themed circuits for post fusion circuits
* The ICF core now needs 16 solid state quantum processors
* Quantum computers are post fusion tier control units
* Quantum circuits are made from a new alloy, BSCCO, which requires bismuth
## Changed
* Updated russian localization
* The mandatory washing step for bedrock ore byproducts now needs 4 items to complete (instead of just one)
* This should offset the exponentially increasing amount of byproduct created from processing bedrock ore which ends up being far greater than the primary product
* The step being mandatory means that byproducts cannot be centrifuged until they are washed
* To counteract the resulting sparsity of earlier byproducts due to the down-the-line duplication process, later acidizing steps now also yield byproducts of the previous steps
* The sound extension is now configurable, and the amount of sound channels reserved is now 200 by default instead of 1000, this should fix an issue where OC's sound would not work
* Logistics drones are now crafted with standard transport drones and not express ones, making them substantially cheaper
* Added strontium to the rare earth bedrock ore chain
* Electrolyzing primary bedrock ore fractions now yields more material, as well as crumbs
* The Gerald recipe has been reworked
* Gerald no longer needs a ton of coins, instead it's just a single UFO coin (still requires the boss progression, may be changed in the future)
* Gerald now makes use of BSCCO wires
* A new microcrafting item has been added, heavy duty elements, these need to be mass-produced in the arc welder using cast bronze, welded CMB and fullerite, also using stellar flux for welding
* The recipe uses a stack of the brand new quantum computers
* Electrolyzers now support variable duration recipes
* The water electrolysis now only takes 10 ticks per batch
* Rebalanced the upgrades for the electrolyzer, it can now also take overdrive upgrades
* Changed crystalline bedrock ore, redstone and cinnabar (mercury) are now primary while the less important diamond and sodalite are sulfuric byproducts
* Changed bedrock ore processing time in the electrolyzer to 60 ticks
## Fixed
* Added a write lock on cellular dungeons while generating, fixing a crash caused by dungeons that generate next to each other due to cascading worldgen
* Added recipe caching to the arc furnace, fixing an issue where recipe detection and item IO are horribly inefficient
* Fixed arc furnace state not properly saving after performing a recipe
* Fixed crash regarding OC compat
* Fixed a rare crash with the anvil GUI
* Fixed potential world corruption caused by the RBMK console
* Fixed issue where the NEI universal handler can not correctly display more than 4 outputs (now supports up to 8, which should cover all possible electrolyzer cases too)
* Fixed the metal electrolysis duration variable not being part of the config

View File

@ -234,6 +234,28 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler implemen
{102, 24 + 9},
{120, 24 + 9}
};
case 5: return new int[][] {
{102, 24 - 9}, {120, 24 - 9},
{102, 24 + 9}, {120, 24 + 9},
{138, 24},
};
case 6: return new int[][] {
{102, 6}, {120, 6},
{102, 24}, {120, 24},
{102, 32}, {120, 32},
};
case 7: return new int[][] {
{102, 6}, {120, 6},
{102, 24}, {120, 24},
{102, 32}, {120, 32},
{138, 24},
};
case 8: return new int[][] {
{102, 6}, {120, 6},
{102, 24}, {120, 24},
{102, 32}, {120, 32},
{138, 24}, {138, 32},
};
}
return new int[count][2];

View File

@ -139,7 +139,7 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ElectrolysisMetalRecipe(
f0 != null ? f0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
f1 != null ? f1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
20,
60,
f0 == null ? ItemBedrockOreNew.extract(type.primary1, 12) : new ItemStack(ModItems.dust),
f1 == null ? ItemBedrockOreNew.extract(type.primary2, 6) : new ItemStack(ModItems.dust),
ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)));
@ -148,7 +148,7 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ElectrolysisMetalRecipe(
s0 != null ? s0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
s1 != null ? s1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
20,
60,
s0 == null ? ItemBedrockOreNew.extract(type.primary1, 6) : new ItemStack(ModItems.dust),
s1 == null ? ItemBedrockOreNew.extract(type.primary2, 12) : new ItemStack(ModItems.dust),
ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)));
@ -158,7 +158,7 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)), new ElectrolysisMetalRecipe(
c0 != null ? c0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1, 2)),
c1 != null ? c1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1, 2)),
20,
60,
c0 == null ? ItemBedrockOreNew.extract(type.primary1, 2) : new ItemStack(ModItems.dust),
c1 == null ? ItemBedrockOreNew.extract(type.primary2, 2) : new ItemStack(ModItems.dust)));
}
@ -184,7 +184,7 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
public static HashMap getRecipes() {
HashMap<Object[], Object[]> recipes = new HashMap();
HashMap<Object[], Object[]> recipes = new HashMap<Object[], Object[]>();
for(Entry<AStack, ElectrolysisMetalRecipe> entry : ElectrolyserMetalRecipes.recipes.entrySet()) {
@ -235,7 +235,10 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
ItemStack[] byproducts = new ItemStack[0];
if(obj.has("byproducts")) byproducts = this.readItemStackArray(obj.get("byproducts").getAsJsonArray());
recipes.put(input, new ElectrolysisMetalRecipe(output1, output2, byproducts));
int duration = 600;
if(obj.has("duration")) duration = obj.get("duration").getAsInt();
recipes.put(input, new ElectrolysisMetalRecipe(output1, output2, duration, byproducts));
}
@Override
@ -263,6 +266,8 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
for(ItemStack stack : rec.getValue().byproduct) this.writeItemStack(stack, writer);
writer.endArray();
}
writer.name("duration").value(rec.getValue().duration);
}
public static class ElectrolysisMetalRecipe {
@ -276,7 +281,7 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
this.output1 = output1;
this.output2 = output2;
this.byproduct = byproduct;
duration = 600;
this.duration = 600;
}
public ElectrolysisMetalRecipe(MaterialStack output1, MaterialStack output2, int duration, ItemStack... byproduct) {
this.output1 = output1;