mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +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
@@ -4,7 +4,7 @@ import java.util.Map;
|
||||
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.recipe.AdvancedInput;
|
||||
import mekanism.common.recipe.inputs.AdvancedMachineInput;
|
||||
import mekanism.api.util.StackUtils;
|
||||
import mekanism.common.block.BlockMachine.MachineType;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
@@ -82,7 +82,7 @@ public interface IFactory
|
||||
|
||||
if(usesFuel())
|
||||
{
|
||||
return RecipeHandler.getOutput(new AdvancedInput(input, gas), stackDecrease, recipe.get());
|
||||
return RecipeHandler.getOutput(new AdvancedMachineInput(input, gas), stackDecrease, recipe.get());
|
||||
}
|
||||
else {
|
||||
return RecipeHandler.getOutput(input, stackDecrease, recipe.get());
|
||||
@@ -148,11 +148,11 @@ public interface IFactory
|
||||
|
||||
for(Object obj : recipe.get().entrySet())
|
||||
{
|
||||
if(((Map.Entry)obj).getKey() instanceof AdvancedInput)
|
||||
if(((Map.Entry)obj).getKey() instanceof AdvancedMachineInput)
|
||||
{
|
||||
Map.Entry entry = (Map.Entry)obj;
|
||||
|
||||
ItemStack stack = ((AdvancedInput)entry.getKey()).itemStack;
|
||||
ItemStack stack = ((AdvancedMachineInput)entry.getKey()).itemStack;
|
||||
|
||||
if(StackUtils.equalsWildcard(stack, itemStack))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user