mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 03:59:37 +00:00
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.
26 lines
470 B
Java
26 lines
470 B
Java
package mekanism.common.recipe.inputs;
|
|
|
|
import net.minecraftforge.fluids.FluidStack;
|
|
|
|
public class FluidInput extends MachineInput
|
|
{
|
|
public FluidStack ingredient;
|
|
|
|
public FluidInput(FluidStack stack)
|
|
{
|
|
ingredient = stack;
|
|
}
|
|
|
|
@Override
|
|
public int hashIngredients()
|
|
{
|
|
return ingredient.hashCode();
|
|
}
|
|
|
|
@Override
|
|
public boolean testEquality(MachineInput other)
|
|
{
|
|
return other instanceof FluidInput && ingredient.equals(((FluidInput)other).ingredient);
|
|
}
|
|
}
|