mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-23 21:39:40 +00:00
Massive recipe system overhaul.
They should be much more efficient now (this reduced the tick time of the CI Chamber by 3-4x in my testing), due to being able to just use the HashMap's get() instead of being limited to iterating through entries. NEI integration code now a lot more readable and type-safe as well.
This commit is contained in:
1 parent
4dd3d4ba01
commit
ce6946c669
77 files changed
+1294
-486
No files matched your search
@@ -12,8 +12,8 @@ import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.api.gas.IGasHandler;
|
||||
import mekanism.api.gas.ITubeConnection;
|
||||
import mekanism.api.recipe.PressurizedProducts;
|
||||
import mekanism.api.recipe.PressurizedRecipe;
|
||||
import mekanism.common.recipe.outputs.PressurizedProducts;
|
||||
import mekanism.common.recipe.machines.PressurizedRecipe;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.base.ISustainedData;
|
||||
import mekanism.common.block.BlockMachine.MachineType;
|
||||
@@ -154,16 +154,16 @@ public class TileEntityPRC extends TileEntityBasicMachine implements IFluidHandl
|
||||
{
|
||||
PressurizedRecipe recipe = getRecipe();
|
||||
|
||||
recipe.reactants.use(inventory[0], inputFluidTank, inputGasTank);
|
||||
recipe.getInput().use(inventory[0], inputFluidTank, inputGasTank);
|
||||
|
||||
if(inventory[0].stackSize <= 0)
|
||||
{
|
||||
inventory[0] = null;
|
||||
}
|
||||
|
||||
recipe.products.fillTank(outputGasTank);
|
||||
recipe.getOutput().fillTank(outputGasTank);
|
||||
|
||||
recipe.products.addProducts(inventory, 2);
|
||||
recipe.getOutput().addProducts(inventory, 2);
|
||||
|
||||
markDirty();
|
||||
ejectorComponent.onOutput();
|
||||
@@ -179,7 +179,7 @@ public class TileEntityPRC extends TileEntityBasicMachine implements IFluidHandl
|
||||
return false;
|
||||
}
|
||||
|
||||
PressurizedProducts products = recipe.products;
|
||||
PressurizedProducts products = recipe.getOutput();
|
||||
|
||||
if(products.getItemOutput() != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user